Skip to content

ROX-32487 Add RHCOS 10 integration tests for OCP 4.22+#3152

Open
robbycochran wants to merge 4 commits intomasterfrom
rc-add-rhcos10
Open

ROX-32487 Add RHCOS 10 integration tests for OCP 4.22+#3152
robbycochran wants to merge 4 commits intomasterfrom
rc-add-rhcos10

Conversation

@robbycochran
Copy link
Collaborator

@robbycochran robbycochran commented Mar 25, 2026

Summary

  • Updated fetch_ocp_rhcos_bootimage.sh to support an optional rhel-variant argument (e.g., rhel-9, rhel-10). OCP 4.22+ splits RHCOS boot images into coreos-rhel-9.json and coreos-rhel-10.json instead of the single rhcos.json used by earlier releases. The script remains backward compatible for older OCP versions.
  • Consolidated RHCOS image list to one image per RHEL minor version, keeping the newest OCP release for each track:

rhcos (x86_64)

RHEL OCP VM name prefix
10.2 4.22 ci-rhcos-10-2-20260-
9.6 4.22 ci-rhcos-9-6-202510-
9.4 4.18 ci-rhcos-418-94-202-
9.2 4.14 ci-rhcos-414-92-202-
8.6 4.12 ci-rhcos-412-86-202-

rhcos-arm64

RHEL OCP VM name prefix
10.2 4.22 ci-rhcos-10-2-20260-
9.6 4.22 ci-rhcos-9-6-202510-
9.4 4.18 ci-rhcos-418-94-202-

Test plan

  • Verified fetch_ocp_rhcos_bootimage.sh resolves all images correctly with both old and new URL formats
  • CI integration tests pass on RHCOS VMs (including new RHEL 10 images)

🤖 Generated with Claude Code

robbycochran and others added 2 commits March 25, 2026 09:04
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>
@robbycochran robbycochran requested a review from a team as a code owner March 25, 2026 19:06
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive and addresses the template requirements, including a clear summary of changes, a detailed consolidated RHCOS image list, and a test plan with verification steps completed.
Title check ✅ Passed The title accurately describes the main objective of the PR: adding RHCOS 10 integration tests for OCP 4.22+, which aligns with the changes made to support RHEL 10 images in the configuration and script updates.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rc-add-rhcos10

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.38%. Comparing base (ec207af) to head (11d303a).
⚠️ Report is 19 commits behind head on master.
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
collector-unit-tests 27.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between c8c0181 and 8faad73.

📒 Files selected for processing (2)
  • ansible/group_vars/all.yml
  • ansible/scripts/fetch_ocp_rhcos_bootimage.sh

robbycochran and others added 2 commits March 25, 2026 12:29
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>
@robbycochran robbycochran changed the title Add RHCOS 10 integration tests for OCP 4.22+ ROX-32487 Add RHCOS 10 integration tests for OCP 4.22+ Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants