action #167395
openQA - coordination #162890: [saga][epic] feature discoverability
coordination #162896: [epic] Job triggering on jobless openQA instances
Ensure only the tested revision of devel:openQA packages are submitted to openSUSE:Factory size:M
0%
Description
Motivation¶
A problem related to #166658 showed up in Tumbleweed openQA-in-openQA tests, reported in https://bugzilla.suse.com/show_bug.cgi?id=1230953 , but not devel:openQA based openQA-in-openQA tests in https://openqa.opensuse.org/group_overview/24. We conducted a deeper analysis in #167335 identifying a point for improvement:
The state of the OBS repository can change after tests were triggered/monitored. We should copy a specific revision, e.g. osc -r $rev co
into devel:openQA:tested to make sure we only submit a version which we triggered tests for. However in that case it can still be that while openQA-in-openQA are running but have not yet installed packages that devel:openQA receives an update. This would become problematic if the revision we copied is actually faulty, the newer version picked up in tests ends up with passed tests but then we submit the faulty packages. We maybe need to combine copying a fixed revision with also disabling OBS services or build of packages until the pipeline completes.
Acceptance criteria¶
- AC1: Given devel:openQA contains an os-autoinst package revision N When trigger+monitor+submit on jenkins.qa.suse.de is triggered Then revision N is submitted to openSUSE:Factory
- AC2: Given devel:openQA contains an os-autoinst package revision N And trigger+monitor+submit on jenkins.qa.suse.de is triggered When a new pull request is merged in either https://github.com/os-autoinst/openQA/ or https://github.com/os-autoinst/os-autoinst/ And trigger+monitor+submit is still running Then trigger+monitor+submit does Not submit package revision N+1 And a new trigger+monitor+submit workflow is triggered for package revision N+1
- AC3: Given devel:openQA contains an os-autoinst package revision N And trigger+monitor+submit on jenkins.qa.suse.de is triggered When a new pull request is merged in either https://github.com/os-autoinst/openQA/ or https://github.com/os-autoinst/os-autoinst/ And trigger+monitor+submit is still running Then still revision N is submitted to openSUSE:Factory
Suggestions¶
- Take a look into https://github.com/os-autoinst/scripts/blob/master/trigger-openqa_in_openqa and https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit and http://jenkins.qa.suse.de/job/submit-openQA-TW-to-oS_Fctry/ to understand the current pipeline and the involved scripts
- Keep track of the revision that has been tested and only submit that revision when the test passed
- Extend the tooling accordingly
Further details¶
Alternatives to the idea mentioned in the motivation are
- When submitting, we need to make sure the OBS repository hasn't changed in the meantime to submit only what we have tested. This means we would not be able to submit anything if we frequently update the OBS repo.
- An alternative to avoid this would be to save the OBS repo upfront (e.g. make a branch) so we can later always submit the exact version we have tested.
- Disable the build or services while we are testing in our pipelines until we have copied into devel:openQA:tested
- Or https://en.opensuse.org/openSUSE:Build_Service_Tips_and_Tricks , "Disable build of packages",
osc api -X POST "/source/PROJECT/PACKAGE?cmd=set_flag&flag=build&status=disable" # and later ...