Fix tekton test image extraction to use Konflux mirrors#3984
Fix tekton test image extraction to use Konflux mirrors#3984dshchedr merged 1 commit intoRedHatQE:mainfrom
Conversation
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces the single-step Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Your deliverable: Test Execution Plan
Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 46 🏁 Script executed: Length of output: 2947 🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 281 🏁 Script executed: Length of output: 3062 🏁 Script executed: Length of output: 2658 🏁 Script executed: Length of output: 118 🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 278 🏁 Script executed: Length of output: 1735 🧠 Learnings used |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/infrastructure/tekton/conftest.py`:
- Around line 119-123: Guard access to the CSV annotation before splitting:
instead of directly indexing
csv_scope_session.instance.metadata.annotations["test-images-nvrs"], fetch the
annotations dict and use .get("test-images-nvrs") (or check for presence) and
raise a clear ValueError if it's missing or empty so tests fail with a helpful
message; then split and iterate the returned string as before and match against
KUBEVIRT_TEKTON_AVAILABLE_TASKS_TEST. Ensure you update the logic near
csv_scope_session and the loop that references
KUBEVIRT_TEKTON_AVAILABLE_TASKS_TEST so an absent or empty annotation produces a
deterministic, descriptive error rather than a KeyError.
- Around line 127-132: The current loop in ImageDigestMirrorSet.get(...) returns
the first mirror containing "konflux-builds", which is nondeterministic;
instead, gather all candidate mirrors from idms.instance.spec.imageDigestMirrors
that contain "konflux-builds", derive their base paths (using the same
mirror.rsplit("/", 1)[0] logic), deduplicate them, sort the list to ensure a
deterministic order, and then select the first entry from that sorted list (or
raise the existing ValueError if empty). Update the code around
ImageDigestMirrorSet.get, the mirror extraction logic, and the return to use
this deterministic selection.
- Around line 118-137: Add concise Google-style docstrings to the three new
fixtures tekton_test_image_name_and_digest, konflux_base_path, and
tekton_test_image: for each fixture include a one-line summary, an Args section
describing any fixture parameters (e.g., csv_scope_session, admin_client) and
what input the fixture reads, and a Returns section describing the exact return
format (e.g., "str: image name and digest in 'name@sha256:...' format", "str:
base mirror path", "str: full pullspec
'<registry>/<path>/<image>@sha256:<digest>'"). Place the docstrings immediately
above each fixture definition and keep them in Google docstring style so
downstream tests/users understand the contract and return formats.
8841bb5 to
175bf38
Compare
##### Short description: spec.version is not a required field in the ClusterServiceVersion schema. If absent, the fixture silently returns None causing unexpected behavior in multiple downstream tests. ##### More details: ##### What this PR does / why we need it: identified during verifying #3984 that we always assume csv has .spec.version , although it exist but since it's optional if it's not there , We should fail early and at right place ##### Which issue(s) this PR fixes: ##### Special notes for reviewer: ##### jira-ticket: <!-- full-ticket-url needs to be provided. This would add a link to the pull request to the jira and close it when the pull request is merged If the task is not tracked by a Jira ticket, just write "NONE". --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced validation to ensure CSV specification version information is properly defined, raising an error if the required version field is missing rather than silently accepting empty values. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Geetika Kapoor <gkapoor@redhat.com>
|
/approve |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-3984 published |
|
/verified |
|
/check-can-merge |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Your deliverable: Test Execution Plan
Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 1735 🧠 Learnings used |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-3984. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
|
/cherry-pick cnv-4.21 |
|
/cherry-pick cnv-4.20 |
|
Cherry-picked PR Fix tekton test image extraction to use Konflux mirrors into cnv-4.21 |
|
Cherry-picked PR Fix tekton test image extraction to use Konflux mirrors into cnv-4.20 |
|
/cherry-pick cnv-4.19 |
|
/cherry-pick cnv-4.18 |
|
Cherry-picked PR Fix tekton test image extraction to use Konflux mirrors into cnv-4.19 |
|
Cherry-picked PR Fix tekton test image extraction to use Konflux mirrors into cnv-4.18 |
Short description:
tekton test image kubevirt-tekton-tasks-tests was previously pulled from Brew. With the move to Konflux builds, the Brew path no longer hosts these images causing Tekton pipeline tests to fail during image extraction. These image carry pipeline definitions.
More details:
we don't ship test-nvrs so they can never be part of external registry. Accessing them through konflux is only solution as discussed by CI team.
What this PR does / why we need it:
small PR change to point to right konflux builds dynamically from ImageDigestMirrorSet resources on the cluster
Which issue(s) this PR fixes:
Special notes for reviewer:
this will fix all tier3 lanes
jira-ticket:
Summary by CodeRabbit