ROX-32487 Add RHCOS 10 integration tests for OCP 4.22+#3152
ROX-32487 Add RHCOS 10 integration tests for OCP 4.22+#3152robbycochran wants to merge 4 commits intomasterfrom
Conversation
OCP 4.22+ splits RHCOS boot images into separate files by RHEL version (coreos-rhel-9.json and coreos-rhel-10.json) instead of the single rhcos.json used by earlier releases. Update fetch_ocp_rhcos_bootimage.sh to accept an optional rhel-variant argument that selects the correct JSON file, while remaining backward compatible for older OCP versions. Consolidate the RHCOS image list to one image per RHEL minor version, keeping the newest OCP release for each track: - RHEL 10.2 (OCP 4.22), RHEL 9.6 (OCP 4.22), RHEL 9.4 (OCP 4.18), RHEL 9.2 (OCP 4.14), RHEL 8.6 (OCP 4.12) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3152 +/- ##
=======================================
Coverage 27.38% 27.38%
=======================================
Files 95 95
Lines 5427 5427
Branches 2548 2548
=======================================
Hits 1486 1486
Misses 3214 3214
Partials 727 727
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ansible/scripts/fetch_ocp_rhcos_bootimage.sh`:
- Around line 17-21: The script constructs URL based on RHEL_VARIANT into the
variable URL but does not validate the HTTP response or JSON before extracting
the image name; update the fetch/parse sequence that consumes URL to (1) use a
strict HTTP fetch (curl/wget with fail and show-error flags) and check the HTTP
status, (2) validate the response is valid JSON (e.g., pipe to jq --exit-status)
and that the expected image field/key exists and is non-empty, and (3) if any
check fails, print a clear error referencing URL and exit non‑zero so the script
fails fast instead of producing an empty image value; locate the fetch/parse
code that reads URL and the variable name holding the image to apply these
checks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 11d7f97a-5e1c-4bc3-a316-40e76358b373
📒 Files selected for processing (2)
ansible/group_vars/all.ymlansible/scripts/fetch_ocp_rhcos_bootimage.sh
For OCP 4.22+ where images are fetched via the split coreos-rhel-*.json format, embed the OCP version into the VM display name so VMs are easily distinguishable (e.g., ci-rhcos-422-10-2-2-<hash> instead of ci-rhcos-10-2-20260-<hash>). The script now outputs display_name|gcp_image when a variant is specified, and by-image.yml splits on '|' to use the display name for VM naming while using the actual GCP image name for the image lookup. For old-style entries without '|', behavior is unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit c23caaa.
| - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}" | ||
| - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}" | ||
| - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}" | ||
| - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}" |
There was a problem hiding this comment.
Why are we removing 4.16? It is still has extended support as per https://access.redhat.com/support/policy/updates/openshift#dates
Molter73
left a comment
There was a problem hiding this comment.
Looks fine, just wondering why we are removing 4.16 since it still has extended support. Also, should we add 4.20 to the test matrix?
Summary
fetch_ocp_rhcos_bootimage.shto support an optionalrhel-variantargument (e.g.,rhel-9,rhel-10). OCP 4.22+ splits RHCOS boot images intocoreos-rhel-9.jsonandcoreos-rhel-10.jsoninstead of the singlerhcos.jsonused by earlier releases. The script remains backward compatible for older OCP versions.rhcos (x86_64)
ci-rhcos-10-2-20260-ci-rhcos-9-6-202510-ci-rhcos-418-94-202-ci-rhcos-414-92-202-ci-rhcos-412-86-202-rhcos-arm64
ci-rhcos-10-2-20260-ci-rhcos-9-6-202510-ci-rhcos-418-94-202-Test plan
fetch_ocp_rhcos_bootimage.shresolves all images correctly with both old and new URL formats🤖 Generated with Claude Code