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

Hide deprecated shorthand in man page #15608

Conversation

feihujiang
Copy link
Contributor

Fix #15593

@feihujiang
Copy link
Contributor Author

@eparis I know using len(flag.ShorthandDeprecated) > 0 to verify the shorthand is deprecated or not is not very correct, so I add a todo notes.

@k8s-bot
Copy link

k8s-bot commented Oct 14, 2015

GCE e2e build/test failed for commit 58af549f059bf1804b04d0b3ef3729ccfbb43621.

@k8s-github-robot
Copy link

Labelling this PR as size/XS

@k8s-github-robot k8s-github-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 14, 2015
@ashcrow
Copy link
Contributor

ashcrow commented Oct 14, 2015

Jenkins failure looks unrelated:

Probing container
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/container_probe.go:101
  with readiness probe should not be ready before initial delay and never restart [Conformance] [It]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/container_probe.go:74

  pod never became ready
  Expected error:
      <*errors.errorString | 0xc20802de60>: {
          s: "timed out waiting for the condition",
      }
      timed out waiting for the condition
  not to have occurred

  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/container_probe.go:59

@ashcrow
Copy link
Contributor

ashcrow commented Oct 14, 2015

@feihujiang in the upstream spf code it looks likelen() is used for the same kind of check. However, if you wanted to change it in the kubernetes code you could check to see if flag.ShorthandDeprecated is anything but an empty string (which would note the shorthand is deprecated).. Personally I think either way is OK.

@ashcrow
Copy link
Contributor

ashcrow commented Oct 14, 2015

I pulled the patch, built genman, and gave it a go and it properly hid -c just showing --client and -t just showing --template.

👍

@feihujiang feihujiang force-pushed the removeDeprecatedShorthandInManPage branch 2 times, most recently from 7a7325b to 99adc3c Compare October 15, 2015 01:39
@feihujiang
Copy link
Contributor Author

@ashcrow Yes, len() is used for the same kind of check. But I mean useing len(flag.ShorthandDeprecated) > 0 to verify a shorthand is deprecated or not is not very correct. When a shorthand is deprecated, maybe we specify an empty message, so the flag.ShorthandDeprecated is empty as the shorthand is deprecated. If we don't specify an empty message, it works.

@feihujiang feihujiang force-pushed the removeDeprecatedShorthandInManPage branch from 99adc3c to f3673b8 Compare October 15, 2015 01:51
@k8s-bot
Copy link

k8s-bot commented Oct 15, 2015

GCE e2e test build/test passed for commit 7a7325b7f7c19bcb48f841cf006bd2c26815965c.

@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 15, 2015
@k8s-bot
Copy link

k8s-bot commented Oct 15, 2015

GCE e2e test build/test passed for commit 99adc3c37dd89fd9660a93f6634bd697ac3fb955.

@k8s-bot
Copy link

k8s-bot commented Oct 15, 2015

GCE e2e build/test failed for commit f3673b8.

@feihujiang
Copy link
Contributor Author

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Oct 15, 2015

GCE e2e test build/test passed for commit f3673b8.

@feihujiang feihujiang closed this Oct 15, 2015
@feihujiang feihujiang reopened this Oct 15, 2015
@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2015
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Oct 20, 2015

GCE e2e test build/test passed for commit f3673b8.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Oct 20, 2015

GCE e2e test build/test passed for commit f3673b8.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Oct 20, 2015
@k8s-github-robot k8s-github-robot merged commit e90a890 into kubernetes:master Oct 20, 2015
@ixdy
Copy link
Member

ixdy commented Oct 21, 2015

This broke hack/verify-generated-docs.sh:

Verifying ./hack/../hack/verify-generated-docs.sh
+++ [1020 17:02:11] Building go targets for linux/amd64:
    cmd/gendocs
    cmd/genman
    cmd/genbashcomp
    cmd/mungedocs
+++ [1020 17:02:23] Placing binaries
--- /tmp/tmp.vRu3JJG2lD/docs/man/man1/kubectl-autoscale.1   2015-10-20 17:02:29.816835321 -0700
+++ /jenkins-master-data/jobs/kubernetes-test-go/workspace/docs/man/man1/kubectl-autoscale.1    2015-10-19 14:15:26.358816166 -0700
@@ -72,7 +72,7 @@ An autoscaler can automatically increase
     If non\-empty, sort list types using this field specification.  The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.

 .PP
-\fB\-\-template\fP=""
+\fB\-t\fP, \fB\-\-template\fP=""
     Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
 \[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].

Generated docs are out of date. Please run hack/update-generated-docs.sh
!!! Error in ./hack/../hack/verify-generated-docs.sh:28
  '"${KUBE_ROOT}/hack/after-build/verify-generated-docs.sh" "$@"' exited with status 1
Call stack:
  1: ./hack/../hack/verify-generated-docs.sh:28 main(...)
Exiting with status 1
FAILED

Autoscale merged yesterday in #15739, which was after the last Travis/Shippable run.

fyi @k8s-oncall

@janetkuo janetkuo mentioned this pull request Oct 21, 2015
@janetkuo
Copy link
Member

@ixdy fixing in #15996

@ixdy
Copy link
Member

ixdy commented Oct 21, 2015

Thanks. I filed kubernetes-retired/contrib#197 regarding the submit queue failure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants