Skip to content

Fix kueue upgrade test: on-pr operand image with fallback and rollout wait - #81552

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sohankunkerkar:fix-upgrade-operand-image-v2
Jul 7, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sohankunkerkar:fix-upgrade-operand-image-v2

Conversation

@sohankunkerkar

@sohankunkerkar sohankunkerkar commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #81517. Two remaining issues with the kueue upgrade test:

  • Operator/operand image resolution: Use on-pr-${REVISION} for both operator and operand (consistent), with fallback to latest Konflux branch build when the tag doesn't exist (openshift/release rehearsals)
  • Operand not deployed: The upgrade script patched the CSV but didn't wait for the operator to actually deploy the new operand. Added oc rollout status for the operator + polling loop that verifies the kueue-controller-manager container image matches OPERAND_IMAGE before proceeding to tests (10m timeout)

Unblocks openshift/kueue-operator#2134

Test plan

  • oc get deployment kueue-controller-manager -o wide shows the Konflux operand image, not registry.redhat.io/kueue/kueue-rhel9@sha256:9ad4355bb...
  • AFS/preemption tests pass (no more flaky operand image races)

🤖 Generated with Claude Code

Summary by CodeRabbit

This PR improves the kueue operator upgrade CI flow by making both image resolution and rollout verification more deterministic.

  • More reliable image selection: Updates the kueue operator CI image setup to try on-pr-${REVISION} for both the operator and operand images. If either tag is not available, it falls back to the latest resolvable Konflux branch image, and fails fast if resolution still produces empty image references.
  • Eliminates operand rollout races: After patching the CSV, the upgrade test now waits for the operator deployment to complete rollout, then polls (with a ~10-minute timeout / bounded attempts) until the kueue-controller-manager container image matches the expected OPERAND_IMAGE. Only after this match does it wait for the controller-manager rollout to finish, with diagnostics on failures.

Overall, this reduces flaky upgrade rehearsal runs caused by missing PR-specific images and by proceeding before the operand is actually deployed.

Copilot AI review requested due to automatic review settings July 7, 2026 13:16
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9fbc407a-7236-466f-bd74-cc09a2ce8310

📥 Commits

Reviewing files that changed from the base of the PR and between ccf76089ae68fd789adcf0561b5e3104728390e7 and 76e1e8d.

📒 Files selected for processing (2)
  • ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh
  • ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh
  • ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh

Walkthrough

Updates Kueue operator image setup to prefer on-pr tags with latest-image fallback and exports validated image values. Updates the upgrade test to use rollout/availability waits and to confirm the controller-manager image matches OPERAND_IMAGE before completing.

Changes

Kueue Operator Image Resolution and Upgrade Readiness

Layer / File(s) Summary
Image resolution fallback
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh
Adds resolve_image(repo) to check for on-pr-${REVISION} with skopeo inspect, fall back to resolve_latest_image, validate non-empty OPERATOR_IMAGE and OPERAND_IMAGE, and export both to ${SHARED_DIR}/env.
Upgrade rollout and image match
ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh
Replaces operator readiness polling with oc rollout status, waits for kueue-controller-manager availability, conditionally verifies the controller-manager image matches OPERAND_IMAGE, and then waits for rollout completion.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • openshift/release#81517: Changes the same upgrade path and OPERAND_IMAGE handling to ensure the controller uses the expected image.

Suggested labels: rehearsals-ack

Suggested reviewers: kannon92, mrunalp

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Microshift Test Compatibility ⚠️ Warning The upgrade flow has no MicroShift guard and uses unsupported APIs/resources: ImageDigestMirrorSet (config.openshift.io) and OLM CSV/operator-sdk steps. Add a MicroShift skip/tag or avoid OpenShift-only APIs/OLM in this path; otherwise mark the upgrade job non-MicroShift-compatible.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: on-pr image fallback plus rollout waiting in the kueue upgrade test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes shell step scripts; no Ginkgo It/Describe/Context/When titles were added or modified, so no unstable test names.
Test Structure And Quality ✅ Passed PR only changes shell step-registry scripts, not Ginkgo It blocks; waits are bounded and diagnostics/cleanup match nearby upgrade steps.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only shell-script step definitions changed; no new Ginkgo tests or node/HA assumptions. The rollout/image checks are deployment-level and SNO-safe.
Topology-Aware Scheduling Compatibility ✅ Passed Only CI shell scripts changed; no manifests, controllers, or topology-aware scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed The PR only changes ci-operator bash step scripts, not an OTE test binary or suite setup, so the stdout-on-JSON contract is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only updates step-registry shell scripts, and the touched files contain no IPv4-specific test logic.
No-Weak-Crypto ✅ Passed The changed scripts contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons; only image-string equality checks.
Container-Privileges ✅ Passed Only bash step-registry scripts changed; no container/K8s manifests or privilege flags (privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation) were introduced.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The new logs only print image refs, rollout status, and error diagnostics; no passwords, tokens, PII, session IDs, or customer data appear.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from cpmeadors and mrunalp July 7, 2026 13:18
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2026
@sohankunkerkar

Copy link
Copy Markdown
Member Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@sohankunkerkar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the kueue-operator upgrade CI flow to (1) consistently resolve operator/operand images to the PR-built on-pr-${REVISION} tags with a fallback to the latest Konflux branch build, and (2) add stronger rollout synchronization so upgrade tests don’t race ahead before the operand actually rolls out to the expected image.

Changes:

  • Add resolve_image() to prefer on-pr-${REVISION} for operator/operand images, falling back to the latest branch build when the PR tag is missing.
  • Replace the manual operator readiness polling with oc rollout status and add a polling loop to ensure kueue-controller-manager is using OPERAND_IMAGE before proceeding.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh Improves upgrade synchronization by waiting on operator rollout and verifying the operand deployment updates to the expected image.
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh Resolves operator/operand images using on-pr-${REVISION} with a fallback to latest Konflux branch builds and exports them for downstream steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kannon92 kannon92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@sohankunkerkar
sohankunkerkar force-pushed the fix-upgrade-operand-image-v2 branch from ccf7608 to 76e1e8d Compare July 7, 2026 13:21
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026

@kannon92 kannon92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kannon92, sohankunkerkar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@sohankunkerkar: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-kueue-operator-release-1.3-upgrade-from-4.20-e2e-ocp-upgrade-4-20-to-4-21-kueue-1-3 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.3-upgrade-from-4.18-e2e-ocp-upgrade-4-18-to-4-19-kueue-1-3 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.21-e2e-ocp-upgrade-4-21-to-4-22-kueue-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.21-e2e-operator-upgrade-4-21-kueue-1-3-to-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.20-e2e-ocp-upgrade-4-20-to-4-21-kueue-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.20-e2e-operator-upgrade-4-20-kueue-1-3-to-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.19-e2e-ocp-upgrade-4-19-to-4-20-kueue-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.19-e2e-operator-upgrade-4-19-kueue-1-3-to-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.3-upgrade-from-4.19-e2e-ocp-upgrade-4-19-to-4-20-kueue-1-3 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.18-e2e-ocp-upgrade-4-18-to-4-19-kueue-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.18-e2e-operator-upgrade-4-18-kueue-1-3-to-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-upgrade-from-4.22-e2e-operator-upgrade-4-22-kueue-1-3-to-1-4 openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-main-perfscale-pr-kueue-operator-9nodes openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.4-perfscale-pr-kueue-operator-9nodes openshift/kueue-operator presubmit Registry content changed
pull-ci-openshift-kueue-operator-release-1.3-perfscale-pr-kueue-operator-9nodes openshift/kueue-operator presubmit Registry content changed
periodic-ci-openshift-kueue-operator-main-test-e2e-4-21-fips N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.3-test-e2e-downstream-4-21-disruptive N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.4-test-e2e-dra-gpu-4-21 N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.3-test-e2e-downstream-4-22 N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.3-perfscale-kueue-operator-9nodes N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.4-test-e2e-downstream-4-20-disruptive N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-main-test-e2e-upstream-4-22 N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-main-test-e2e-downstream-4-21-disruptive N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-main-test-e2e-4-19 N/A periodic Registry content changed
periodic-ci-openshift-kueue-operator-release-1.4-test-e2e-4-18 N/A periodic Registry content changed

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-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh (1)

39-48: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

resolve_image conflates "tag not found" with any registry error.

skopeo inspect ... &>/dev/null discards all diagnostic output, and the fallback path treats auth failures, network errors, and TLS issues identically to a genuinely missing on-pr tag, silently falling back to resolve_latest_image. Given this PR's goal is fixing image-race flakiness, a masked registry error here could cause the test to silently run against a stale Konflux build instead of failing loudly with an actionable error.

♻️ Suggested fix to surface real errors
 resolve_image() {
   local repo=$1
   local pr_tag="on-pr-${REVISION}"
-  if skopeo inspect "docker://${repo}:${pr_tag}" &>/dev/null; then
+  local inspect_output
+  if inspect_output=$(skopeo inspect "docker://${repo}:${pr_tag}" 2>&1); then
     echo "${repo}:${pr_tag}"
     return
   fi
-  echo "on-pr tag not found for ${repo}, falling back to latest branch build..." >&2
+  echo "on-pr tag ${pr_tag} not usable for ${repo} (${inspect_output}), falling back to latest branch build..." >&2
   resolve_latest_image "$repo"
 }
🤖 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 39 - 48, The resolve_image function is masking all skopeo inspect
failures as a missing on-pr tag, so distinguish a real tag miss from
registry/auth/network/TLS errors. Update resolve_image to inspect the skopeo
exit status and preserve stderr output, then only fall back to
resolve_latest_image when the tag is actually absent; for any other failure,
surface the error and fail loudly. Keep the fix centered around resolve_image
and resolve_latest_image so the fallback remains explicit and actionable.
🤖 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.

Nitpick comments:
In
`@ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh`:
- Around line 39-48: The resolve_image function is masking all skopeo inspect
failures as a missing on-pr tag, so distinguish a real tag miss from
registry/auth/network/TLS errors. Update resolve_image to inspect the skopeo
exit status and preserve stderr output, then only fall back to
resolve_latest_image when the tag is actually absent; for any other failure,
surface the error and fail loudly. Keep the fix centered around resolve_image
and resolve_latest_image so the fallback remains explicit and actionable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 3a06c31c-f5bc-4d64-b0d8-c78cf2ba127f

📥 Commits

Reviewing files that changed from the base of the PR and between 4ac9f63 and ccf76089ae68fd789adcf0561b5e3104728390e7.

📒 Files selected for processing (2)
  • ci-operator/step-registry/kueue-operator/image-env-setup/kueue-operator-image-env-setup-commands.sh
  • ci-operator/step-registry/kueue-operator/test/upgrade/operator/kueue-operator-test-upgrade-operator-commands.sh

@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@sohankunkerkar: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@sohankunkerkar

Copy link
Copy Markdown
Member Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@sohankunkerkar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 7, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit dee2284 into openshift:main Jul 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants