Skip to content

[5.0] OCPBUGS-90151: hack/update-metadata.sh: allow MAX_OCP_VERSION override#571

Open
dobsonj wants to merge 1 commit into
openshift:mainfrom
dobsonj:OCPBUGS-90151-5.0
Open

[5.0] OCPBUGS-90151: hack/update-metadata.sh: allow MAX_OCP_VERSION override#571
dobsonj wants to merge 1 commit into
openshift:mainfrom
dobsonj:OCPBUGS-90151-5.0

Conversation

@dobsonj

@dobsonj dobsonj commented Jun 23, 2026

Copy link
Copy Markdown
Member

https://redhat.atlassian.net/browse/OCPBUGS-90151

This PR allows setting MAX_OCP_VERSION as an environment variable for releases where the default x.y+1 max version is incorrect. The release-4.22 branch for example needs to pin MAX_OCP_VERSION to 5.0.

/cc @openshift/storage

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Jun 23, 2026
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@dobsonj: GitHub didn't allow me to request PR reviews from the following users: openshift/storage.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

https://redhat.atlassian.net/browse/OCPBUGS-90151

This PR allows setting MAX_OCP_VERSION as an environment variable for releases where the default x.y+1 max version is incorrect. The release-4.22 branch for example needs to pin MAX_OCP_VERSION to 5.0.

/cc @openshift/storage

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@dobsonj: This pull request references Jira Issue OCPBUGS-90151, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

https://redhat.atlassian.net/browse/OCPBUGS-90151

This PR allows setting MAX_OCP_VERSION as an environment variable for releases where the default x.y+1 max version is incorrect. The release-4.22 branch for example needs to pin MAX_OCP_VERSION to 5.0.

/cc @openshift/storage

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.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The script hack/update-metadata.sh gains a new MAX_OCP_VERSION environment variable. When not set by the caller, it defaults to MAJOR_VERSION.(MINOR_VERSION+1) computed from the selected OCP_VERSION. The usage/comment header is updated to document this override. In the per-platform manifest update loop, the previously inline computation for olm.maxOpenShiftVersion inside NEW_OLM_PROPERTIES is replaced by a reference to the new MAX_OCP_VERSION variable.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding MAX_OCP_VERSION override support to the hack/update-metadata.sh script.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of the MAX_OCP_VERSION environment variable override and referencing the specific Jira issue being addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 hack/update-metadata.sh shell script; doesn't modify any Ginkgo test titles. Check is inapplicable as PR adds repository files but doesn't change test names.
Test Structure And Quality ✅ Passed PR modifies hack/update-metadata.sh (shell script), not Ginkgo test code. Custom check for test structure/quality is not applicable to shell script modifications.
Microshift Test Compatibility ✅ Passed PR modifies hack/update-metadata.sh shell script only; no new Ginkgo e2e tests are added, so the MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR modifies only hack/update-metadata.sh, a shell script for metadata updates. No Ginkgo e2e tests were added, so the SNO compatibility check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only hack/update-metadata.sh, a build script for updating OLM metadata annotations. It does not add or modify deployment manifests, operator code, controllers, or any scheduling co...
Ote Binary Stdout Contract ✅ Passed PR modifies only hack/update-metadata.sh (bash script), not Go test code. OTE Binary Stdout Contract check applies to Go test binaries only; inapplicable here.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR modifies only hack/update-metadata.sh shell script, not Ginkgo e2e tests. Custom check for IPv6/disconnected network compatibility applies only to new e2e tests, which this PR does not add.
No-Weak-Crypto ✅ Passed PR does not introduce weak cryptography, custom crypto implementations, or insecure secret comparisons. The modified script performs only YAML/JSON metadata manipulation without any cryptographic o...
Container-Privileges ✅ Passed PR only modifies hack/update-metadata.sh, a bash utility script with no container/K8s manifests, Dockerfiles, or privilege-related configurations.
No-Sensitive-Data-In-Logs ✅ Passed The script only logs file paths, platform names, and version numbers—none of which are sensitive data such as passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data.

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

@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dobsonj

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2026

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

Inline comments:
In `@hack/update-metadata.sh`:
- Around line 59-64: The `MAX_OCP_VERSION` variable is persisting its value
across loop iterations, causing later platforms to reuse a stale computed value
instead of calculating a fresh one based on that iteration's `OCP_VERSION`. To
fix this, unset the `MAX_OCP_VERSION` variable at the beginning of each loop
iteration before line 59 where it is assigned, or alternatively use a different
variable name (like `COMPUTED_MAX_OCP_VERSION`) to store the calculated value
separately from any input override, ensuring the `olm.maxOpenShiftVersion`
metadata is recalculated fresh for each platform instead of carrying forward
stale values from previous iterations.
🪄 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: 3a8c62f8-79b3-43d4-97ac-1c2a61ac78f5

📥 Commits

Reviewing files that changed from the base of the PR and between 6c38325 and a3f91a8.

📒 Files selected for processing (1)
  • hack/update-metadata.sh

Comment thread hack/update-metadata.sh
@dobsonj

dobsonj commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/test

@dobsonj

dobsonj commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/test aws-efs-operator-e2e
/test smb-operator-e2e

@dobsonj

dobsonj commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/verified by @dobsonj

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

Copy link
Copy Markdown

@dobsonj: This PR has been marked as verified by @dobsonj.

Details

In response to this:

/verified by @dobsonj

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.

@jsafrane

Copy link
Copy Markdown
Contributor

/lgtm

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

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ad5643a and 2 for PR HEAD a3f91a8 in total

@dobsonj

dobsonj commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@dobsonj: The following test 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/aws-efs-operator-e2e a3f91a8 link true /test aws-efs-operator-e2e

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants