Skip CSV relatedImages check for universal training images#926
Conversation
Universal training images (th06) are no longer listed in the operator CSV spec.relatedImages. Skip the CSV verification for these images while still checking prefix and SHA digest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes CWE-697 / test integrity concern — hardcoded substring bypass. The string
Direct questions to answer before merging:
🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
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 `@tests/trainer/cluster_training_runtimes_test.go`:
- Around line 301-305: The substring matching in the condition using
strings.Contains(image, "/odh-th06-") is overly broad and could allow an
attacker-controlled path containing the substring /odh-th06- anywhere in the
image URL to bypass the CSV relatedImages validation. Replace the substring
matching with a more precise check that validates the actual image name prefix
(the portion after the last slash in the image URL) rather than matching an
arbitrary substring anywhere in the full URL path. This ensures only legitimate
universal images with the th06 designation skip the validation check.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 2084d34e-3889-4e37-b31b-5e26376e1386
📒 Files selected for processing (1)
tests/trainer/cluster_training_runtimes_test.go
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ChughShilpa, sutaakar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2241bf3
into
opendatahub-io:main
Summary
spec.relatedImagesverification for universal training images (odh-th06-*) inTestRunTrainJobWithDefaultClusterTrainingRuntimes, as these images are no longer listed in the operator CSVodh-training-*) continue to be verified against CSV relatedImagesTest plan
TestRunTrainJobWithDefaultClusterTrainingRuntimeswith fix — all 5 unique runtimes passodh-th06-cuda130-torch210-py312not in CSV)odh-training-cuda128-torch29-py312,odh-training-rocm64-torch29-py312) still checked against CSV🤖 Generated with Claude Code
Summary by CodeRabbit