action #164886
closedcoordination #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
0%
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
Updated by tinita 2 months ago
- Copied from action #162125: [timeboxed:10h][spike] Let openQA keep test distribution checkouts up to date without needing fetchneedles size:S added
Updated by tinita 2 months ago
- Related to action #164898: Replace fetchneedles with a minion job size:M added
Updated by robert.richardson about 2 months ago
- Status changed from Workable to In Progress
- Assignee set to robert.richardson
Updated by openqa_review about 2 months ago
- Due date set to 2024-08-27
Setting due date based on mean cycle time of SUSE QE Tools
Updated by tinita about 2 months ago
https://github.com/os-autoinst/openQA/pull/5854 Extend test coverage of OpenQA::Git
Updated by robert.richardson about 2 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.
Updated by tinita about 2 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 thels-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 thels-remote
, and we don't even need the followingfetch
if we just did aclone
, so the code can also be improved in that regard.
Updated by robert.richardson about 2 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.
Updated by tinita about 2 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.
Updated by tinita about 1 month 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
Updated by robert.richardson about 1 month ago
- Status changed from Workable to In Progress
Updated by livdywan about 1 month 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.
Updated by tinita about 1 month ago
- Related to action #165066: Ensure local changes to git repos cloned by git_auto_clone are left alone size:S added
Updated by tinita about 1 month ago
https://github.com/os-autoinst/openQA/pull/5900 Refactor git functionality into OpenQA::Git (merged)
Updated by jbaier_cz about 1 month ago
- Due date changed from 2024-08-30 to 2024-09-06
PR is merged, lets monitor the impact.
Updated by tinita about 1 month 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.
Updated by livdywan about 1 month ago
- Status changed from Feedback to Resolved
So I would say this looks good.
🤞🏼