Skip to content

pkg/cli/admin/update: Add tech-preview 'oc adm upgrade status' - #1554

Merged
openshift-ci[bot] merged 2 commits into
openshift:masterfrom
wking:tech-preview-update-status
Oct 17, 2023
Merged

pkg/cli/admin/update: Add tech-preview 'oc adm upgrade status'#1554
openshift-ci[bot] merged 2 commits into
openshift:masterfrom
wking:tech-preview-update-status

Conversation

@wking

@wking wking commented Oct 3, 2023

Copy link
Copy Markdown
Member

Initial scaffolding, based on the existing code for status rendering in oc adm upgrade. I'm gating the new subcommand behind an OC_ENABLE_CMD_UPGRADE_STATUS feature gate to avoid surprising users with a volatile command while the implementation settles down.

$ ./oc adm upgrade  status
error: unknown command "status"
See 'oc adm upgrade -h' for help and examples
$ OC_ENABLE_CMD_UPGRADE_STATUS=true ./oc adm upgrade --help
...
Available Commands:
  channel       Set or clear the update channel
  status        Display the status of current cluster version updates.
...
$ OC_ENABLE_CMD_UPGRADE_STATUS=true ./oc adm upgrade status
The cluster version is not updating (Progressing=False).

  Reason:
  Message: Cluster version is 4.13.10

@openshift-ci
openshift-ci Bot requested review from ardaguclu and mfojtik October 3, 2023 19:42
@petr-muller

Copy link
Copy Markdown
Member

/cc

@openshift-ci
openshift-ci Bot requested a review from petr-muller October 4, 2023 14:27
@LalatenduMohanty

Copy link
Copy Markdown
Member

/hold till I am done with https://issues.redhat.com/browse/OTA-1025

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 2023
wking added 2 commits October 4, 2023 11:52
Avoid confusion like we had with 'oc adm upgrade channel', where folks
running older oc (where 'channel' didn't exist) had the command no-op
and exit 0.  With this change, that sort of thing will give:

  $ oc adm upgrade does-not-exist
  error: unknown command "does-not-exist"
  See 'oc adm upgrade -h' for help and examples
Initial scaffolding, based on the existing code for status rendering
for 'oc adm upgrade', but factored out into a new package to more
easily distinguish between read-only status-rendering and commands
that are intended to change state (like initiating updates).  I'm
gating the new subcommand behind an OC_ENABLE_CMD_UPGRADE_STATUS
feature gate to avoid surprising users with a volatile command while
the implementation settles down.

  $ ./oc adm upgrade  status
  error: unknown command "status"
  See 'oc adm upgrade -h' for help and examples
  $ OC_ENABLE_CMD_UPGRADE_STATUS=true ./oc adm upgrade --help
  ...
  Available Commands:
    channel       Set or clear the update channel
    status        Display the status of current cluster version updates.
  ...
  $ OC_ENABLE_CMD_UPGRADE_STATUS=true ./oc adm upgrade status
  The cluster version is not updating (Progressing=False).

    Reason:
    Message: Cluster version is 4.13.10
@wking
wking force-pushed the tech-preview-update-status branch from 90a8eab to 701c2ee Compare October 4, 2023 22:30
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2023
@wking wking changed the title pkg/cli/admin/update: Add tech-preview 'oc adm update status' pkg/cli/admin/update: Add tech-preview 'oc adm upgrade status' Oct 4, 2023
@wking

wking commented Oct 4, 2023

Copy link
Copy Markdown
Member Author

Rerolled to be oc adm upgrade status instead of oc adm update status with 90a8eab -> 701c2ee, because it seems like that's part of what folks want. It's easy to move back and forth if we change our mind later, at least as long as it's a tech-preview subcommand.

@openshift-ci

openshift-ci Bot commented Oct 5, 2023

Copy link
Copy Markdown
Contributor

@wking: 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/e2e-metal-ipi-ovn-ipv6 701c2ee link false /test e2e-metal-ipi-ovn-ipv6

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/test-infra repository. I understand the commands that are listed here.

@LalatenduMohanty LalatenduMohanty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@LalatenduMohanty

Copy link
Copy Markdown
Member

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2023
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 17, 2023
@openshift-ci

openshift-ci Bot commented Oct 17, 2023

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LalatenduMohanty, wking

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 merged commit e3fc34f into openshift:master Oct 17, 2023
@wking
wking deleted the tech-preview-update-status branch October 30, 2023 21:45
wking added a commit to wking/oc that referenced this pull request May 14, 2024
In case the hidden-ness from 73074c3
(pkg/cli/admin/upgrade/rollback: New rollback command, 2023-12-19, openshift#1642)
is not sufficient to scare users away, add a gating environment
variable.  We also use a gating env. var. for status (701c2ee,
pkg/cli/admin/upgrade/status: Add tech-preview 'oc adm upgrade
status', 2023-10-03, openshift#1554) and inspect-alerts (229c2a8,
pkg/cli/admin/inspectalerts: New tech-preview inspect-alerts
subcommand, 2024-01-30, openshift#1674).

Also reword the LongDesc to avoid saying "supported" (which readers
might misconstrue as "what Red Hat support will do if we open a
case").  I'm just trying to talk about "what the cluster-version
operator will do if you request a rollback", and hopefully the new
wording makes this more clear.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/oc that referenced this pull request May 20, 2024
In case the hidden-ness from 73074c3
(pkg/cli/admin/upgrade/rollback: New rollback command, 2023-12-19, openshift#1642)
is not sufficient to scare users away, add a gating environment
variable.  We also use a gating env. var. for status (701c2ee,
pkg/cli/admin/upgrade/status: Add tech-preview 'oc adm upgrade
status', 2023-10-03, openshift#1554) and inspect-alerts (229c2a8,
pkg/cli/admin/inspectalerts: New tech-preview inspect-alerts
subcommand, 2024-01-30, openshift#1674).

Also reword the LongDesc to avoid saying "supported" (which readers
might misconstrue as "what Red Hat support will do if we open a
case").  I'm just trying to talk about "what the cluster-version
operator will do if you request a rollback", and hopefully the new
wording makes this more clear.
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants