Bug 2100930 - oc adm upgrade runs default case for incorrect subcommand
Summary: oc adm upgrade runs default case for incorrect subcommand
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Over the Air Updates
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-24 17:45 UTC by Pratik Mahajan
Modified: 2023-03-09 01:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-09 01:22:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pratik Mahajan 2022-06-24 17:45:44 UTC
Description of problem:
 
`oc adm upgrade` silently errors out on incorrect subcommand without doing/notifying anything
this is due to the `default` case in `run()` which catches all the incorrect subcommand and runs the default part instead. 


Version-Release number of selected component (if applicable): 4.10 and current


How reproducible:
use any incorrect subcommand with `oc adm upgrade`. 
example: `oc adm upgrade incorrect-subcommand`

Steps to Reproduce:
1. run `oc adm upgrade incorrect-subcommand`


Actual results:
oc prints the cluster upgrade status

Expected results:
oc should error out saying incorrect subcommand

Comment 1 Shiftzilla 2023-03-09 01:22:24 UTC
OpenShift has moved to Jira for its defect tracking! This bug can now be found in the OCPBUGS project in Jira.

https://issues.redhat.com/browse/OCPBUGS-9340


Note You need to log in before you can comment on or make changes to this bug.