Skip to content

USHIFT-6588: Add manage_common_versions.sh script#6663

Open
vanhalenar wants to merge 5 commits into
openshift:mainfrom
vanhalenar:manage-common-versions
Open

USHIFT-6588: Add manage_common_versions.sh script#6663
vanhalenar wants to merge 5 commits into
openshift:mainfrom
vanhalenar:manage-common-versions

Conversation

@vanhalenar
Copy link
Copy Markdown
Contributor

@vanhalenar vanhalenar commented May 13, 2026

Summary by CodeRabbit

  • Chores
    • CI build flow now includes an explicit version verification step prior to worker setup and cache/build continuation, improving consistency of pinned versions across builds.
    • Added a command-line utility to verify and regenerate pinned common-version metadata and to generate metadata for a specified version; includes action-driven commands and built-in help for guided usage.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 13, 2026

@vanhalenar: This pull request references USHIFT-6588 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

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 May 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Walkthrough

Adds a new CLI script test/bin/manage_common_versions.sh with verify and generate actions to centralize generation/verification of test/bin/common_versions.sh. test/bin/ci_phase_iso_build.sh now runs manage_common_versions.sh verify instead of sourcing the prior verification script.

Changes

Version management CLI + build integration

Layer / File(s) Summary
CLI entry, usage, dispatch
test/bin/manage_common_versions.sh
Adds CLI parsing, usage() and dispatch for verify and generate actions.
verify action: detect & enforce generated file parity
test/bin/manage_common_versions.sh, test/bin/pyutils/generate_common_versions.py, scripts/pyutils/create-venv.sh
verify computes a git-diff range against ${SCENARIO_BUILD_BRANCH}^1...HEAD to check test/bin/common_versions.sh, creates a Python venv, runs the generator to (re)create common_versions.sh if needed, and fails if regenerated output still differs.
generate action: explicit generation path
test/bin/manage_common_versions.sh, test/bin/pyutils/generate_common_versions.py, scripts/pyutils/create-venv.sh
generate requires a version argument, creates the venv, and invokes the generator with the provided version and extra options to write test/bin/common_versions.sh.
Build script integration
test/bin/ci_phase_iso_build.sh
Replaces sourcing test/bin/common_versions_verify.sh with invoking "${SCRIPTDIR}/manage_common_versions.sh" verify as the verification step before continuing the CI build flow.
sequenceDiagram
    participant CI as CI job / ci_phase_iso_build.sh
    participant CLI as manage_common_versions.sh
    participant Git as Git (diff)
    participant Venv as create-venv.sh / Python venv
    participant Gen as generate_common_versions.py
    CI->>CLI: run "verify"
    CLI->>Git: git diff base..HEAD check test/bin/common_versions.sh
    alt diff found
        CLI->>Venv: create venv
        Venv->>Gen: run generator -> write common_versions.sh
        Gen->>Git: compare regenerated file
        alt still differs
            CLI-->>CI: exit non-zero (failure)
        else
            CLI-->>CI: success, continue
        end
    else
        CLI-->>CI: success, continue
    end
Loading

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new manage_common_versions.sh script that replaces the prior version-check mechanism.
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 Pull request modifies only Bash shell scripts. No Ginkgo tests present. The check for Ginkgo test name stability is not applicable.
Test Structure And Quality ✅ Passed Custom check for Ginkgo test quality is not applicable. PR contains only bash shell scripts, not Ginkgo/Go test code.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests added in this PR. Changes are shell scripts for CI/build pipeline only, outside the scope of MicroShift test compatibility checks.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only adds shell scripts for CI management, not Ginkgo e2e tests. Custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are CI/test infrastructure scripts only (shell build scripts), not Kubernetes deployment manifests or operator code. No scheduling constraints present.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract applies to compiled test binaries (Go/Java) that output JSON. These are shell script CI utilities, not OTE test binaries. Check is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests are added in this PR. Changes are limited to shell scripts (ci_phase_iso_build.sh and manage_common_versions.sh) for build/CI infrastructure. Check not applicable.

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

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@openshift-ci openshift-ci Bot requested review from agullon and copejon May 13, 2026 10:17
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vanhalenar
Once this PR has been reviewed and has the lgtm label, please assign copejon for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Copy Markdown
Contributor

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/bin/manage_common_versions.sh`:
- Around line 10-13: The git diff invocation is using an unnecessary parent
traversal token (${SCENARIO_BUILD_BRANCH}^1...HEAD) which can misdetect changes;
update the diff command that checks common_versions.sh (the line invoking git
diff --exit-code with ${SCENARIO_BUILD_BRANCH}^1...HEAD and
${ROOTDIR}/test/bin/common_versions.sh) to use ${SCENARIO_BUILD_BRANCH}...HEAD
instead so the three-dot range uses the proper merge-base and accurately detects
PR changes.
🪄 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: 5398172a-090f-4fd2-806f-f6f9acdbfb4a

📥 Commits

Reviewing files that changed from the base of the PR and between 93f2ef4 and 7f9859e.

📒 Files selected for processing (2)
  • test/bin/ci_phase_iso_build.sh
  • test/bin/manage_common_versions.sh

Comment thread test/bin/manage_common_versions.sh
Copy link
Copy Markdown
Contributor

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/bin/ci_phase_iso_build.sh`:
- Around line 184-186: Update the stale ShellCheck source comment to match the
actual sourced script: replace the SC1091 directive that references
common_versions_verify.sh with one that references manage_common_versions.sh
(the file actually sourced via source "${SCRIPTDIR}/manage_common_versions.sh"
verify) so ShellCheck correctly recognizes the sourced file and stops reporting
SC1091; ensure the comment references the same SCRIPTDIR usage as the source
line.
🪄 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: 38201f04-d793-4ab5-bc94-674d99a6db5a

📥 Commits

Reviewing files that changed from the base of the PR and between e9ceb37 and 26f0440.

📒 Files selected for processing (1)
  • test/bin/ci_phase_iso_build.sh

Comment thread test/bin/ci_phase_iso_build.sh Outdated
Copy link
Copy Markdown
Contributor

@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.

♻️ Duplicate comments (1)
test/bin/ci_phase_iso_build.sh (1)

184-184: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a ShellCheck source directive for manage_common_versions.sh.

Line 184 still triggers SC1091 without an explicit source hint.

Suggested fix
+# shellcheck source=test/bin/manage_common_versions.sh
 source "${SCRIPTDIR}/manage_common_versions.sh" verify
🤖 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 `@test/bin/ci_phase_iso_build.sh` at line 184, Add a ShellCheck source
directive above the line that sources manage_common_versions.sh so SC1091 is
silenced: insert a comment like a shellcheck source hint referencing
manage_common_versions.sh immediately before the source
"${SCRIPTDIR}/manage_common_versions.sh" verify line (the line that calls the
script), ensuring ShellCheck can resolve the sourced file.
🤖 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.

Duplicate comments:
In `@test/bin/ci_phase_iso_build.sh`:
- Line 184: Add a ShellCheck source directive above the line that sources
manage_common_versions.sh so SC1091 is silenced: insert a comment like a
shellcheck source hint referencing manage_common_versions.sh immediately before
the source "${SCRIPTDIR}/manage_common_versions.sh" verify line (the line that
calls the script), ensuring ShellCheck can resolve the sourced file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a2445143-641b-4a58-aa19-168b58dea41c

📥 Commits

Reviewing files that changed from the base of the PR and between 26f0440 and 461babb.

📒 Files selected for processing (1)
  • test/bin/ci_phase_iso_build.sh

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

@vanhalenar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 461babb link true /test verify
ci/prow/e2e-aws-tests-bootc-arm-el9 461babb link true /test e2e-aws-tests-bootc-arm-el9
ci/prow/e2e-aws-tests-arm 461babb link true /test e2e-aws-tests-arm
ci/prow/e2e-aws-tests-periodic 461babb link true /test e2e-aws-tests-periodic

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants