Backporting changes in collector has proven a bit painful lately. We use PRs to check the changes being backported are sound on the corresponding release branch, however, by default we use the builder and test images from the master branch, which can some times be outdated and require to manually add a couple of labels to re-trigger their builds. This situation has gotten worse now that we have rules for merging to the release branches, since having this sort of error can lead to necessary re-triggers of CI that take time or lead to strange/cryptic error messages that are not always clearly lead to the missing labels, causing engineers to waste time debugging the issue.
The original reason for this workflow (re-using the master branch images), was to speed up builds on the release branches, since the test container rebuild can take about an hour and the Power and arm builders took around 6. Since then however, we have changed how the test image is built, speeding it up to about 7 minutes and the builder images take around 30 minutes using native GHA runners. As such, there are a few ways we could go about improving this situation:
- Have the release branches tag re-usable versions of the builder and test images and use those instead of the ones from master on PRs.
- Always add the build-builder-image and rebuild-test-containers labels automatically when a PR is created pointing to a release branch with a dedicated GHA workflow (this is similar to how the konflux updates PRS work now).
- Always build the builder and test images when targeting a release branch on a PR.
- Keep the "master" builder image for dev purposes and have CI always rebuild the builder and test images on all runs.
Each of these approaches have pros and cons that will need to be discussed with the broader collector team before reaching a conclusion on how to move forward.