+++ This bug was initially created as a clone of Bug #1610599 +++
When errors occur under `oc` usage info is also being printed. I suspect this is https://github.com/kubernetes/kubernetes/issues/66572
--- Additional comment from Maciej Szulik on 2019-09-03 22:49:20 CST ---
There was no actual changes that I'm aware of. The linked PR only fixed the last remaining
element that used RunE. We will be working on fixing the help upstream so that it only
prints the flag failed w/o full help, but that won't be fixed here.
Using this bug to track future fix for above.
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.
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
oc new-project NAME [--display-name=DISPLAYNAME] [--description=DESCRIPTION] [flags]
# 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."
--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.