Project

General

Profile

Actions

action #164886

closed

coordination #58184: [saga][epic][use case] full version control awareness within openQA

coordination #152847: [epic] version control awareness within openQA for test distributions

Use OpenQA::Git for all our git wrappers size:S

Added by tinita 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Category:
Feature requests
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Motivation

See #162125

https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Task/Git/Clone.pm#L53 uses functions directly defined in the module.
Needle::Save and Needle::Delete are using OpenQA::Git:
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Task/Needle/Save.pm#L9
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Task/Needle/Delete.pm#L7

Goals

  • AC1: We have one module with all our git wrappers

Suggestions

  • Maybe some code can be reused
  • Ensure test coverage includes both use cases

Related issues 3 (0 open3 closed)

Related to openQA Project (public) - action #164898: Replace fetchneedles with a minion job for the regular update of git repos size:MResolvedtinita

Actions
Related to openQA Project (public) - action #165066: Ensure local changes to git repos cloned by git_auto_clone are left alone size:SResolveddheidler2024-08-08

Actions
Copied from openQA Project (public) - action #162125: [timeboxed:10h][spike] Let openQA keep test distribution checkouts up to date without needing fetchneedles size:SResolvedtinita2024-06-12

Actions
Actions #1

Updated by tinita 5 months ago

  • Copied from action #162125: [timeboxed:10h][spike] Let openQA keep test distribution checkouts up to date without needing fetchneedles size:S added
Actions #2

Updated by jbaier_cz 5 months ago

  • Target version set to Ready
Actions #3

Updated by tinita 5 months ago

  • Related to action #164898: Replace fetchneedles with a minion job for the regular update of git repos size:M added
Actions #4

Updated by livdywan 4 months ago

  • Subject changed from Use OpenQA::Git for all our git wrappers to Use OpenQA::Git for all our git wrappers size:S
  • Description updated (diff)
  • Status changed from New to Workable
Actions #5

Updated by robert.richardson 4 months ago

  • Status changed from Workable to In Progress
  • Assignee set to robert.richardson
Actions #6

Updated by openqa_review 4 months ago

  • Due date set to 2024-08-27

Setting due date based on mean cycle time of SUSE QE Tools

Actions #7

Updated by tinita 4 months ago

https://github.com/os-autoinst/openQA/pull/5854 Extend test coverage of OpenQA::Git

Actions #8

Updated by robert.richardson 4 months ago

https://github.com/os-autoinst/openQA/pull/5863 Refactor PR turning generic functions of OpenQA::Task::Git:Clone into methods of OpenQA::Git including other minor refactors for the module.

Actions #9

Updated by tinita 4 months ago

https://github.com/os-autoinst/openQA/pull/5863 merged.

We see a failure now:
https://openqa.opensuse.org/tests/4422586#step/test_running/8
https://openqa.opensuse.org/tests/4422583/logfile?filename=test_running-openqa_services.log.txt

Aug 22 06:05:13 susetest openqa-gru[65311]: [info] Running cmd: env GIT_SSH_COMMAND=ssh -oBatchMode=yes git -C /var/lib/openqa/share/tests/example ls-remote --symref https://github.com/os-autoinst/os-autoinst-distri-example.git HEAD
Aug 22 06:05:14 susetest openqa-gru[65311]: [warn] fatal: cannot change to '/var/lib/openqa/share/tests/example': No such file or directory
Aug 22 06:05:14 susetest openqa-gru[65311]: [error] cmd returned 32768

Revert https://github.com/os-autoinst/openQA/pull/5880 was already merged.

I think there are two things that can be improved:

  • The -C /dir is harmful if we call the ls-remote before the intial clone, so I guess we do need an option to leave out the -C for some commands
  • The ls-remote is called before the initial clone. But if we don't have the existing clone, we just need to do a clone and never need the ls-remote, and we don't even need the following fetch if we just did a clone, so the code can also be improved in that regard.
Actions #10

Updated by robert.richardson 4 months ago

  • Status changed from In Progress to Workable

Thank you for the summary. I'll fix everything once i'm back (next wednesday), unless someone else wants to pick it up in the meantime. Setting the ticket back to workable until then.

Actions #11

Updated by tinita 4 months ago

I prepared a PR which improves the order of the git commands and also gets rid of some calls this way: https://github.com/os-autoinst/openQA/pull/5884

The original problem should not appear anymore with your refactoring branch, but still it might make sense to only add -C ... when needed. Not sure yet how that could look like.

Actions #12

Updated by tinita 4 months ago

https://github.com/os-autoinst/openQA/pull/5884 merged.
I hope it's not too annoying to rebase your refactoring on top of it @robert.richardson

Actions #13

Updated by robert.richardson 4 months ago

  • Status changed from Workable to In Progress
Actions #14

Updated by livdywan 4 months ago

  • Due date changed from 2024-08-27 to 2024-08-30

The expected due date did not account for merge conflicts and availability, hence adjusting.

Actions #15

Updated by tinita 4 months ago

  • Related to action #165066: Ensure local changes to git repos cloned by git_auto_clone are left alone size:S added
Actions #16

Updated by tinita 4 months ago

https://github.com/os-autoinst/openQA/pull/5900 Refactor git functionality into OpenQA::Git (merged)

Actions #17

Updated by jbaier_cz 4 months ago

  • Due date changed from 2024-08-30 to 2024-09-06

PR is merged, lets monitor the impact.

Actions #18

Updated by tinita 4 months ago

  • Status changed from In Progress to Feedback

I guess this should be in feedback.

We don't see any problems on o3.
On osd we currently have the git_auto_clone feature disabled, but the needle tasks are using this code.

So I would say this looks good.

Actions #19

Updated by livdywan 4 months ago

  • Status changed from Feedback to Resolved

So I would say this looks good.

🤞🏼

Actions #20

Updated by okurz 3 months ago

  • Due date deleted (2024-09-06)
Actions

Also available in: Atom PDF