Bug 1571589 - [svcat] `oc plugin svcat version --help` option information not clear
Summary: [svcat] `oc plugin svcat version --help` option information not clear
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Catalog
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Marko Luksa
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-25 07:41 UTC by sunzhaohua
Modified: 2019-03-12 14:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-30 06:34:15 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description sunzhaohua 2018-04-25 07:41:06 UTC
Description of problem:
Don't know the value of the option "-c, --client=''" .

Version-Release number of selected component (if applicable):
svcat:
client: v3.10.0-0.27.0;Upstream:v0.1.13
server: v1.10.0+b81c8f8

How reproducible:
Always

Steps to Reproduce:
1.  oc plugin svcat version --help
2.  oc plugin svcat version --client=''
3.

Actual results:
step 1. # oc plugin svcat version --help
Provides the version for the Service Catalog client and server

Usage:
  oc plugin svcat version [flags]

Options:
  -c, --client='': Show only the client version

Use "oc options" for a list of global command-line options (applies to all commands).

step 2. #oc plugin svcat version --client=''
client: v3.10.0-0.27.0;Upstream:v0.1.13
server: v1.10.0+b81c8f8

# oc plugin svcat version --client=true
client: v3.10.0-0.28.0;Upstream:v0.1.13

Expected results:
The help information should explain the option value should be true.

Additional info:

Comment 1 Paul Morie 2018-04-26 13:36:42 UTC
Marko, would you take a look at this?

Comment 2 Marko Luksa 2018-04-26 14:32:07 UTC
The problem is that when svcat is used through the oc plugin mechanism, boolean flags aren't handled properly, requiring users to run "oc plugin svcat version -c true" instead of just "oc plugin svcat version -c". 

We can't change the help text in svcat, because users can also run svcat directly (instead of through the oc plugin mechanism). In that case, running "svcat version -c" works just fine.

There is an upstream issue already open for this: https://github.com/kubernetes/kubernetes/issues/53640

And an upstream PR that should fix this: https://github.com/kubernetes/kubernetes/pull/58768

Comment 3 Jay Boyd 2018-08-22 18:24:14 UTC
This is not going to be fixed for 3.11.   As described by Marko in comment 2, we really don't have much we can do within Service Catalog for this.  I'm going to move this to 4.0, the command can be used without arguments, so I don't think this is a blocker for 3.11.

Comment 4 Marko Luksa 2018-08-30 06:32:15 UTC
I propose closing this, because the plugin system in kube 1.11 is changing and fixes this problem.

Here's how it works in 1.11:

$ svcat version -c
Client Version: v0.1.21-126-g18921c4

$ kubectl svcat version -c
Client Version: v0.1.21-126-g18921c4

$ kubectl svcat version --client
Client Version: v0.1.21-126-g18921c4

As you can see, the flag works as specified in the help text.


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