Skip to content

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

Open
robbycochran wants to merge 6 commits into
masterfrom
rc-add-rhcos10
Open

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

Conversation

@robbycochran

@robbycochran robbycochran commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

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.
  • Added RHCOS 10 and OCP 4.20 images to the integration test matrix, covering all OCP releases with extended support:

rhcos (x86_64)

RHEL OCP
10.2 4.22
9.6 4.22
9.6 4.20
9.4 4.18
9.4 4.16
9.2 4.14
8.6 4.12

rhcos-arm64

RHEL OCP
10.2 4.22
9.6 4.22
9.6 4.20
9.4 4.18
9.4 4.16

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)
    All rhcos jobs on CI pass for x86
    All rhcos jobs on CI pass for fcarm64

@robbycochran robbycochran requested a review from a team as a code owner March 25, 2026 19:06
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown
🚥 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.
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.
Description check ✅ Passed The PR description provides a clear summary, comprehensive test plan with verification results, and detailed tables of tested image configurations.

✏️ 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

codecov-commenter commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.34%. Comparing base (8b42e7a) to head (6feb165).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3152   +/-   ##
=======================================
  Coverage   27.34%   27.34%           
=======================================
  Files          95       95           
  Lines        5420     5420           
  Branches     2545     2545           
=======================================
  Hits         1482     1482           
  Misses       3211     3211           
  Partials      727      727           
Flag Coverage Δ
collector-unit-tests 27.34% <ø> (ø)

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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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

Comment thread ansible/scripts/fetch_ocp_rhcos_bootimage.sh
@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
Comment thread ansible/group_vars/all.yml

@Molter73 Molter73 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

robbycochran and others added 5 commits June 16, 2026 10:00
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>
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>
4.16 still has extended support and should not have been removed.
4.20 is a current release that should be covered as well.
@robbycochran

Copy link
Copy Markdown
Collaborator Author

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?

Added 4.16 back, with comment for now on when support ends.

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.

3 participants