Skip to content

NO-ISSUE: Fix latest RHOCP logic after 4.22 GA#6862

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pmtk:fix-latest-rhocp-logic-after-4.22-ga
Jun 11, 2026
Merged

NO-ISSUE: Fix latest RHOCP logic after 4.22 GA#6862
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pmtk:fix-latest-rhocp-logic-after-4.22-ga

Conversation

@pmtk

@pmtk pmtk commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Improved repository configuration and version-detection in build scripts to handle major.minor versioning and cross-major fallbacks when enabling repos.
    • Standardized helper script output for subscription and beta repo lookups so repo identifiers now report combined major.minor tokens and beta outputs use a single URL,version token.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Two shell scripts update RHOCP repository detection and configuration: get-latest-rhocp-repo.sh changes output to major.minor (or url,major.minor for beta), and configure-vm.sh accepts the new format, adds cross-major fallback logic, and enables prior rhocp repos accordingly.

Changes

RHOCP Version Output and Repository Configuration

Layer / File(s) Summary
RHOCP version output format
scripts/get-latest-rhocp-repo.sh
Output and header docs updated: subscription repos now emit major.minor; beta mirrors emit url,major.minor (replacing previous separate major/minor fields).
Repository configuration with new version format
scripts/devenv-builder/configure-vm.sh
Makefile.version parsing removed; regex changed to accept major.minor; added last_minor_for_major map and get_prev_version() helper; enables Y-1 (and Y-2 fallback) rhocp repos computed from the new format; beta URL parsing adjusted accordingly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels: ready-for-human-review

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR modifies only shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh) with no Ginkgo tests. Codebase shows no Ginkgo framework usage. Check not applicable.
Test Structure And Quality ✅ Passed PR contains only shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh), not Ginkgo test code. Check is not applicable.
Microshift Test Compatibility ✅ Passed PR only modifies shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh) used for VM/repo configuration. No Ginkgo e2e tests are added, so the MicroShift test compatibility check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh) only. No Ginkgo e2e tests are added, so SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only shell scripts for repository/version management with no Kubernetes manifests, operators, or scheduling constraints; topology-aware check does not apply.
Ote Binary Stdout Contract ✅ Passed PR modifies only shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh), not Go OTE binaries. The OTE Binary Stdout Contract check applies exclusively to Go test binaries that communicate with o...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR modifies only shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh), not Ginkgo e2e tests. Check applies only to new Go test files.
No-Weak-Crypto ✅ Passed No weak cryptographic usage found. Both modified files are shell scripts for repository and system configuration with no cryptographic operations.
Container-Privileges ✅ Passed PR modifies only bash shell scripts (configure-vm.sh, get-latest-rhocp-repo.sh) for repository management. No container or Kubernetes manifests are present or modified, making the container-privile...
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data exposure found. Changes only log public OpenShift mirror URLs, version numbers, and GitHub URLs without credentials.
Title check ✅ Passed The title accurately describes the main changes: refactoring RHOCP version handling logic after 4.22 GA release across both scripts.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from ggiguash and vanhalenar June 11, 2026 08:01
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/get-latest-rhocp-repo.sh (1)

26-41: ⚡ Quick win

Duplicated logic with configure-vm.sh.

Both LAST_MINOR_FOR_MAJOR map (Line 27 here, Line 197 in configure-vm.sh) and get_prev_version() function (Lines 31-41 here, Lines 201-211 in configure-vm.sh) are duplicated. When a new major version is released, both files need updating.

Consider extracting this to a shared helper script sourced by both, or at minimum add a comment noting the duplication.

🤖 Prompt for 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.

In `@scripts/get-latest-rhocp-repo.sh` around lines 26 - 41, The
LAST_MINOR_FOR_MAJOR map and get_prev_version() function are duplicated across
scripts; extract them into a single shared helper (e.g., a new script sourced by
both) to avoid needing parallel updates, or at minimum add a clear TODO comment
linking the duplicate locations; specifically move or centralize the declare -A
LAST_MINOR_FOR_MAJOR and the get_prev_version() function (which sets prev_major
and prev_minor) into the shared helper and update scripts to source that helper
so only one source of truth must be changed when adding a new major version.
🤖 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 `@scripts/devenv-builder/configure-vm.sh`:
- Line 219: The OCP_REPO_NAME assignment uses uname -i which can return
"unknown" on some VMs; change it to use uname -m for consistency with the
earlier usage and upstream script (update the
OCP_REPO_NAME="rhocp-${ver}-for-rhel-9-mirrorbeta-$(uname -i)-rpms" line to use
$(uname -m) so it matches the other occurrences and the get-latest-rhocp-repo.sh
behavior).

---

Nitpick comments:
In `@scripts/get-latest-rhocp-repo.sh`:
- Around line 26-41: The LAST_MINOR_FOR_MAJOR map and get_prev_version()
function are duplicated across scripts; extract them into a single shared helper
(e.g., a new script sourced by both) to avoid needing parallel updates, or at
minimum add a clear TODO comment linking the duplicate locations; specifically
move or centralize the declare -A LAST_MINOR_FOR_MAJOR and the
get_prev_version() function (which sets prev_major and prev_minor) into the
shared helper and update scripts to source that helper so only one source of
truth must be changed when adding a new major version.
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b68f4e41-6a15-477e-b3ad-31c2bc9cc453

📥 Commits

Reviewing files that changed from the base of the PR and between a5cd73e and 63ba33e.

📒 Files selected for processing (2)
  • scripts/devenv-builder/configure-vm.sh
  • scripts/get-latest-rhocp-repo.sh

Comment thread scripts/devenv-builder/configure-vm.sh Outdated
@pmtk pmtk force-pushed the fix-latest-rhocp-logic-after-4.22-ga branch from 63ba33e to c5a97cb Compare June 11, 2026 08:32
@coderabbitai coderabbitai Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jun 11, 2026
@pmtk pmtk changed the title Fix latest RHOCP logic after 4.22 GA NO-ISSUE: Fix latest RHOCP logic after 4.22 GA Jun 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@pmtk: This pull request explicitly references no jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Chores
  • Improved repository configuration and version-detection in build scripts to handle major.minor versioning and cross-major fallbacks when enabling repos.
  • Standardized helper script output for subscription and beta repo lookups so repo identifiers now report combined major.minor tokens and beta outputs use a single URL,version token.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 11, 2026
@agullon

agullon commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@agullon

agullon commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@agullon: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2026
@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon, pmtk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@pmtk: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 492be3e into openshift:main Jun 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants