Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Nov 3, 2025

Catching the --help and stderr warnings for --force up with the recent openshift/api@b618d5bd8c (openshift/api#2539) wording.

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 3, 2025
@openshift-ci-robot
Copy link

@wking: This pull request references Jira Issue OCPBUGS-63311, which is valid.

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

Requesting review from QA contact:
/cc @jiajliu

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

In response to this:

Catching the --help and stderr warnings for --force up with the recent openshift/api@b618d5bd8c (openshift/api#2539) wording.

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 requested a review from jiajliu November 3, 2025 16:22
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Walkthrough

Updated help text and runtime warning messages for the --force flag in the upgrade command to provide more explicit guidance on acceptable use cases (testing unsigned releases in short-lived test clusters, working around known operator bugs with verified images) and warnings against unknown sources. No logic flow or decision-making changes.

Changes

Cohort / File(s) Summary
Upgrade command documentation updates
pkg/cli/admin/upgrade/upgrade.go
Updated --force flag help text in Long description, single-flag usage, and warning outputs to add explicit conditions for use (testing unsigned releases in short-lived test clusters, workaround for cluster-version operator bug) and cautions against using with untrusted sources.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • The change is text-only and editorial in nature with no logic alterations
  • Verify consistency of messaging across all updated locations (help text, warnings) to ensure guidance is uniform and clear

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title 'OCPBUGS-63311: pkg/cli/admin/upgrade: Tighten force warnings' is directly related to the main change in the changeset. It clearly summarizes that the changes involve tightening/improving the force flag warnings in the upgrade CLI command, which aligns with the AI-generated summary describing expanded help text and updated warning messages for the --force flag.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining that it updates --force flag help text and warnings to align with recent API changes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

@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

📜 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae657d and 09f4164.

📒 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 --force should be used.


252-252: LGTM!

The runtime warnings for --force are 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2025
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.
Copy link
Contributor

@DavidHurta DavidHurta left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 3, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wking
Copy link
Member Author

wking commented Nov 3, 2025

Testing in a build off this branch, --help looks good.

$ ./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.

@wking
Copy link
Member Author

wking commented Nov 3, 2025

And with Cluster Bot launch 4.20.0 aws (logs):

$ ./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.1

So with --help already checked, that looks good to me.

/verified by @wking

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 3, 2025
@openshift-ci-robot
Copy link

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

In response to this:

And with Cluster Bot launch 4.20.0 aws (logs):

$ ./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.1

So with --help already checked, that looks good to me.

/verified by @wking

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
Copy link

/retest-required

Remaining retests: 0 against base HEAD 9ae657d and 2 for PR HEAD a46ebc2 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

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

@openshift-merge-bot openshift-merge-bot bot merged commit 1c5f490 into openshift:main Nov 4, 2025
16 checks passed
@openshift-ci-robot
Copy link

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

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:

Catching the --help and stderr warnings for --force up with the recent openshift/api@b618d5bd8c (openshift/api#2539) wording.

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 wking deleted the tighter-force-warnings branch November 4, 2025 02:26
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.21.0-0.nightly-2025-11-05-234508

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-low Referenced Jira bug's severity is low 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