-
Notifications
You must be signed in to change notification settings - Fork 418
OCPBUGS-63311: pkg/cli/admin/upgrade: Tighten force warnings #2125
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
OCPBUGS-63311: pkg/cli/admin/upgrade: Tighten force warnings #2125
Conversation
|
@wking: This pull request references Jira Issue OCPBUGS-63311, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. 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. |
WalkthroughUpdated help text and runtime warning messages for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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: CodeRabbit 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 (1)
pkg/cli/admin/upgrade/upgrade.go(4 hunks)
🔇 Additional comments (2)
pkg/cli/admin/upgrade/upgrade.go (2)
117-117: LGTM!The flag help text is clear, consistent with the Long description, and provides appropriate guidance on when
--forceshould be used.
252-252: LGTM!The runtime warnings for
--forceare consistent with each other and with the help text. They clearly explain the risks and provide specific guidance on acceptable use cases.Also applies to: 384-384
Catching the --help and stderr warnings for --force up with the recent openshift/api@b618d5bd8c (config/v1/types_cluster_version: Tighten force and rollback warnings, 2025-10-18, openshift/api#2539) wording.
09f4164 to
a46ebc2
Compare
DavidHurta
left a 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.
/lgtm
|
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Testing in a build off this branch, $ ./oc adm upgrade --help | grep -A4 -- --force
Cluster-side guards include checks for release verification and upgradeable conditions. You can push through them with --force, which is passed through to ClusterVersion's spec.desiredUpdate.force, but only do that if:
* you are testing unsigned release images in short-lived test clusters or
* you are working around a known bug in the cluster-version operator and you have verified the authenticity of the provided image yourself.
The provided image will run with full administrative access to the cluster. Do not use --force with images that come from unknown or potentially malicious sources.
Examples:
# View the update status and available cluster updates
oc adm upgrade
--
--force=false:
Upgrade regardless of cluster-side guard failures, such as release verification or upgradeable conditions. Only use this if you are testing unsigned release images or you are working around a known bug in the cluster-version operator and you have verified the authenticity of the provided image yourself.
--include-not-recommended=false:
Display additional updates which are not recommended based on your cluster configuration.I'll see about a Cluster Bot cluster to confirm the stderr messaging. |
|
And with Cluster Bot $ ./oc adm upgrade --to 4.20.1 --force
warning: --force overrides cluster verification of your supplied release image and waives any update precondition failures. Only use this if you are testing unsigned release images or you are working around a known bug in the cluster-version operator and you have verified the authenticity of the provided image yourself.
Requested update to 4.20.1So with /verified by @wking |
|
@wking: This PR has been marked as verified by 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. |
|
@wking: all tests passed! Full PR test history. Your PR dashboard. 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. |
|
@wking: Jira Issue OCPBUGS-63311: Some pull requests linked via external trackers have merged: The following pull request, linked via external tracker, has not merged: All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with Jira Issue OCPBUGS-63311 has not been moved to the MODIFIED state. This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload. 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. |
|
Fix included in accepted release 4.21.0-0.nightly-2025-11-05-234508 |
Catching the
--helpand stderr warnings for--forceup with the recent openshift/api@b618d5bd8c (openshift/api#2539) wording.