Repository navigation
Add global timeout flag - #33958
Add global timeout flag#33958k8s-github-robot merged 2 commits into
Conversation
|
Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "@k8s-bot ok to test" on its own line. Regular contributors should join the org to skip this step. |
| } | ||
| cmd.Flags().Duration("update-period", updatePeriod, `Time to wait between updating pods. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`) | ||
| cmd.Flags().Duration("poll-interval", pollInterval, `Time delay between polling for replication controller status after the update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`) | ||
| cmd.Flags().Duration("timeout", timeout, `Max time to wait for a replication controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`) |
There was a problem hiding this comment.
You cannot change these flag names without breaking existing scripts.
There was a problem hiding this comment.
reverted local flag names back to timeout. Updated global flag to --request-timeout 396551b
|
cc: @kubernetes/kubectl |
|
@deads2k or @fabianofranz could you take a look please? |
| FlagImpersonate = "as" | ||
| FlagUsername = "username" | ||
| FlagPassword = "password" | ||
| FlagTimeout = "request-timeout" |
There was a problem hiding this comment.
@kubernetes/kubectl Any comments on the flag name? --timeout was already take by commands that use reapers for a different meaning.
|
Squash and lgtm. I'll leave it open a day for comments on the flag name. |
|
Oh, and test-cmd test. A |
Yes, when using the default When used with a non-zero After |
Right, just pointed that out for your test-cmd.sh test. |
396551b to
5933816
Compare
|
@juanvallejo any priority between local timeout flag and global flag? |
I guess, since The changes LGTM, but since this is a new feature, release not is needed @juanvallejo, |
|
Thanks for the feedback, release note added! |
5933816 to
778e57e
Compare
|
If there are no objections I'm gonna tag it for merge later today. |
|
@k8s-bot ok to test |
| } | ||
|
|
||
| // BindDurationFlag binds the flag based on the provided info. If LongName == "", nothing is registered | ||
| func (f FlagInfo) BindDurationFlag(flags *pflag.FlagSet, target *time.Duration) { |
There was a problem hiding this comment.
I still believe --request-timeout should support values without units, which defaults to seconds like every other timeout flag out there. Like in ssh, timeout, scp, curl, and so on.
You'd probably have to use string and parse it by yourself like in here.
There was a problem hiding this comment.
Like --request-timeout=30 is the first thing I'll try.
There was a problem hiding this comment.
Done! Thanks for providing the example
778e57e to
1742dc5
Compare
|
LGTM |
|
@juanvallejo can you look into those test failures and link to flakes? |
1742dc5 to
10571e3
Compare
…bal-timeout-flag Automatic merge from submit-queue Add global timeout flag **Release note**: ```release-note Add a new global option "--request-timeout" to the `kubectl` client ``` UPSTREAM: https://github.com/kubernetes/client-go/pull/10 This patch adds a global timeout flag (viewable with `kubectl -h`) with a default value of `0s` (meaning no timeout). The timeout value is added to the default http client, so that zero values and default behavior are enforced by the client. Adding a global timeout ensures that user-made scripts won't hang for an indefinite amount of time while performing remote calls (right now, remote calls are re-tried up to 10 times when each attempt fails, however, there is no option to set a timeout in order to prevent any of these 10 attempts from hanging indefinitely). **Example** ``` $ kubectl get pods # no timeout flag set - default to 0s (which means no timeout) NAME READY STATUS RESTARTS AGE docker-registry-1-h7etw 1/1 Running 1 2h router-1-uv0f9 1/1 Running 1 2h $ kubectl get pods --request-timeout=0 # zero means no timeout no timeout flag set NAME READY STATUS RESTARTS AGE docker-registry-1-h7etw 1/1 Running 1 2h router-1-uv0f9 1/1 Running 1 2h $kubectl get pods --request-timeout=1ms Unable to connect to the server: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) ```
…rnetes#34269) ### Issue # (if applicable) Closes kubernetes#33958 ### Reason for this change Duplicate id of alarm of multiple StepScalingPolicy ### Description of changes Update Lambda permission prefix to use `Names.uniqueId` Considering this requires resource destruction, please let me know if i need a feature flag for the fix. As there was another feature flag in the exact same place. ### Description of how you validated changes Unit + Integ ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Release note:
UPSTREAM: https://github.com/kubernetes/client-go/pull/10
This patch adds a global timeout flag (viewable with
kubectl -h) witha default value of
0s(meaning no timeout).The timeout value is added to the default http client, so that zero
values and default behavior are enforced by the client.
Adding a global timeout ensures that user-made scripts won't hang for an
indefinite amount of time while performing remote calls (right now, remote
calls are re-tried up to 10 times when each attempt fails, however, there is
no option to set a timeout in order to prevent any of these 10 attempts from
hanging indefinitely).
Example
This change is