Skip to content

Add postrelease test for operator images list [master]#12186

Open
danudey wants to merge 1 commit intoprojectcalico:masterfrom
danudey:add-operator-images-list-postrelease-test-master
Open

Add postrelease test for operator images list [master]#12186
danudey wants to merge 1 commit intoprojectcalico:masterfrom
danudey:add-operator-images-list-postrelease-test-master

Conversation

@danudey
Copy link
Contributor

@danudey danudey commented Mar 18, 2026

This adds a test to the postrelease test suite which does the following:

  1. Pulls the Operator image for this release and runs it with --print-images=list
  2. Finds any quay.io/calico images
  3. Verifies that those images are being checked for in our postrelease tests

For example, if we add a new image, enfrobulate, to Operator, then it will be listed as quay.io/calico/enfrobulate:v3.32.3. When the release tool triggers these tests it passes a list of images to test for; if enfrobulate is 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.

@danudey danudey requested a review from a team as a code owner March 18, 2026 22:09
@danudey danudey added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Mar 18, 2026
Copilot AI review requested due to automatic review settings March 18, 2026 22:09
@danudey danudey added the release-note-not-required Change has no user-facing impact label Mar 18, 2026
@marvin-tigera marvin-tigera added this to the Calico v3.32.0 milestone Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -images flag 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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants