Skip to content

OCPBUGS-85363: Fixed flakiness of oc set image E2E tests#31191

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

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

Conversation

@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor

@YamunadeviShanmugam YamunadeviShanmugam commented May 19, 2026

Followup of #31152
c set image e2e test fails consistently in CI due to a dependency on the ImageStream. The test attempts to use the ruby:3.3-ubi8 ImageStream, which must be imported from an external registry. If the Samples Operator is disabled, or external network access is restricted or slow the tests starts failing introducing flakiness in the tests. The test enters a retry loop waiting for the image metadata to populate and hits a 2-minute timeout

Modified the tests to use a Payload Image instead of a sample image. By switching to a payload-backed reference, the test eliminates external dependencies and avoids synchronization delays, and the flakiness will be removed.

Testing
Before Fix

imagestream.image.openshift.io/wildfly created
STEP: waiting for created resources to be ready for testing @ 05/10/26 11:20:31.866
I0510 11:20:33.025181 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --kubeconfig=/tmp/configfile1940459752 get imagestreamtags ruby:3.3-ubi8:
StdOut>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
StdErr>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found

Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
NAME IMAGE REFERENCE UPDATED
ruby:3.3-ubi8 image-registry.openshift-image-registry.svc:5000/e2e-test-oc-set-image-2j5qn/ruby@sha256:0dab4f10d5038f00f4eaa6167ab75ec3dec9928ca2d9e77606ff39dfb4749854 2 seconds ago
STEP: testing --local flag validation @ 05/10/26 11:20:35.013
I0510 11:20:35.112917 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --k

After Fix

    STEP: creating test deployment, pod, and image stream @ 05/19/26 09:06:05.206
  deployment.apps/test-deployment created
  pod/hello-openshift created
  imagestream.image.openshift.io/httpd created
  imagestream.image.openshift.io/jenkins created
  imagestream.image.openshift.io/mariadb created
  imagestream.image.openshift.io/mongodb created
  imagestream.image.openshift.io/mysql created
  imagestream.image.openshift.io/nginx created
  imagestream.image.openshift.io/nodejs created
  imagestream.image.openshift.io/perl created
  imagestream.image.openshift.io/php created
  imagestream.image.openshift.io/postgresql created
  imagestream.image.openshift.io/python created
  imagestream.image.openshift.io/redis created
  imagestream.image.openshift.io/ruby created
  imagestream.image.openshift.io/wildfly created
    STEP: testing --local flag validation @ 05/19/26 09:06:12.754
  I0519 09:06:12.857635 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:latest --local:
  StdOut>
  error: you must specify resources by --filename when --local is set.
  Example resource specifications include:
     '-f rsrc.yaml'
     '--filename=rsrc.json'
  StdErr>
  error: you must specify resources by --filename when --local is set.
  Example resource specifications include:
     '-f rsrc.yaml'
     '--filename=rsrc.json'

    STEP: testing --dry-run=client with -o flags @ 05/19/26 09:06:12.857
    STEP: testing basic image updates @ 05/19/26 09:06:15.599
  deployment.apps/test-deployment image updated
    STEP: repeating basic image updates to ensure nothing changed @ 05/19/26 09:06:18.461

    STEP: testing invalid image tags @ 05/19/26 09:06:20.771
  I0519 09:06:22.492397 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=istag:
  StdOut>
  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
  StdErr>
  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found

  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
  I0519 09:06:23.791826 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=isimage:
  StdOut>
  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
  StdErr>
  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>

  error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
    STEP: setting a different, valid image on deployment @ 05/19/26 09:06:23.792
  deployment.apps/test-deployment image updated
    STEP: setting a different, valid image on pod @ 05/19/26 09:06:26.125
  pod/hello-openshift image updated
    STEP: setting a different, valid image tag on pod @ 05/19/26 09:06:29.719
  pod/hello-openshift image updated
    STEP: setting a different, valid image on multiple resources @ 05/19/26 09:06:33.366

As the new tests will work on air-gapped clusters as well, removed the skipped:disconnected in the test

Summary by CodeRabbit

  • Tests
    • Enhanced CLI image resolution testing with automated latest image discovery and SHA256 digest validation.
    • Improved polling mechanisms for better test reliability and asynchronous handling.

@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 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown

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

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

Details

In response to this:

Followup of #31152
c set image e2e test fails consistently in CI due to a dependency on the ImageStream. The test attempts to use the ruby:3.3-ubi8 ImageStream, which must be imported from an external registry. If the Samples Operator is disabled, or external network access is restricted or slow the tests starts failing introducing flakiness in the tests. The test enters a retry loop waiting for the image metadata to populate and hits a 2-minute timeout

Modified the tests to use a Payload Image instead of a sample image. By switching to a payload-backed reference, the test eliminates external dependencies and avoids synchronization delays, and the flakiness will be removed.

Testing
Before Fix

imagestream.image.openshift.io/wildfly created
STEP: waiting for created resources to be ready for testing @ 05/10/26 11:20:31.866
I0510 11:20:33.025181 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --kubeconfig=/tmp/configfile1940459752 get imagestreamtags ruby:3.3-ubi8:
StdOut>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
StdErr>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found

Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
NAME IMAGE REFERENCE UPDATED
ruby:3.3-ubi8 image-registry.openshift-image-registry.svc:5000/e2e-test-oc-set-image-2j5qn/ruby@sha256:0dab4f10d5038f00f4eaa6167ab75ec3dec9928ca2d9e77606ff39dfb4749854 2 seconds ago
STEP: testing --local flag validation @ 05/10/26 11:20:35.013
I0510 11:20:35.112917 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --k

After Fix

   STEP: creating test deployment, pod, and image stream @ 05/19/26 09:06:05.206
 deployment.apps/test-deployment created
 pod/hello-openshift created
 imagestream.image.openshift.io/httpd created
 imagestream.image.openshift.io/jenkins created
 imagestream.image.openshift.io/mariadb created
 imagestream.image.openshift.io/mongodb created
 imagestream.image.openshift.io/mysql created
 imagestream.image.openshift.io/nginx created
 imagestream.image.openshift.io/nodejs created
 imagestream.image.openshift.io/perl created
 imagestream.image.openshift.io/php created
 imagestream.image.openshift.io/postgresql created
 imagestream.image.openshift.io/python created
 imagestream.image.openshift.io/redis created
 imagestream.image.openshift.io/ruby created
 imagestream.image.openshift.io/wildfly created
   STEP: testing --local flag validation @ 05/19/26 09:06:12.754
 I0519 09:06:12.857635 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:latest --local:
 StdOut>
 error: you must specify resources by --filename when --local is set.
 Example resource specifications include:
    '-f rsrc.yaml'
    '--filename=rsrc.json'
 StdErr>
 error: you must specify resources by --filename when --local is set.
 Example resource specifications include:
    '-f rsrc.yaml'
    '--filename=rsrc.json'

   STEP: testing --dry-run=client with -o flags @ 05/19/26 09:06:12.857
   STEP: testing basic image updates @ 05/19/26 09:06:15.599
 deployment.apps/test-deployment image updated
   STEP: repeating basic image updates to ensure nothing changed @ 05/19/26 09:06:18.461

   STEP: testing invalid image tags @ 05/19/26 09:06:20.771
 I0519 09:06:22.492397 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=istag:
 StdOut>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
 StdErr>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found

 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
 I0519 09:06:23.791826 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=isimage:
 StdOut>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
 StdErr>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>

 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
   STEP: setting a different, valid image on deployment @ 05/19/26 09:06:23.792
 deployment.apps/test-deployment image updated
   STEP: setting a different, valid image on pod @ 05/19/26 09:06:26.125
 pod/hello-openshift image updated
   STEP: setting a different, valid image tag on pod @ 05/19/26 09:06:29.719
 pod/hello-openshift image updated
   STEP: setting a different, valid image on multiple resources @ 05/19/26 09:06:33.366

As the new tests will work on air-gapped clusters as well, removed the skipped:disconnected in the test

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

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: 4df26f35-decf-4dbf-b7a0-cdfd790bf013

📥 Commits

Reviewing files that changed from the base of the PR and between b593152 and 0934f35.

📒 Files selected for processing (2)
  • test/extended/cli/setimage.go
  • test/extended/util/search_latest_image.go

Walkthrough

This PR introduces a new SearchLatestImage utility function to dynamically resolve OpenShift image digests and updates two test cases in setimage.go to use digest-based image validation instead of hardcoded images and substring matching. Polling is updated to context-based calls.

Changes

CLI Image Resolution with Digest Discovery

Layer / File(s) Summary
SearchLatestImage utility function
test/extended/util/search_latest_image.go
New public function that validates the image name, queries ImageStreamTags for the :latest tag in the openshift namespace, extracts and returns the resolved DockerImageReference, with error handling for empty inputs, API failures, and missing references.
Test infrastructure and helpers
test/extended/cli/setimage.go
Adds strings import, openshiftCLIImageStreamTag constant, trimmedGetJSONPath helper to execute oc get with jsonpath output trimming, and expectResolvedCLIImage helper to assert that resolved images contain the expected @sha256: digest.
First test case: pods and deployments image updates
test/extended/cli/setimage.go
Discovers the latest CLI digest, validates --local and --dry-run=client behaviors, performs basic image updates with the new image source, switches from wait.PollImmediate to wait.PollUntilContextTimeout, and replaces registry prefix substring checks with digest-based validation.
Second test case: multi-resource image updates
test/extended/cli/setimage.go
Applies the same digest discovery and validation pattern to multi-resource updates, replaces hardcoded ruby:3.3-ubi8 with openshiftCLIImageStreamTag, updates invalid tag test input to a non-existent openshift/cli tag, and asserts resolved images via digest matching.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • openshift/origin#31188: Inverse changes to the same test and utility files; main PR adds SearchLatestImage and switches to digest-based validation while the related PR removes the digest helper and reverts to substring checks.

Suggested labels

jira/valid-bug, jira/valid-reference, ready-for-human-review

Suggested reviewers

  • petr-muller
  • deads2k
🚥 Pre-merge checks | ✅ 10 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning Missing resource cleanup, no assertion messages (40+ assertions), and two ~100-line duplicate test functions testing same behavior. Add defer cleanup for resources. Add context messages to error assertions. Consolidate or parameterize duplicate test functions.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically references the bug (OCPBUGS-85363), the component being fixed (oc set image E2E tests), and the issue being addressed (flakiness), matching the changeset which updates test code to fix flakiness.
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 contain only static, descriptive text with no dynamic information. No pod names, timestamps, UUIDs, IPs, or generated identifiers found. Test names are stable and deterministic.
Microshift Test Compatibility ✅ Passed Tests properly protected with [apigroup:image.openshift.io] tags. MicroShift CI automatically skips tests with unsupported API groups.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Tests do not make multi-node assumptions. All resources use 1 replica, no affinity/topology constraints, and pods can coexist on single node. SNO-compatible deployment.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only E2E test code, not deployment manifests or operator code. No scheduling constraints are introduced. The check does not apply to test infrastructure.
Ote Binary Stdout Contract ✅ Passed No stdout contract violations found. setimage.go has klog.Warningf only in test blocks. search_latest_image.go has no stdout writes. Both files comply with OTE binary stdout requirements.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Test has no IPv4 assumptions, IPv6 incompatibilities, or external connectivity requirements. Uses cluster-internal APIs and payload images. PR improves disconnected compatibility.

✏️ 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 19, 2026 03:47
@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 19, 2026
@YamunadeviShanmugam
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@YamunadeviShanmugam: This pull request references Jira Issue OCPBUGS-85363, which is valid. The bug has been moved to the POST state.

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 ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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

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

/retest

@gangwgr
Copy link
Copy Markdown
Contributor

gangwgr commented May 21, 2026

/lgtm
/verified by ci runs

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

@gangwgr: This PR has been marked as verified by ci runs.

Details

In response to this:

/lgtm
/verified by ci runs

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 openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2026
@sosiouxme
Copy link
Copy Markdown
Member

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gangwgr, sosiouxme, 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 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 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 6b0e05a into openshift:main May 21, 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:

Followup of #31152
c set image e2e test fails consistently in CI due to a dependency on the ImageStream. The test attempts to use the ruby:3.3-ubi8 ImageStream, which must be imported from an external registry. If the Samples Operator is disabled, or external network access is restricted or slow the tests starts failing introducing flakiness in the tests. The test enters a retry loop waiting for the image metadata to populate and hits a 2-minute timeout

Modified the tests to use a Payload Image instead of a sample image. By switching to a payload-backed reference, the test eliminates external dependencies and avoids synchronization delays, and the flakiness will be removed.

Testing
Before Fix

imagestream.image.openshift.io/wildfly created
STEP: waiting for created resources to be ready for testing @ 05/10/26 11:20:31.866
I0510 11:20:33.025181 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --kubeconfig=/tmp/configfile1940459752 get imagestreamtags ruby:3.3-ubi8:
StdOut>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
StdErr>
Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found

Error from server (NotFound): imagestreamtags.image.openshift.io "ruby:3.3-ubi8" not found
NAME IMAGE REFERENCE UPDATED
ruby:3.3-ubi8 image-registry.openshift-image-registry.svc:5000/e2e-test-oc-set-image-2j5qn/ruby@sha256:0dab4f10d5038f00f4eaa6167ab75ec3dec9928ca2d9e77606ff39dfb4749854 2 seconds ago
STEP: testing --local flag validation @ 05/10/26 11:20:35.013
I0510 11:20:35.112917 2599393 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2j5qn --k

After Fix

   STEP: creating test deployment, pod, and image stream @ 05/19/26 09:06:05.206
 deployment.apps/test-deployment created
 pod/hello-openshift created
 imagestream.image.openshift.io/httpd created
 imagestream.image.openshift.io/jenkins created
 imagestream.image.openshift.io/mariadb created
 imagestream.image.openshift.io/mongodb created
 imagestream.image.openshift.io/mysql created
 imagestream.image.openshift.io/nginx created
 imagestream.image.openshift.io/nodejs created
 imagestream.image.openshift.io/perl created
 imagestream.image.openshift.io/php created
 imagestream.image.openshift.io/postgresql created
 imagestream.image.openshift.io/python created
 imagestream.image.openshift.io/redis created
 imagestream.image.openshift.io/ruby created
 imagestream.image.openshift.io/wildfly created
   STEP: testing --local flag validation @ 05/19/26 09:06:12.754
 I0519 09:06:12.857635 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:latest --local:
 StdOut>
 error: you must specify resources by --filename when --local is set.
 Example resource specifications include:
    '-f rsrc.yaml'
    '--filename=rsrc.json'
 StdErr>
 error: you must specify resources by --filename when --local is set.
 Example resource specifications include:
    '-f rsrc.yaml'
    '--filename=rsrc.json'

   STEP: testing --dry-run=client with -o flags @ 05/19/26 09:06:12.857
   STEP: testing basic image updates @ 05/19/26 09:06:15.599
 deployment.apps/test-deployment image updated
   STEP: repeating basic image updates to ensure nothing changed @ 05/19/26 09:06:18.461

   STEP: testing invalid image tags @ 05/19/26 09:06:20.771
 I0519 09:06:22.492397 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=istag:
 StdOut>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
 StdErr>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found

 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream tag "cli:notarealtagfortest": imagestreamtags.image.openshift.io "cli:notarealtagfortest" not found
 I0519 09:06:23.791826 143805 client.go:1094] Error running oc --namespace=e2e-test-oc-set-image-2gpj9 --kubeconfig=/tmp/configfile966531697 set image deployment/test-deployment ruby-helloworld=openshift/cli:notarealtagfortest --source=isimage:
 StdOut>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
 StdErr>
 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>

 error: unable to resolve image "openshift/cli:notarealtagfortest" for container "ruby-helloworld": failed to get image stream image "cli:notarealtagfortest": ImageStreamImages must be retrieved with <name>@<id>
   STEP: setting a different, valid image on deployment @ 05/19/26 09:06:23.792
 deployment.apps/test-deployment image updated
   STEP: setting a different, valid image on pod @ 05/19/26 09:06:26.125
 pod/hello-openshift image updated
   STEP: setting a different, valid image tag on pod @ 05/19/26 09:06:29.719
 pod/hello-openshift image updated
   STEP: setting a different, valid image on multiple resources @ 05/19/26 09:06:33.366

As the new tests will work on air-gapped clusters as well, removed the skipped:disconnected in the test

Summary by CodeRabbit

  • Tests
  • Enhanced CLI image resolution testing with automated latest image discovery and SHA256 digest validation.
  • Improved polling mechanisms for better test reliability and asynchronous handling.

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.

4 participants