-
Notifications
You must be signed in to change notification settings - Fork 212
OTA-1787: pkg: Update Upgradeable condition to explicitly mention major version updates #1276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… updates The Upgradeable condition already blocks both minor and major version updates when set to False, but all the error messages and comments only mentioned 'minor versions' or 'minor level' updates. This was misleading, especially in the context of enabling updates to version 5.0. Changes: - Update error messages in pkg/cvo/upgradeable.go to say 'minor or major versions' - Update comments in pkg/payload/precondition/clusterversion/upgradeable.go to clarify that major version updates are also blocked - Update all test expectations to match the new messages - Standardize terminology from 'minor level' to 'minor version' for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) My prompts were: Change the Upgradeable ClusterVersion condition handling so that it applies to major version updates as well as the current minor version updates. and then: commit these changes, and set yourself as the commit author Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@wking: This pull request references OTA-1787 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 "4.22.0" version, but no target version was set. DetailsIn 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. |
WalkthroughUpdated wording across tests, checks, comments, and alerts to reference upgrades "between minor or major versions". Replaced minor-only detection with a major/minor-aware function that returns the completed version plus an upgrade type; no exported API signatures changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🧬 Code graph analysis (2)pkg/payload/precondition/clusterversion/upgradeable.go (4)
pkg/payload/precondition/clusterversion/upgradeable_test.go (1)
🔇 Additional comments (6)
Comment |
|
/cc |
… updates (v2) Additional locations caught by David and Claude's collaboration [1,2]. [1]: openshift#1276 (comment) [2]: openshift#1276 (comment)
…rogress David pointed out [1] that the existing MinorVersionClusterUpdateInProgress needed to be extended to have a major-version update form too. [1]: openshift#1276 (comment)
There was a problem hiding this 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
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (4)
install/0000_90_cluster-version-operator_02_servicemonitor.yamlpkg/internal/constants.gopkg/payload/precondition/clusterversion/upgradeable.gopkg/payload/precondition/clusterversion/upgradeable_test.go
✅ Files skipped from review due to trivial changes (1)
- pkg/internal/constants.go
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
pkg/payload/precondition/clusterversion/upgradeable.goinstall/0000_90_cluster-version-operator_02_servicemonitor.yamlpkg/payload/precondition/clusterversion/upgradeable_test.go
🧬 Code graph analysis (2)
pkg/payload/precondition/clusterversion/upgradeable.go (4)
pkg/cincinnati/cincinnati.go (1)
Error(56-65)pkg/payload/precondition/precondition.go (1)
Error(14-20)pkg/version/version.go (1)
Version(16-16)lib/resourcemerge/os.go (1)
FindOperatorStatusCondition(45-53)
pkg/payload/precondition/clusterversion/upgradeable_test.go (1)
pkg/payload/precondition/precondition.go (1)
Error(14-20)
🔇 Additional comments (6)
install/0000_90_cluster-version-operator_02_servicemonitor.yaml (1)
90-90: LGTM! Alert summary accurately reflects blocking behavior.The updated alert summary now correctly indicates that the condition blocks both minor and major version updates, aligning with the broader PR changes.
pkg/payload/precondition/clusterversion/upgradeable.go (3)
6-6: LGTM! Import added for strings.ToLower usage.The
stringsimport is correctly added to support the lowercase conversion in the error message formatting.
101-102: LGTM! Comments accurately reflect blocking behavior.The updated comments now correctly state that Upgradeable==False blocks both minor and major version updates, addressing previous reviewer feedback.
112-120: LGTM! Dynamic error handling for major/minor upgrades.The logic correctly identifies whether a major or minor version upgrade is in progress and generates appropriate error reasons (e.g.,
MajorVersionClusterUpdateInProgressorMinorVersionClusterUpdateInProgress) and messages. ThepatchOnlycheck ensures this only applies to patch-level retargets during a major/minor transition.pkg/payload/precondition/clusterversion/upgradeable_test.go (2)
139-139: LGTM! Terminology standardized to "minor version".The change from "minor level update" to "minor version update" improves consistency and precision in the messaging.
143-155: LGTM! Comprehensive test coverage for major version upgrades.The new test case correctly validates the major version upgrade scenario, mirroring the structure of the existing minor version test and ensuring the
MajorVersionClusterUpdateInProgressreason is properly generated.
…rogress David pointed out [1] that the existing MinorVersionClusterUpdateInProgress needed to be extended to have a major-version update form too. [1]: openshift#1276 (comment)
1bc9513 to
6c5311e
Compare
…rogress David pointed out [1] that the existing MinorVersionClusterUpdateInProgress needed to be extended to have a major-version update form too. [1]: openshift#1276 (comment)
6c5311e to
07c1bb8
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
@wking: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
The
Upgradeablecondition already blocks both minor and major version updates when set toFalse, but all the error messages and comments only mentionedminor versionsorminor levelupdates. This was misleading, especially in the context of enabling updates to version 5.0.Changes:
pkg/cvo/upgradeable.goto sayminor or major versionspkg/payload/precondition/clusterversion/upgradeable.goto clarify that major version updates are also blockedminor leveltominor versionfor consistency🤖 Generated with Claude Code
My prompts were:
and then: