Skip to content

Revert "OCPBUGS-85363: Fixed flakiness of oc set image E2E tests"#31188

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
YamunadeviShanmugam:revert-31152-fix-oc-set-image
May 18, 2026
Merged

Revert "OCPBUGS-85363: Fixed flakiness of oc set image E2E tests"#31188
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
YamunadeviShanmugam:revert-31152-fix-oc-set-image

Conversation

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor

@YamunadeviShanmugam YamunadeviShanmugam commented May 18, 2026

Reverts #31152, the PR had removed the timeout which is causing race condition, will open a new PR with all the changes that is needed, reverting the PR for unblocking the CI for other PRs.

Summary by CodeRabbit

  • Tests
    • Updated CLI oc set image extended tests to use polling for imagestreamtags readiness, improving reliability in disconnected environments.
    • Simplified test validation with direct string matching instead of complex digest parsing.
    • Marked applicable tests to skip in disconnected scenarios.
    • Removed legacy image lookup helper function.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels May 18, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@YamunadeviShanmugam: This pull request references Jira Issue OCPBUGS-85363, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Reverts #31152, the PR had removed the timeout which is causing race condition, will open a new PR with all the changes that is needed, reverting the PR for unblocking the CI for other PRs.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Walkthrough

The PR refactors extended CLI tests for oc set image by removing the SearchLatestImage helper function and eliminating digest-based image validation. Tests now use fixed ruby:3.3-ubi8 image tags, add readiness polling for imagestreamtags, and validate results via substring checks for the image-registry host and /ruby@sha256: patterns instead of comparing computed digests.

Changes

oc set image test refactoring

Layer / File(s) Summary
Import and helper updates
test/extended/cli/setimage.go
Imports are updated to add time, wait, and klog modules while removing digest-parsing helper logic that previously extracted and compared computed image digests from test output. The SearchLatestImage helper function is also removed from test/extended/util/search_latest_image.go.
First test case: pods and dc resources
test/extended/cli/setimage.go
First g.It block is marked [Skipped:Disconnected] and refactored to add readiness polling for ruby:3.3-ubi8 imagestreamtags before validating results. All image assertions for --local, --dry-run=client, and basic update flows are converted to substring checks for image-registry host and /ruby@sha256: patterns. The multi-resource section (pods,dc) is similarly updated with polling and direct assertions.
Second test case: deployment and pod resources
test/extended/cli/setimage.go
Second g.It block is marked [Skipped:Disconnected] and refactored with readiness polling for ruby:3.3-ubi8 before executing --local, --dry-run=client, basic update, and invalid tag validations. All image assertions are replaced with substring checks for the image-registry host and /ruby@sha256: pattern. The multi-resource section (pods,deployments) is similarly updated with polling and direct assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • openshift/origin#31152: This PR undoes the digest-based approach by removing the SearchLatestImage helper and eliminating @sha256 digest extraction assertions that were introduced in that PR.

Suggested labels

approved, lgtm, verified, ready-for-human-review, ok-to-test

Suggested reviewers

  • deads2k
  • p0lyn0mial
  • sjenning
🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Tests fail multiple requirements: lack single responsibility (8+ behaviors per test), missing BeforeEach/AfterEach cleanup, PollImmediate masks errors with (false,nil), all assertions lack messages. Require fixes: split tests, add cleanup, preserve polling errors, add assertion messages. Review comment flags the timeout masking issue.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reverting a previous fix for flaky oc set image tests, which aligns with the changeset that removes related helper functions and updates test logic.
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 All Ginkgo test names in setimage.go are stable, literal strings with no dynamic values, variable interpolation, or generated identifiers. Names are clear and descriptive of what is tested.
Microshift Test Compatibility ✅ Passed Test 1 has [apigroup:apps.openshift.io] protecting DeploymentConfig. Test 2 uses only Kubernetes and image.openshift.io APIs. Both marked [Skipped:Disconnected].
Single Node Openshift (Sno) Test Compatibility ✅ Passed Tests use single-replica deployments and single pods compatible with SNO. No multi-node assumptions detected.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test files in test/extended/. No deployment manifests, operator code, or controllers are added/modified. Check applies to production code only, not test code.
Ote Binary Stdout Contract ✅ Passed No OTE Binary Stdout Contract violations. klog.Warningf() calls are inside It() blocks (exempt from check) and klog defaults to stderr. No fmt.Print or stdout writes in process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Tests properly marked with [Skipped:Disconnected], no IPv4 hardcoding, uses only cluster-internal services, no external connectivity.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@openshift-ci openshift-ci Bot requested review from deads2k and p0lyn0mial May 18, 2026 05:00
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@test/extended/cli/setimage.go`:
- Around line 112-119: The PollImmediate callback around wait.PollImmediate
currently swallows every error by returning (false, nil) for the
oc.Run("set").Args(...).Execute() call, which converts deterministic failures
into a timeout; change the callback to only retry on known transient errors
(e.g., temporary network/service unavailability or 5xx), otherwise return
(false, err) so the real error surfaces, or at minimum capture the last execute
error into a local lastErr and return it from the poll when it expires; update
both occurrences that wrap oc.Run("set").Args("image", "pods,dc",
\"*=ruby:3.3-ubi8\", \"--all\", \"--source=imagestreamtag\").Execute() inside
wait.PollImmediate to implement this behavior.
🪄 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: 5a33635d-dba9-4648-8877-f0b87578e309

📥 Commits

Reviewing files that changed from the base of the PR and between 38c4fba and bf978be.

📒 Files selected for processing (2)
  • test/extended/cli/setimage.go
  • test/extended/util/search_latest_image.go
💤 Files with no reviewable changes (1)
  • test/extended/util/search_latest_image.go

Comment thread test/extended/cli/setimage.go
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor Author

@coderabbitai approve

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

@YamunadeviShanmugam: I'll approve this PR now.

✅ Actions performed

Comments resolved and changes approved.

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label May 18, 2026
@ardaguclu
Copy link
Copy Markdown
Member

Thank you
/lgtm
When you see green CI runs, you can add verified tag via /verified by CI

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, petr-muller, YamunadeviShanmugam

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2026
@ardaguclu
Copy link
Copy Markdown
Member

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 18, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@ardaguclu: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 38c4fba and 2 for PR HEAD bf978be in total

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor Author

/retest

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor Author

YamunadeviShanmugam commented May 18, 2026

The CI is failing to acquire resource , retesting again

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor Author

/retest

@ardaguclu
Copy link
Copy Markdown
Member

I think ci/prow/e2e-metal-ipi-ovn-ipv6 is permanently failing. We can retest after some time

@openshift-trt
Copy link
Copy Markdown

openshift-trt Bot commented May 18, 2026

Job Failure Risk Analysis for sha: bf978be

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6 IncompleteTests
Tests for this run (21) are below the historical average (2754): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@jubittajohn
Copy link
Copy Markdown
Contributor

/retest

ci/prow/e2e-metal-ipi-ovn-ipv6 is now fixed https://redhat-internal.slack.com/archives/C01CQA76KMX/p1779100613010489?thread_ts=1778878717.375669&cid=C01CQA76KMX

@jubittajohn
Copy link
Copy Markdown
Contributor

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@YamunadeviShanmugam: 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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 0af120a into openshift:main May 18, 2026
21 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@YamunadeviShanmugam: Jira Issue Verification Checks: Jira Issue OCPBUGS-85363
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-85363 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

Reverts #31152, the PR had removed the timeout which is causing race condition, will open a new PR with all the changes that is needed, reverting the PR for unblocking the CI for other PRs.

Summary by CodeRabbit

  • Tests
  • Updated CLI oc set image extended tests to use polling for imagestreamtags readiness, improving reliability in disconnected environments.
  • Simplified test validation with direct string matching instead of complex digest parsing.
  • Marked applicable tests to skip in disconnected scenarios.
  • Removed legacy image lookup helper function.

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 openshift-eng/jira-lifecycle-plugin repository.

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. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants