-
Notifications
You must be signed in to change notification settings - Fork 382
Make Svcat print help text if command is incorrect #2171
Conversation
pull origin
Can you please use a more descriptive title. "Issue/2166" doesn't mean anything w/o a lot more clicks/work. |
Thanks for the reminder, I know gerrit process but I am brand new to github process :( |
@carolynvs @jberkhahn close or hold? |
ok, I ran make format locally and this should be ok now |
@jichenjc There is one more change that needs to be made to make the build happy https://travis-ci.org/kubernetes-incubator/service-catalog/jobs/403481082#L582 |
I just took a look at what you had to do in order to make this work. Let me check and see if we have a way to do this universally for all commands such that when validate fails, we print the help text. |
Found it! This is a function used by ALL commands and you should be able to test for an error (instead of returning it directly) and then displaying the command help. You have access to the command directly in that function, so no other changes are necessary to the individual commands themselves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's switch this to work for all commands (see my comment on the PR with a link to the shared function that will let you do that).
ok, I need check this code and learn how it works ... will submit a patch after I get it :), thanks ~ |
my local test seems better now with a few lines change only root@k8s:~/go/src/github.com/kubernetes-incubator/service-catalog# bin/svcat/svcat provision Examples: Flags: Global Flags: Error: required flag(s) "class", "plan" not set |
saw this in previous comments just now.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's much easier! Let me look at the failure and figure out why the build isn't green...
Here's the failing tests Looks like the way that we are checking for the error message isn't working anymore in that test. Can you take a look and see if we can change the test to figure out why? Let me know if you get stuck on that and I can help figure it out tomorrow.
|
Make Svcat print help text when a command is entered incorrectly. Closes: #2166
sorry still be familiar with how github works, made a minor change, and UT now succeed , hopefully better now ... ok github.com/kubernetes-incubator/service-catalog/cmd/svcat 7.238s |
/lgtm This seems pretty reasonable now. |
/retest |
thanks for info , I just triggered the retest |
@jichenjc: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-service-catalog-xbuild |
@jichenjc: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carolynvs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Make Svcat print help text if command is incorrect