Repository navigation
Fix kueue upgrade test using stale operand image - #81517
openshift-merge-bot[bot] merged 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 8e2cce4132beef22b5e529ae1d81ac788286633a and e18818e. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR updates the kueue-operator image setup script to resolve and export operand and bundle images from the latest matching tags, and extends the upgrade fallback script to patch the operand-related CSV environment variable when present. ChangesKueue operator image resolution and upgrade patching
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Script as image-env-setup script
participant Skopeo
participant Env as SHARED_DIR/env
Script->>Skopeo: list-tags(repo)
Skopeo-->>Script: tag list
Script->>Skopeo: inspect matching 40-hex tags
Skopeo-->>Script: Created timestamps
Script->>Env: export OPERAND_IMAGE
Script->>Env: export BUNDLE_IMAGE
sequenceDiagram
participant Test as upgrade test script
participant CSV as Installed CSV
participant API as Cluster API
Test->>CSV: select installed CSV
Test->>API: patch operator image to OPERATOR_IMAGE
Test->>CSV: find RELATED_IMAGE_OPERAND_IMAGE env index
alt env index found
Test->>API: patch operand env value to OPERAND_IMAGE
else env index missing
Test->>Test: exit with error
end
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes the kueue-operator upgrade CI fallback path so that, when operator-sdk run bundle fails, the test run patches both the operator image and the operand image reference in the installed CSV—preventing upgrades from unintentionally using an older production operand image.
Changes:
- Resolve the latest Konflux-built operand image in
kueue-operator-image-env-setupand export it to${SHARED_DIR}/env. - In the manual upgrade fallback path, patch
RELATED_IMAGE_OPERAND_IMAGEin the CSV (in addition to patching the operator container image).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh |
Extends CSV patching in the fallback path to also update the operand related image env var. |
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh |
Adds operand image resolution (same pattern as bundle) and exports OPERAND_IMAGE for downstream steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The upgrade test fallback path patches the operator image in the CSV but not the operand image. The ImageDigestMirrorSet cannot redirect because Konflux and registry.redhat.io produce different digests, so the operand always falls back to the old production image. Resolve the latest Konflux-built operand image in image-env-setup and patch RELATED_IMAGE_OPERAND_IMAGE in the CSV during the fallback path.
8e2cce4 to
e18818e
Compare
|
/test |
|
/test all |
|
[REHEARSALNOTIFIER]
A total of 56 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.21-e2e-operator-upgrade-4-21-kueue-1-3-to-1-4 |
|
@sohankunkerkar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.20-e2e-ocp-upgrade-4-20-to-4-21-kueue-1-4 |
|
@sohankunkerkar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh (1)
34-56: 🚀 Performance & Scalability | 🔵 Trivial | ⚖️ Poor tradeoff
resolve_latest_imagedoes oneskopeo inspectcall per matching tag — O(n) network round trips.Called twice (for
OPERAND_IMAGEandBUNDLE_IMAGE), this sequentially inspects every 40-hex-char tag in each repo to find the newestCreatedtimestamp. If either repo accumulates many historical digest tags, this can meaningfully slow down the step and increase flakiness from transient registry calls (each inspect failure is silently swallowed via2>/dev/null, potentially skipping the true latest tag if it briefly errors).Consider using a registry/Quay API call that returns tags with metadata in one request (sorted by last-modified) instead of N sequential
skopeo inspectcalls, to reduce both latency and flakiness.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh` around lines 34 - 56, The resolve_latest_image helper is doing one skopeo inspect per digest tag, which makes OPERAND_IMAGE and BUNDLE_IMAGE resolution slow and flaky. Replace the per-tag inspection loop in resolve_latest_image with a single registry/Quay API lookup that can return tags with metadata or ordering in one request, then select the newest candidate from that response. Keep the OPERAND_REPO and BUNDLE_REPO callers unchanged, but make the image resolution logic avoid sequential network round trips and silent inspect failures.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh`:
- Around line 36-39: The resolve_latest_image pipeline currently fails early
when grep finds no 40-char hex tags, so the OPERAND_IMAGE assignment aborts
before the existing empty-result check can report the intended diagnostic.
Update resolve_latest_image in kueue-operator-image-env-setup-commands.sh to
tolerate an empty tag match set inside the function, either by guarding the grep
stage or otherwise preventing pipefail from short-circuiting, so the caller can
reach the existing error handling and message.
In
`@ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh`:
- Around line 48-56: The fallback in the operator upgrade script can crash when
the CSV container has no env array because the jq pipeline in the OPERAND_IMAGE
lookup iterates over .env unconditionally. Update the ENV_INDEX extraction in
kueue-operator-test-upgrade-operator-commands.sh to safely handle a missing or
null env field (for example, by defaulting to an empty array before
to_entries[]) so the command substitution in the OPERAND_IMAGE block yields an
empty result instead of failing; keep the existing if [[ -n "${ENV_INDEX}" ]]
guard in place to skip patching when RELATED_IMAGE_OPERAND_IMAGE is absent.
---
Nitpick comments:
In
`@ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh`:
- Around line 34-56: The resolve_latest_image helper is doing one skopeo inspect
per digest tag, which makes OPERAND_IMAGE and BUNDLE_IMAGE resolution slow and
flaky. Replace the per-tag inspection loop in resolve_latest_image with a single
registry/Quay API lookup that can return tags with metadata or ordering in one
request, then select the newest candidate from that response. Keep the
OPERAND_REPO and BUNDLE_REPO callers unchanged, but make the image resolution
logic avoid sequential network round trips and silent inspect failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: a9fc91ed-ee56-4170-8732-ea6be5e7d1d7
📥 Commits
Reviewing files that changed from the base of the PR and between 66a5a9a and 8e2cce4132beef22b5e529ae1d81ac788286633a.
📒 Files selected for processing (2)
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.shci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh
|
/pj-rehearse ack |
|
@sohankunkerkar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
The rehearsal job confirms the operand image patching works fine. There's a circular deps with openshift/kueue-operator#2134 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PannagaRao, sohankunkerkar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@sohankunkerkar: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
eb35ef3
into
openshift:main
Summary
ImageDigestMirrorSetcannot redirect because Konflux andregistry.redhat.ioproduce different digests, so the operand always falls back to the old production image (April 2026)Fix:
image-env-setup(same pattern as the bundle resolution)RELATED_IMAGE_OPERAND_IMAGEin the CSV during the fallback path so the operator deploys the correct operandUnblocks openshift/kueue-operator#2134
Test plan
oc get deployment -n openshift-kueue-operator -o wide🤖 Generated with Claude Code
Summary by CodeRabbit
This PR fixes the Kueue operator upgrade CI fallback logic in the OpenShift release CI by ensuring the upgrade test deploys the correct operand image (not a stale production digest). In
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh, the step now resolves the latest Konflux-builtOPERAND_IMAGEandBUNDLE_IMAGE(using a helper that selects the newest 40-hex digest tag) and exports both into${SHARED_DIR}/envfor downstream steps.In
ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh, when the bundle install fallback path runs, the script patches the upgraded CSV to replace the operator container image with${OPERATOR_IMAGE}and—when${OPERAND_IMAGE}is set—also patches theRELATED_IMAGE_OPERAND_IMAGEenv entry to${OPERAND_IMAGE}. This prevents the operand from incorrectly reverting to an older April 2026 image during upgrade e2e runs, unblocking the affected upgrade CI jobs.