Bug 1748777
Summary: | Usage info is being printed on all errors | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Xingxing Xia <xxia> | |
Component: | oc | Assignee: | Sally <somalley> | |
Status: | CLOSED ERRATA | QA Contact: | zhou ying <yinzhou> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 4.2.0 | CC: | aos-bugs, ccoleman, jokerman, maszulik, mfojtik, mmccomas | |
Target Milestone: | --- | |||
Target Release: | 4.3.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause: full usage menu was printed along with a bad flag error message
Consequence: the bad flag error message was being lost because many usage menus are long
Fix: only report suggestion to run 'oc command --help' with bad flag error, rather than printing the usage menu
Result: user clearly sees the bad flag error message
|
Story Points: | --- | |
Clone Of: | 1610599 | |||
: | 1778019 (view as bug list) | Environment: | ||
Last Closed: | 2020-01-23 11:05:47 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Xingxing Xia
2019-09-04 07:42:10 UTC
Sally, we've talked about upstreaming your effort from https://github.com/soltysh/oc/pull/1 I'd like to see that fixed in 4.3 time frame. This was fixed, but only upstream. We need to pick it back to oc. Sally can you handle that please? I've opened https://github.com/openshift/kubernetes/pull/94 will bump openshift/oc when that merges. The PR still not merged , change status to POST. The PR still not merged , change status to POST. I opened https://github.com/openshift/oc/pull/137 to bring in vendored merge (https://github.com/openshift/kubernetes-kubectl/pull/3). Once oc/pull#137 merges, please verify. Thanks. Update: This PR will bring in the fix: https://github.com/openshift/oc/pull/144 Confirmed with latest version, the issue still reproduced: oc extracted from payload: 4.3.0-0.nightly-2019-11-08-015817 which contain the PR: https://github.com/openshift/oc/pull/144. [root@dhcp-140-138 oc]# oc adm release info --commits registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-11-08-015817 |grep oc Pull From: registry.svc.ci.openshift.org/ocp/release@sha256:450cbc23259f04e439e09028a4f20ce118d44a5c14126ef8a3892e73704eabbb cli https://github.com/openshift/oc c276ecb733fa3933c5ddcc217d1090cc59ffdd22 root@dhcp-140-138 oc]# git log c276ecb733fa3933c5ddcc217d1090cc59ffdd22|grep "#144" Merge pull request #144 from mfojtik/bump-1.16.2 [root@dhcp-140-138 ~]# ./oc new-project ---dadala Error: bad flag syntax: ---dadala Usage: oc new-project NAME [--display-name=DISPLAYNAME] [--description=DESCRIPTION] [flags] Examples: # Create a new project with minimal information oc new-project web-team-dev # Create a new project with a display name and description oc new-project web-team-dev --display-name="Web Team Development" --description="Development project for the web team." Options: --description='': Project description --display-name='': Project display name --skip-config-write=false: If true, the project will not be set as a cluster entry in kubeconfig after being created Use "oc options" for a list of global command-line options (applies to all commands). Ah, i see, thanks. This PR should finally bring in the full (oc + kubectl rather than only kubectl) fix: https://github.com/openshift/oc/pull/156 The last PR merged, moving to MODIFIED. confirmed with oc version: 4.3.0-201911190123.git.1.60c4109.el7 , the issue has fixed: [root@dhcp-140-138 ~]# oc get pppppp error: the server doesn't have a resource type "pppppp" [root@dhcp-140-138 ~]# oc new-project --name-invalid-flag my Error: unknown flag: --name-invalid-flag See 'oc new-project --help' for usage. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0062 |