-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Update github.com/spf13/pflag and github.com/spf13/cobra #27855
Update github.com/spf13/pflag and github.com/spf13/cobra #27855
Conversation
ebcb115
to
71ce610
Compare
ok to test |
@eparis Should I close this pr, since issue was marked as duplicate and it is closed now or it can be merged just like for updating code? |
IMO, it's still a good idea to update cobra, because that would pull in spf13/cobra#288, which fixes the bash completion for |
71ce610
to
b5640c6
Compare
@andreykurilin looks like there was a slight change in the cobra error message which the _test.go file complains about. Likely we need to update an _test.go as well? |
@eparis yeah, I saw it, but had no time to fix it. I'll try to do it at the beginning of next week |
Update: github.com/spf13/cobra to f62e98d28ab7ad31d707ba837a966378465c7b57 github.com/spf13/cobra/doc to f62e98d28ab7ad31d707ba837a966378465c7b57 github.com/spf13/pflag to 1560c1005499d61b80f865c04d39ca7505bf7f0b Closes issue #29852
b5640c6
to
1b00a2d
Compare
GCE e2e build/test passed for commit 1b00a2d. |
@eparis, tests are green now |
assert.NotContains(t, x.output, "test1 Run") | ||
} | ||
|
||
func TestServerFlagsBad(t *testing.T) { | ||
x := runFull(t, "hyperkube test1 --bad-flag") | ||
assert.EqualError(t, x.err, "unknown flag: --bad-flag") | ||
assert.Contains(t, x.output, "A simple server named test1") | ||
assert.Contains(t, x.output, "--help[=false]: help for hyperkube") | ||
assert.Contains(t, x.output, "-h, --help help for hyperkube") | ||
assert.NotContains(t, x.output, "test1 Run") |
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.
This looks like a little bit strange, the help output really contains so many extra spaces?
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.
Yes. Here you can find example(several options) of old help:
--global-housekeeping-interval=1m0s: Interval between global housekeepings
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
--healthz-bind-address=127.0.0.1: The IP address for the health check server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
--healthz-port=10249: The port to bind the health check server. Use 0 to disable.
-h, --help[=false]: help for hyperkube
--hostname-override="": If non-empty, will use this string as identification instead of the actual hostname.
--housekeeping-interval=10s: Interval between container housekeepings
--iptables-masquerade-bit=14: If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31].
--iptables-sync-period=30s: How often iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.
after this patch it will look like:
--global-housekeeping-interval value Interval between global housekeepings (default 1m0s)
--google-json-key string The Google Cloud Platform Service Account JSON Key to use for authentication.
--healthz-bind-address value The IP address for the health check server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces) (default 127.0.0.1)
--healthz-port value The port to bind the health check server. Use 0 to disable. (default 10249)
-h, --help help for hyperkube
--hostname-override string If non-empty, will use this string as identification instead of the actual hostname.
--housekeeping-interval value Interval between container housekeepings (default 10s)
--iptables-masquerade-bit value If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31]. (default 14)
--iptables-sync-period duration How often iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0. (default 30s)
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.
Nice, this looks more user friendly. Thanks @andreykurilin
LGTM. |
Review status: 0 of 15 files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Reviewed 15 of 15 files at r1. Comments from Reviewable |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 1b00a2d. |
Automatic merge from submit-queue |
Update github.com/spf13/pflag and github.com/spf13/cobra
Update:
github.com/spf13/cobra to f62e98d28ab7ad31d707ba837a966378465c7b57
github.com/spf13/cobra/doc to f62e98d28ab7ad31d707ba837a966378465c7b57
github.com/spf13/pflag to 1560c1005499d61b80f865c04d39ca7505bf7f0b
Closes issue #29852
This change is