Repository navigation
ROX-37670: test container rebuilds happen during nightlies - #2209
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2209 +/- ##
=======================================
Coverage 33.45% 33.45%
=======================================
Files 22 22
Lines 3623 3623
Branches 3623 3623
=======================================
Hits 1212 1212
Misses 2402 2402
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2dc30b0 to
5956046
Compare
This leads to a closer and (hopefully) more stable version of the existing fedora images we were previously using.
5956046 to
4d9dbbc
Compare
|
@Molter73 's changes look good to me |
This is a follow up to #2209, we need to backport those changes and we need to ensure release branches will not accidentally overwrite images built in the main branch. A new `exists` make target is added to all test containers and a global check ensures at least one of the images is missing before triggering the rebuild. On normal operation, new versions of the images will be built by the main branch and be available once the QA_TAG bump is backported to release branches. In this case the paths-filter action will determine a rebuild is needed, but the new check will skip building the images. If the images are in the process of being built on the main branch and some of them are not yet pushed, the backported commit will push the images again but they will have been built in such a small span of time the resulting images will pretty much be the same. On PRs, if the containers need to be rebuilt a unique tag is generated and the step will always return the images don't exist.
) * chore: validate test images don't exist on remote before building This is a follow up to #2209, we need to backport those changes and we need to ensure release branches will not accidentally overwrite images built in the main branch. A new `exists` make target is added to all test containers and a global check ensures at least one of the images is missing before triggering the rebuild. On normal operation, new versions of the images will be built by the main branch and be available once the QA_TAG bump is backported to release branches. In this case the paths-filter action will determine a rebuild is needed, but the new check will skip building the images. If the images are in the process of being built on the main branch and some of them are not yet pushed, the backported commit will push the images again but they will have been built in such a small span of time the resulting images will pretty much be the same. On PRs, if the containers need to be rebuilt a unique tag is generated and the step will always return the images don't exist. * Global FACT_QA_TAG and portable redirections * Don't conflate network/registry errors with manifest does not exist errors
* ROX-36983: version containers used in tests (#1789) After a change in the Vi/Vim versioned used by Fedora broke our integration tests, we have decided to tag and version all images used in our tests. This patch adds a CI job for building and pushing the images when `tests/containers/QA_TAG` is updated, much like we do in stackrox/collector. It also modifies the existing tests from always building the images to: * Try to find the image locally. * Attempt to pull it if it is not found. * If unable to pulled and allowed to build locally, do that. * ROX-37670: test container rebuilds happen during nightlies (#2209) * Never rebuild test containers on scheduled builds * Bump test container version * Use debian:trixie as the base distro for 'editors' * Use centos images + pin image versions and packages used This leads to a closer and (hopefully) more stable version of the existing fedora images we were previously using. --------- Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com> * chore: validate test images don't exist on remote before building (#2214) * chore: validate test images don't exist on remote before building This is a follow up to #2209, we need to backport those changes and we need to ensure release branches will not accidentally overwrite images built in the main branch. A new `exists` make target is added to all test containers and a global check ensures at least one of the images is missing before triggering the rebuild. On normal operation, new versions of the images will be built by the main branch and be available once the QA_TAG bump is backported to release branches. In this case the paths-filter action will determine a rebuild is needed, but the new check will skip building the images. If the images are in the process of being built on the main branch and some of them are not yet pushed, the backported commit will push the images again but they will have been built in such a small span of time the resulting images will pretty much be the same. On PRs, if the containers need to be rebuilt a unique tag is generated and the step will always return the images don't exist. * Global FACT_QA_TAG and portable redirections * Don't conflate network/registry errors with manifest does not exist errors --------- Co-authored-by: ovalenti <ovalenti@redhat.com>
* ROX-36983: version containers used in tests (#1789) After a change in the Vi/Vim versioned used by Fedora broke our integration tests, we have decided to tag and version all images used in our tests. This patch adds a CI job for building and pushing the images when `tests/containers/QA_TAG` is updated, much like we do in stackrox/collector. It also modifies the existing tests from always building the images to: * Try to find the image locally. * Attempt to pull it if it is not found. * If unable to pulled and allowed to build locally, do that. * ROX-37670: test container rebuilds happen during nightlies (#2209) * Never rebuild test containers on scheduled builds * Bump test container version * Use debian:trixie as the base distro for 'editors' * Use centos images + pin image versions and packages used This leads to a closer and (hopefully) more stable version of the existing fedora images we were previously using. --------- Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com> * chore: validate test images don't exist on remote before building (#2214) * chore: validate test images don't exist on remote before building This is a follow up to #2209, we need to backport those changes and we need to ensure release branches will not accidentally overwrite images built in the main branch. A new `exists` make target is added to all test containers and a global check ensures at least one of the images is missing before triggering the rebuild. On normal operation, new versions of the images will be built by the main branch and be available once the QA_TAG bump is backported to release branches. In this case the paths-filter action will determine a rebuild is needed, but the new check will skip building the images. If the images are in the process of being built on the main branch and some of them are not yet pushed, the backported commit will push the images again but they will have been built in such a small span of time the resulting images will pretty much be the same. On PRs, if the containers need to be rebuilt a unique tag is generated and the step will always return the images don't exist. * Global FACT_QA_TAG and portable redirections * Don't conflate network/registry errors with manifest does not exist errors --------- Co-authored-by: ovalenti <ovalenti@redhat.com>
Description
Test containers use the list of files modified from a reference to determine whether they should be rebuilt. In the case of 'schedule' GHA, this detection returns "all modified", which triggers the rebuild.
We propose to add a specific test that prevents rebuild when the event_name is 'schedule'.
For this PR to be merged will require that the test containers be fixed. So work on this is required as well. This work could arguably be done as a preliminary PR in order to conserve the separation of concerns ; but it is also likely overkill, so we will start with just one PR having both fixes.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Summary by CodeRabbit