Add postrelease test for operator images list [master]#12186
Open
danudey wants to merge 1 commit intoprojectcalico:masterfrom
Open
Add postrelease test for operator images list [master]#12186danudey wants to merge 1 commit intoprojectcalico:masterfrom
danudey wants to merge 1 commit intoprojectcalico:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a postrelease validation test to ensure the Tigera Operator’s --print-images=list output doesn’t introduce new quay.io/calico/* images that are missing from the release tool’s -images list, helping keep postrelease coverage in sync with Operator image dependencies.
Changes:
- Add a new postrelease test that pulls and runs the Operator image with
--print-images=list. - Parse the printed image list and assert every
quay.io/calico/...image is present in the provided-imagesflag list.
Comment on lines
+47
to
+59
| tigeraPrefix := registry.DefaultCalicoRegistry + "/" | ||
| var missing []string | ||
| for line := range strings.SplitSeq(strings.TrimSpace(string(out)), "\n") { | ||
| line = strings.TrimSpace(line) | ||
| if line == "" { | ||
| continue | ||
| } | ||
| if !strings.HasPrefix(line, tigeraPrefix) { | ||
| continue | ||
| } | ||
| // Extract the image name from the fully qualified image reference. | ||
| // e.g. "quay.io/calico/node:v3.31.1" -> "node" | ||
| withoutRegistry := strings.TrimPrefix(line, tigeraPrefix) |
Comment on lines
+65
to
+69
| // The operator image itself is not expected in the images list. | ||
| if strings.Contains(operator.DefaultImage, imageName) { | ||
| continue | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a test to the postrelease test suite which does the following:
--print-images=listquay.io/calicoimagesFor example, if we add a new image,
enfrobulate, to Operator, then it will be listed asquay.io/calico/enfrobulate:v3.32.3. When the release tool triggers these tests it passes a list of images to test for; ifenfrobulateis not one of those images, this test will fail.This ensures that when new images are added we don't risk missing them in our postrelease tests, and potentially in other places where release tool may need to know about or interact with images.