Bug 1414227
Summary: | Error message should be easily detectable for 'oc get' | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.5.0 | CC: | aos-bugs, jokerman, mmccomas, wmeng, yapei |
Target Milestone: | --- | Keywords: | Rebase |
Target Release: | 3.11.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-04-11 05:38:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Yadan Pei
2017-01-18 05:47:28 UTC
Placing the error message near the beginning might make it more difficult to notice than it already is, as a user would have to know to scroll to the beginning of a long output to see it. I like your idea of removing the space before it. We could do something like: ``` # oc get You must specify the type of resource to get. Valid resource types include: * buildconfigs (aka 'bc') * builds ...... * thirdpartyresources error: Required resource not specified. Use "oc explain <resource>" for a detailed description of that resource (e.g. oc explain pods). See 'oc get -h' for help and examples. ``` WDYT? Will open PR Hi, @yapei, you might miss this. Thanks wmeng @Juan, I'm ok with your solution like this: ``` # oc get You must specify the type of resource to get. Valid resource types include: * buildconfigs (aka 'bc') * builds ...... * thirdpartyresources error: Required resource not specified. Use "oc explain <resource>" for a detailed description of that resource (e.g. oc explain pods). See 'oc get -h' for help and examples. ``` Upstream PR: https://github.com/kubernetes/kubernetes/pull/52450 Upstream PR has merged [1]. Will be available after next rebase. 1. https://github.com/kubernetes/kubernetes/pull/52450 This is available since 3.9, moving to qa. # oc version oc v3.9.71 kubernetes v1.9.1+a0ce1bc657 features: Basic-Auth GSSAPI Kerberos SPNEGO Server <server> openshift v3.9.71 kubernetes v1.9.1+a0ce1bc657 # git clone https://github.com/openshift/kubernetes & cd kubernetes $ git log --pretty="%h %an %cd - %s" a0ce1bc657 | grep '#52450' // PR is merged in v3.9.71 4a0f41e4fa Kubernetes Submit Queue Sat Sep 23 18:48:58 2017 -0700 - Merge pull request #52450 from juanvallejo/jvallejo/misc-err-msg-improvements # oc get You must specify the type of resource to get. Valid resource types include: * all * buildconfigs (aka 'bc') * builds * certificatesigningrequests (aka 'csr') * clusterrolebindings * clusterroles * componentstatuses (aka 'cs') * configmaps (aka 'cm') * controllerrevisions * cronjobs * customresourcedefinition (aka 'crd') * daemonsets (aka 'ds') * deployments (aka 'deploy') * deploymentconfigs (aka 'dc') * endpoints (aka 'ep') * events (aka 'ev') * horizontalpodautoscalers (aka 'hpa') * imagestreamimages (aka 'isimage') * imagestreams (aka 'is') * imagestreamtags (aka 'istag') * ingresses (aka 'ing') * groups * jobs * limitranges (aka 'limits') * namespaces (aka 'ns') * networkpolicies (aka 'netpol') * nodes (aka 'no') * persistentvolumeclaims (aka 'pvc') * persistentvolumes (aka 'pv') * poddisruptionbudgets (aka 'pdb') * podpreset * pods (aka 'po') * podsecuritypolicies (aka 'psp') * podtemplates * projects * replicasets (aka 'rs') * replicationcontrollers (aka 'rc') * resourcequotas (aka 'quota') * rolebindings * roles * routes * secrets * serviceaccounts (aka 'sa') * services (aka 'svc') * statefulsets (aka 'sts') * storageclasses (aka 'sc') * userserror: Required resource not specified. Use "oc explain <resource>" for a detailed description of that resource (e.g. oc explain pods). See 'oc get -h' for help and examples. We can see that the error message "error: Required resource not specified." is in wrong place(together with the last resource *user), that should not happen As a conclusion, since fix PR is merged in 3.9.71 but the output still not satisfying, so I'm assigning back I don't think we'll fix that, give the newer versions (starting from 3.11) don't print that list. I'm moving the target release to 3.11 in that case. # oc get You must specify the type of resource to get. Use "oc api-resources" for a complete list of supported resources. error: Required resource not specified. Use "oc explain <resource>" for a detailed description of that resource (e.g. oc explain pods). See 'oc get -h' for help and examples. oc 3.11.90 doesn't print the resource lists, and the ouput is expected, move to VERIFIED # oc version oc v3.11.90 kubernetes v1.11.0+d4cacc0 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://<master> openshift v3.11.88 kubernetes v1.11.0+d4cacc0 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-2019:0636 |