-
Notifications
You must be signed in to change notification settings - Fork 42k
update the client generator to set a client-side timeout #70998
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 the client generator to set a client-side timeout #70998
Conversation
|
/priority important-soon |
|
Actually, why is its only for LIST, DELETE COLLECTION, and WATCH? Why not others? |
The others don't have timeouts set on their options structs. I'm not trying to change the API, just make what we have work properly |
ee10ea0 to
0dc40dd
Compare
0dc40dd to
1e20b1d
Compare
|
/retest |
|
This timeout sets the query parameter, but the PR description sounds like it sets the transport layer option--does it do both? |
It sets it on the Request, which sets both a query param: kubernetes/staging/src/k8s.io/client-go/rest/request.go Lines 448 to 451 in d00cb23
and a context deadline honored by the transport: kubernetes/staging/src/k8s.io/client-go/rest/request.go Lines 712 to 719 in d00cb23
|
|
both failures on audit, something about resourceversion (not touched here) /retest |
11f9056 to
c2d1af1
Compare
49571a8 to
ebfd494
Compare
|
/retest |
|
/approve |
|
/retest Review the full test history for this PR. Silence the bot with an |
ebfd494 to
81240dc
Compare
|
New changes are detected. LGTM label has been removed. |
|
rebased and regenerated |
81240dc to
cdb0f0e
Compare
|
New changes are detected. LGTM label has been removed. |
a74eb4b to
2e7e8ca
Compare
2e7e8ca to
8f7edec
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/priority critical-urgent Setting priority to critical-urgent to prevent it from getting kicked out of merge queue in case Tide doesnt get to it by Code freeze time. |
accidentally closed #68895
This is that same pull with the test added.
Our client-go/client has a way to set a context deadline based on a timeout. However, the ListOptions timeoutSeconds didn't trigger this flow since the parameters were built differently. This updates the generated client to set the local timeout as well. This helps in cases where the server hangs unexpectedly or the network fails in some way that prevent the server from closing the request.
@kubernetes/sig-api-machinery-bugs
@sttts @mfojtik @knobunc @ironcladlou @caesarxuchao fyi