Skip to content

OCPNODE-2994: Add ArtifactVolume tests and register artifact image#31017

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
bitoku:atokubi/oci-artifact-volume-tests
Apr 30, 2026
Merged

OCPNODE-2994: Add ArtifactVolume tests and register artifact image#31017
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
bitoku:atokubi/oci-artifact-volume-tests

Conversation

@bitoku
Copy link
Copy Markdown
Contributor

@bitoku bitoku commented Apr 16, 2026

Refactor ImageVolume tests into a parameterized test suite (imageVolumeTestConfig) and add ArtifactVolume tests using quay.io/crio/artifact:subpath. Register the artifact image in the allowed images list.

Summary by CodeRabbit

  • Tests
    • Refactored image-volume tests into a configurable, parameterized suite that registers separate artifact-volume and image-volume scenarios; switched verification to checking expected paths and generalized subPath handling.
    • Added support for an artifact test image so artifact-volume scenarios can be exercised.
  • Documentation
    • Added a permanent-exception entry clarifying a test artifact is exempt from multi-architecture verification.

@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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 16, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 16, 2026

@bitoku: This pull request references OCPNODE-2994 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Refactor ImageVolume tests into a parameterized test suite (imageVolumeTestConfig) and add ArtifactVolume tests using quay.io/crio/artifact:subpath. Register the artifact image in the allowed images list.

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 requested review from bertinatto and harche April 16, 2026 14:15
@openshift-ci openshift-ci Bot added the e2e-images-update Related to images used by e2e tests label Apr 16, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Walkthrough

Replaced a single hardcoded image-volume test suite with a parameterized generator (imageVolumeTestConfig + describeImageVolumeTests) that registers separate ArtifactVolume and ImageVolume suites; verification shifted to config-driven path checks; added a new allowed test image reference.

Changes

Cohort / File(s) Summary
Test Suite Refactor
test/extended/node/image_volume.go
Added imageVolumeTestConfig, describeImageVolumeTests, verifyPathsExist, and trimSubPath; removed verifyVolumeMounted. Converted the image-volume tests to a config-driven generator that registers two suites (artifact and image) and makes pod names, mount points, verification paths, and subPath behavior configurable.
Image Utilities & Docs
test/extended/util/image/image.go, test/extended/util/image/README.md
Added quay.io/crio/artifact:subpath to allowedImages and documented it as a permanent exception in the README so the test initialization can map and use the artifact image reference.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 10 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% 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 Test code has significant quality issues: verifyPathsExist uses bare ls instead of ls -d, and most assertions lack meaningful failure messages. Fix verifyPathsExist to use ls -d and add descriptive failure messages to all assertions following the required pattern.
✅ 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 identifies the main change: refactoring ImageVolume tests into a parameterized suite and adding ArtifactVolume tests with artifact image registration.
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 test names are static and deterministic with no dynamic content like pod names, timestamps, or node identifiers.
Microshift Test Compatibility ✅ Passed New ArtifactVolume and ImageVolume tests use only standard Kubernetes Pod API and framework utilities without any MicroShift-incompatible OpenShift-specific APIs, multi-node assumptions, or protected namespaces.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The new image volume tests do not make any assumptions incompatible with Single Node OpenShift. The tests run either single pods or multiple pods explicitly scheduled to the same node, with no pod anti-affinity constraints, topology spread constraints, or expectations of node-to-node communication.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only e2e test code in test/extended/node/image_volume.go and test utility configuration. Test Pods use NodeName scheduling with no topology-unfriendly constraints.
Ote Binary Stdout Contract ✅ Passed The pull request introduces no violations of the OTE Binary Stdout Contract. All new test code operates within Ginkgo test case blocks where stdout writes are properly intercepted by the framework.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New tests verify path existence within mounted volumes without IPv4 assumptions or external connectivity requirements; artifact image uses test infrastructure's allowedImages system for disconnected deployment support.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 16, 2026

@bitoku: This pull request references OCPNODE-2994 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Refactor ImageVolume tests into a parameterized test suite (imageVolumeTestConfig) and add ArtifactVolume tests using quay.io/crio/artifact:subpath. Register the artifact image in the allowed images list.

Summary by CodeRabbit

Release Notes

  • Tests
  • Refactored image volume test suite with parameterized configuration for improved maintainability and test coverage
  • Enhanced test infrastructure to support separate artifact volume and image volume test scenarios
  • Extended test image registry to support artifact volume testing

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.

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.

🧹 Nitpick comments (1)
test/extended/node/image_volume.go (1)

194-194: Consider using image.ShellImage() for consistency.

The container image is hardcoded, but the same file imports the image package and uses image.LocationFor() elsewhere. Using image.ShellImage() would be more consistent with the rest of the codebase and more maintainable.

♻️ Suggested change
-				Image:   "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest",
+				Image:   image.ShellImage(),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/node/image_volume.go` at line 194, Replace the hardcoded
container image string in the pod/container spec with the shared helper: change
the Image field that currently uses
"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" to
call image.ShellImage() so the test uses the centralized image helper; update
any imports/usages in test/extended/node/image_volume.go to reference
image.ShellImage() where that Image value is constructed to keep consistency
with image.LocationFor().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/extended/node/image_volume.go`:
- Line 194: Replace the hardcoded container image string in the pod/container
spec with the shared helper: change the Image field that currently uses
"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" to
call image.ShellImage() so the test uses the centralized image helper; update
any imports/usages in test/extended/node/image_volume.go to reference
image.ShellImage() where that Image value is constructed to keep consistency
with image.LocationFor().

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bf5911d6-d5af-4e46-863e-7125d54321aa

📥 Commits

Reviewing files that changed from the base of the PR and between 53cc9e6 and d0c1937.

📒 Files selected for processing (2)
  • test/extended/node/image_volume.go
  • test/extended/util/image/image.go

@bitoku bitoku force-pushed the atokubi/oci-artifact-volume-tests branch from d0c1937 to 19c8537 Compare April 16, 2026 15:21
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 16, 2026

@bitoku: This pull request references OCPNODE-2994 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Refactor ImageVolume tests into a parameterized test suite (imageVolumeTestConfig) and add ArtifactVolume tests using quay.io/crio/artifact:subpath. Register the artifact image in the allowed images list.

Summary by CodeRabbit

  • Tests
  • Refactored the image volume test suite into a parameterized, config-driven flow to register separate artifact-volume and image-volume scenarios.
  • Rewired existing image-volume scenarios to use configurable references and verification steps for broader coverage and maintainability.
  • Added a test artifact image to the test image registry to support artifact-volume scenarios.

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.

@jacobsee
Copy link
Copy Markdown
Member

/retest

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 20, 2026

/payload-job periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-techpreview-multi-a-a periodic-ci-openshift-microshift-release-4.22-periodics-e2e-aws-ovn-ocp-conformance-arm64 periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-libvirt-s390x periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-s2s-libvirt-ppc64le

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 20, 2026

@bitoku: trigger 4 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-techpreview-multi-a-a
  • periodic-ci-openshift-microshift-release-4.22-periodics-e2e-aws-ovn-ocp-conformance-arm64
  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-libvirt-s390x
  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-s2s-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7cc282c0-3cb7-11f1-9123-471f87fcec9e-0

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 20, 2026

/test e2e-gcp-ovn
/test e2e-aws-ovn-fips

@openshift-trt
Copy link
Copy Markdown

openshift-trt Bot commented Apr 20, 2026

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New tests seen in this PR at sha: 19c8537

  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should fail when image does not exist [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should handle multiple image volumes [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed if image volume is not existing but unused [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed with multiple pods and same image on the same node [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed with pod and pull policy of Always [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume when subPath is used should fail to mount image volume with invalid subPath [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume when subPath is used should handle image volume with subPath [Suite:openshift/conformance/parallel]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]

@bitoku bitoku force-pushed the atokubi/oci-artifact-volume-tests branch from 19c8537 to f5a26f5 Compare April 21, 2026 12:02
@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 21, 2026

/payload-job periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-techpreview-multi-a-a periodic-ci-openshift-microshift-release-4.22-periodics-e2e-aws-ovn-ocp-conformance-arm64 periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-libvirt-s390x periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-s2s-libvirt-ppc64le

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2026

@bitoku: trigger 4 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-techpreview-multi-a-a
  • periodic-ci-openshift-microshift-release-4.22-periodics-e2e-aws-ovn-ocp-conformance-arm64
  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-libvirt-s390x
  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-remote-s2s-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/f45ae210-3d79-11f1-92df-c83edea7ea62-0

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 21, 2026

/payload-job periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-arm64

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2026

@bitoku: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-aws-ovn-arm64

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/af63be10-3d7a-11f1-8063-8728b0ec5335-0

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.

🧹 Nitpick comments (1)
test/extended/node/image_volume.go (1)

87-158: Make the generated spec text neutral or config-driven.

In the ArtifactVolume branch, these It(...)/By(...) strings still say "image volume", so the reported spec names and logs become contradictory. Using neutral wording like "configured volume" or deriving the noun from config.describeLabel would make failures much easier to read.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/node/image_volume.go` around lines 87 - 158, The test strings
still hardcode "image volume" making logs/spec names misleading in the
ArtifactVolume branch; update all human-facing test descriptions and g.By
messages in this file (including the It(...) invocations around
buildPodWithImageVolume, buildPodWithMultipleImageVolumes,
buildPodWithImageVolumeSubPath and the g.By(...) calls that mention "image
volume") to use a neutral phrase like "configured volume" or derive the noun
from config.describeLabel (e.g., fmt.Sprintf("%s volume", config.describeLabel))
so the spec names and logs reflect the current config.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/extended/node/image_volume.go`:
- Around line 87-158: The test strings still hardcode "image volume" making
logs/spec names misleading in the ArtifactVolume branch; update all human-facing
test descriptions and g.By messages in this file (including the It(...)
invocations around buildPodWithImageVolume, buildPodWithMultipleImageVolumes,
buildPodWithImageVolumeSubPath and the g.By(...) calls that mention "image
volume") to use a neutral phrase like "configured volume" or derive the noun
from config.describeLabel (e.g., fmt.Sprintf("%s volume", config.describeLabel))
so the spec names and logs reflect the current config.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f89904e2-7b4a-4109-9464-5328ef77e270

📥 Commits

Reviewing files that changed from the base of the PR and between 19c8537 and f5a26f5.

⛔ Files ignored due to path filters (1)
  • test/extended/util/image/zz_generated.txt is excluded by !**/zz_generated*
📒 Files selected for processing (3)
  • test/extended/node/image_volume.go
  • test/extended/util/image/README.md
  • test/extended/util/image/image.go
✅ Files skipped from review due to trivial changes (2)
  • test/extended/util/image/README.md
  • test/extended/util/image/image.go

Comment thread test/extended/node/image_volume.go Outdated
Comment on lines +31 to +33
verifyCmd []string
// verifyCmd2 verifies the second volume in multi-volume tests
verifyCmd2 []string
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not slice of slices?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also it looks like every verify cmd is just ls with the path. maybe pathsToVerify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I separate them because they are called for different purpose.
verifyCmd is for some test cases.
verifyCmd2 is for multiple volumes test.
verifySubPathCmd is for subpath test.
though I'm fine with either way.

No specific reason for having commands. I think it's more obvious that how we verify it, but I don't have opinion about it either.

Having said that, since the field names don't look good and explanatory, I'll change it as you suggested.

Comment thread test/extended/node/image_volume.go Outdated
Refactor ImageVolume tests into a parameterized test suite
(imageVolumeTestConfig) and add ArtifactVolume tests using
quay.io/crio/artifact:subpath. Register the artifact image
in the allowed images list.

Signed-off-by: Ayato Tokubi <atokubi@redhat.com>
@bitoku bitoku force-pushed the atokubi/oci-artifact-volume-tests branch from f5a26f5 to d6472e1 Compare April 27, 2026 17:21
@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 27, 2026

/test e2e-gcp-ovn
/test e2e-aws-ovn-fips

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

🧹 Nitpick comments (1)
test/extended/node/image_volume.go (1)

132-138: Fail fast if pathsToVerify is empty.

Line 135 assumes every suite provides at least one verification path. That is true today, but the shared helper will panic if a future config forgets to set it. A small guard here makes misconfiguration fail clearly.

♻️ Suggested guard
 		g.It("should handle image volume with subPath", func(ctx context.Context) {
+			o.Expect(config.pathsToVerify).NotTo(o.BeEmpty(), "pathsToVerify must be set for subPath tests")
 			ref := config.getVolumeRef(ctx, oc, f.Namespace.Name)
 			// Use the top-level directory of the first path as the subPath
 			subPath := strings.Split(config.pathsToVerify[0], "/")[0]
 			pod := buildPodWithImageVolumeSubPath(f.Namespace.Name, "", podName, ref, subPath)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/node/image_volume.go` around lines 132 - 138, The test assumes
config.pathsToVerify is non-empty and will panic if it's empty; add a fast-fail
guard at the start of the It block to check len(config.pathsToVerify) > 0 and
produce a clear test failure (e.g., call the test framework's fail/skip helper
or t.Fatalf with a message) instead of proceeding; place the guard before
computing subPath and before calling buildPodWithImageVolumeSubPath so failures
point to the missing configuration rather than a runtime panic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/extended/node/image_volume.go`:
- Around line 170-177: In verifyPathsExist, the code uses plain "ls" which lists
directory contents and can return empty stdout for an existing empty directory;
change the command built in args to use "ls -d" (or include the "-d" flag in the
args slice) so each path is listed as an entry; update the invocation that
constructs args in verifyPathsExist (where args := []string{"ls"} and args are
appended with path.Join(mountPoint, p)) to instead start with "ls" and "-d" (or
insert "-d" before the paths) so e2epod.ExecCommandInContainer receives the
directory-checking flag and the stdout emptiness check remains valid.

---

Nitpick comments:
In `@test/extended/node/image_volume.go`:
- Around line 132-138: The test assumes config.pathsToVerify is non-empty and
will panic if it's empty; add a fast-fail guard at the start of the It block to
check len(config.pathsToVerify) > 0 and produce a clear test failure (e.g., call
the test framework's fail/skip helper or t.Fatalf with a message) instead of
proceeding; place the guard before computing subPath and before calling
buildPodWithImageVolumeSubPath so failures point to the missing configuration
rather than a runtime panic.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 45759ca7-fafc-4ea2-9e4a-980182f35807

📥 Commits

Reviewing files that changed from the base of the PR and between f5a26f5 and d6472e1.

⛔ Files ignored due to path filters (1)
  • test/extended/util/image/zz_generated.txt is excluded by !**/zz_generated*
📒 Files selected for processing (3)
  • test/extended/node/image_volume.go
  • test/extended/util/image/README.md
  • test/extended/util/image/image.go
✅ Files skipped from review due to trivial changes (2)
  • test/extended/util/image/README.md
  • test/extended/util/image/image.go

Comment on lines +170 to 177
func verifyPathsExist(f *framework.Framework, pod *v1.Pod, mountPoint string, paths []string) {
args := []string{"ls"}
for _, p := range paths {
args = append(args, path.Join(mountPoint, p))
}
g.By("Verifying paths exist in pod")
stdout := e2epod.ExecCommandInContainer(f, pod.Name, pod.Spec.Containers[0].Name, args...)
o.Expect(stdout).NotTo(o.BeEmpty())
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Apr 27, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use ls -d for path-existence checks.

verifyPathsExist is checking for path existence, but bare ls <dir> lists directory contents instead of the directory itself. That makes an empty directory look like a failure because stdout stays empty even though the path exists.

🐛 Minimal fix
 func verifyPathsExist(f *framework.Framework, pod *v1.Pod, mountPoint string, paths []string) {
-	args := []string{"ls"}
+	args := []string{"ls", "-d"}
 	for _, p := range paths {
 		args = append(args, path.Join(mountPoint, p))
 	}
 	g.By("Verifying paths exist in pod")
 	stdout := e2epod.ExecCommandInContainer(f, pod.Name, pod.Spec.Containers[0].Name, args...)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/node/image_volume.go` around lines 170 - 177, In
verifyPathsExist, the code uses plain "ls" which lists directory contents and
can return empty stdout for an existing empty directory; change the command
built in args to use "ls -d" (or include the "-d" flag in the args slice) so
each path is listed as an entry; update the invocation that constructs args in
verifyPathsExist (where args := []string{"ls"} and args are appended with
path.Join(mountPoint, p)) to instead start with "ls" and "-d" (or insert "-d"
before the paths) so e2epod.ExecCommandInContainer receives the
directory-checking flag and the stdout emptiness check remains valid.

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.

this looks like a good fix.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@rphillips, glad you agree! Here's the fix for clarity — @bitoku, please consider applying this change to test/extended/node/image_volume.go:

func verifyPathsExist(f *framework.Framework, pod *v1.Pod, mountPoint string, paths []string) {
	args := []string{"ls", "-d"}
	for _, p := range paths {
		args = append(args, path.Join(mountPoint, p))
	}
	g.By("Verifying paths exist in pod")
	stdout := e2epod.ExecCommandInContainer(f, pod.Name, pod.Spec.Containers[0].Name, args...)
	o.Expect(stdout).NotTo(o.BeEmpty())
}

Adding -d ensures ls reports each path as an entry rather than listing its contents, so an existing empty directory no longer produces empty stdout and causes a spurious failure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hm but in some cases it's not a directory right?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 28, 2026

@haircommander
Copy link
Copy Markdown
Member

/lgtm

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

bitoku commented Apr 30, 2026

/retest

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 30, 2026

/pipeline required

@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

@openshift-trt
Copy link
Copy Markdown

openshift-trt Bot commented Apr 30, 2026

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New tests seen in this PR at sha: d6472e1

  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should fail when image does not exist [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should handle multiple image volumes [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed if image volume is not existing but unused [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed with multiple pods and same image on the same node [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume should succeed with pod and pull policy of Always [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume when subPath is used should fail to mount image volume with invalid subPath [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]
  • "[sig-node] [FeatureGate:ImageVolume] ArtifactVolume when subPath is used should handle image volume with subPath [Suite:openshift/conformance/parallel]" [Total: 7, Pass: 7, Fail: 0, Flake: 0]

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 30, 2026

/retest

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 30, 2026

/verified by CI

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

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

@jacobsee
Copy link
Copy Markdown
Member

/approve

@bertinatto
Copy link
Copy Markdown
Member

/test ?

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 30, 2026

@bertinatto: The following commands are available to trigger required jobs:

/test e2e-aws-csi
/test e2e-aws-jenkins
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-image-registry
/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-builds
/test e2e-gcp-ovn-image-ecosystem
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi
/test go-verify-deps
/test images
/test lint
/test okd-scos-images
/test unit
/test verify
/test verify-deps
/test verify-image-manifest-lists

The following commands are available to trigger optional jobs:

/test e2e-agnostic-ovn-cmd
/test e2e-aws-disruptive
/test e2e-aws-etcd-certrotation
/test e2e-aws-etcd-recovery
/test e2e-aws-ovn
/test e2e-aws-ovn-cgroupsv2
/test e2e-aws-ovn-edge-zones
/test e2e-aws-ovn-etcd-scaling
/test e2e-aws-ovn-kube-apiserver-rollout
/test e2e-aws-ovn-kubevirt
/test e2e-aws-ovn-serial-fast
/test e2e-aws-ovn-serial-ipsec
/test e2e-aws-ovn-serial-publicnet-1of2
/test e2e-aws-ovn-serial-publicnet-2of2
/test e2e-aws-ovn-single-node
/test e2e-aws-ovn-single-node-serial
/test e2e-aws-ovn-single-node-techpreview
/test e2e-aws-ovn-single-node-techpreview-serial
/test e2e-aws-ovn-single-node-upgrade
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-upgrade-rollback
/test e2e-aws-ovn-upi
/test e2e-aws-proxy
/test e2e-azure
/test e2e-azure-ovn-etcd-scaling
/test e2e-azure-ovn-upgrade
/test e2e-baremetalds-kubevirt
/test e2e-external-aws
/test e2e-external-aws-ccm
/test e2e-external-vsphere-ccm
/test e2e-gcp-disruptive
/test e2e-gcp-fips-serial-1of2
/test e2e-gcp-fips-serial-2of2
/test e2e-gcp-ovn-etcd-scaling
/test e2e-gcp-ovn-kube-apiserver-rollout
/test e2e-gcp-ovn-rt-upgrade
/test e2e-gcp-ovn-techpreview
/test e2e-gcp-ovn-techpreview-serial-1of2
/test e2e-gcp-ovn-techpreview-serial-2of2
/test e2e-gcp-ovn-usernamespace
/test e2e-hypershift-conformance
/test e2e-metal-ipi-ovn
/test e2e-metal-ipi-ovn-bgp-virt-dualstack
/test e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-dualstack-local-gateway
/test e2e-metal-ipi-ovn-kube-apiserver-rollout
/test e2e-metal-ipi-serial-1of2
/test e2e-metal-ipi-serial-2of2
/test e2e-metal-ipi-serial-ovn-ipv6-1of2
/test e2e-metal-ipi-serial-ovn-ipv6-2of2
/test e2e-metal-ipi-virtualmedia
/test e2e-metal-ovn-single-node-live-iso
/test e2e-metal-ovn-single-node-with-worker-live-iso
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-metal-ovn-two-node-fencing-recovery
/test e2e-openstack-dualstack-v6primary
/test e2e-openstack-ovn
/test e2e-openstack-serial
/test e2e-vsphere-ovn-etcd-scaling
/test okd-scos-e2e-aws-ovn

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-origin-main-go-verify-deps
pull-ci-openshift-origin-main-images
pull-ci-openshift-origin-main-lint
pull-ci-openshift-origin-main-okd-scos-images
pull-ci-openshift-origin-main-unit
pull-ci-openshift-origin-main-verify
pull-ci-openshift-origin-main-verify-deps
pull-ci-openshift-origin-main-verify-image-manifest-lists
Details

In response to this:

/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 kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Member

@bertinatto bertinatto left a comment

Choose a reason for hiding this comment

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

/approve

From image perspective

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, bitoku, haircommander, jacobsee

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 Apr 30, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 30, 2026

@bitoku: 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 c12e6ce into openshift:main Apr 30, 2026
22 checks passed
@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented May 1, 2026

/cherry-pick release-4.22

@openshift-cherrypick-robot
Copy link
Copy Markdown

@bitoku: new pull request created: #31108

Details

In response to this:

/cherry-pick release-4.22

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.

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. e2e-images-update Related to images used by e2e tests 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants