Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some cli command description #12128

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

guangxuli
Copy link
Contributor

@guangxuli guangxuli commented Dec 3, 2016

what this PR does:

Mainly fix some description of some oc command, especially for the default value of option is false.

when i run oc deploy -h, the output :

Options:
      --cancel=false: Cancel the in-progress deployment.
      --enable-triggers=false: Enables all image triggers for the deployment config.
      --follow=false: Follow the logs of a deployment
      --latest=false: Start a new deployment now.
      --retry=false: Retry the latest failed deployment.   

I think the annotation of the options is confusing, since all the description are about * = true condition,
while the default value of these options are false. I thought this is our rules at beginning, but when I run oc new-build -h command, I saw some outputs are more reasonable, like this(not all):

Options:
      --allow-missing-images=false: If true, indicates that referenced Docker images that cannot be found locally or in
a registry should still be used.
      --allow-missing-imagestream-tags=false: If true, indicates that image stream tags that don't exist should still be
used.
      --dry-run=false: If true, show the result of the operation without performing it.
      --no-output=false: If true, the build output will not be pushed anywhere.

I think we should add if true when the bool value of description before colons is false, that seems more clear.

what I have fixed:

  1. option=false, but the description is about in case of the value is true, add if true to the description if not exist:
cmd.Flags().BoolVar(&o.Confirmed, "confirm", o.Confirmed, "**Specify** that cluster role bindings should be modified. Defaults to false, displaying what would be replaced but not actually replacing anything.")
cmd.Flags().BoolVar(&o.Confirmed, "confirm", o.Confirmed, "**If true, specify** that cluster role bindings should be modified. Defaults to false, displaying what would be replaced but not actually replacing anything.")
  1. description if present change it to if true just for keeping consistent:
cmd.Flags().Bool("all-namespaces", false, "**If present,** list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")
cmd.Flags().Bool("all-namespaces", false, "**If true**, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")

what I do not fixed:

  1. description include all false/true, just like:
cmd.Flags().BoolVar(&options.Readiness, "readiness", options.Readiness, "Set or remove a readiness probe to indicate when this container should receive traffic")
cmd.Flags().BoolVar(&options.Liveness, "liveness", options.Liveness, "Set or remove a liveness probe to verify this container is running")
  1. description have include clear option content, just like:
cmd.Flags().BoolVar(&opts.aliasTag, "alias", false, "Should the destination tag be updated whenever the source tag changes. **Defaults to false**.")cmd.Flags().BoolVar(&opts.referenceTag, "reference", false, "Should the destination tag continue to pull from the source namespace. **Defaults to false**.")

3.the option have two format, just like:
-t, --tty=false: Force a pseudo-terminal to be allocated

@pweil-
Copy link
Contributor

pweil- commented Dec 6, 2016

@openshift/cli-review

@fabianofranz
Copy link
Member

[test]

@guangxuli
Copy link
Contributor Author

@fabianofranz ptal,thanks.

@guangxuli
Copy link
Contributor Author

@fabianofranz I check the results of test failure, it seems a flake. Can you trigger test again? thanks.

@juanvallejo
Copy link
Contributor

check flaked on #12157 re[test]

@guangxuli
Copy link
Contributor Author

@juanvallejo thanks.:)

@guangxuli
Copy link
Contributor Author

@juanvallejo test failure again, seems another flake.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2016
@juanvallejo
Copy link
Contributor

integration check flaked on #8571
re[test]

@guangxuli looks like you'll need to rebase as well

@guangxuli
Copy link
Contributor Author

@juanvallejo thanks so much, have rebased.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2016
@juanvallejo
Copy link
Contributor

@fabianofranz lgtm

re[test]

@fabianofranz
Copy link
Member

flaked on #8502 re[test]

1 similar comment
@fabianofranz
Copy link
Member

flaked on #8502 re[test]

@guangxuli
Copy link
Contributor Author

@fabianofranz @juanvallejo seems a flake again

@juanvallejo
Copy link
Contributor

integration check flaked on #11775 re[test]

@@ -171,15 +171,15 @@ func NewCmdVolume(fullName string, f *clientcmd.Factory, out, errOut io.Writer)
},
}
cmd.Flags().StringVarP(&opts.Selector, "selector", "l", "", "Selector (label query) to filter on")
cmd.Flags().BoolVar(&opts.All, "all", false, "select all resources in the namespace of the specified resource types")
cmd.Flags().BoolVar(&opts.All, "all", false, "If true, Select all resources in the namespace of the specified resource types")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*select must be lowercase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be fixed, thanks.

@@ -270,7 +270,7 @@ func NewCmdRouter(f *clientcmd.Factory, parentName, name string, out, errout io.
cmd.Flags().IntVar(&cfg.StatsPort, "stats-port", cfg.StatsPort, "If the underlying router implementation can provide statistics this is a hint to expose it on this port. Specify 0 if you want to turn off exposing the statistics.")
cmd.Flags().StringVar(&cfg.StatsPassword, "stats-password", cfg.StatsPassword, "If the underlying router implementation can provide statistics this is the requested password for auth. If not set a password will be generated.")
cmd.Flags().StringVar(&cfg.StatsUsername, "stats-user", cfg.StatsUsername, "If the underlying router implementation can provide statistics this is the requested username for auth.")
cmd.Flags().BoolVar(&cfg.ExposeMetrics, "expose-metrics", cfg.ExposeMetrics, "This is a hint to run an extra container in the pod to expose metrics - the image will either be set depending on the router implementation or provided with --metrics-image.")
cmd.Flags().BoolVar(&cfg.ExposeMetrics, "expose-metrics", cfg.ExposeMetrics, "If true, this is a hint to run an extra container in the pod to expose metrics - the image will either be set depending on the router implementation or provided with --metrics-image.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"f true, attempts to run ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. thanks.

@fabianofranz
Copy link
Member

A couple minor nits then LGTM.

@guangxuli
Copy link
Contributor Author

@fabianofranz done. PTAL, thanks.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2016
@guangxuli guangxuli force-pushed the openshift_whoami_print branch 2 times, most recently from f5fad1c to 34069ee Compare December 14, 2016 06:53
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2016
@guangxuli guangxuli force-pushed the openshift_whoami_print branch 2 times, most recently from 6ca4304 to 8116c1e Compare December 14, 2016 08:13
@fabianofranz
Copy link
Member

Needs a rebase.

@guangxuli
Copy link
Contributor Author

@fabianofranz have rebased.

@guangxuli
Copy link
Contributor Author

@fabianofranz PTAL,thanks.

@fabianofranz
Copy link
Member

Thanks @guangxuli! LGTM [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 9c93da2

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 9c93da2

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12384/) (Base Commit: 652b30b)

@openshift-bot
Copy link
Contributor

openshift-bot commented Dec 15, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12400/) (Base Commit: 039e433) (Image: devenv-rhel7_5548)

@openshift-bot openshift-bot merged commit 46585f4 into openshift:master Dec 15, 2016
@guangxuli guangxuli deleted the openshift_whoami_print branch March 11, 2017 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants