Support _request_timeout in dynamic client watch() - #2698
Conversation
DynamicClient.watch() did not accept or forward _request_timeout, so callers had no way to set a socket read timeout on a dynamic watch. Add the parameter and pass it through to the underlying Watch.stream(). Fixes kubernetes-client#2533
|
Invalid commit message issues detected Invalid commit messagesKeywords which can automatically close issues and hashtag(#) mentions are not allowed.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: thev1ndu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @thev1ndu! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
DynamicClient.watch()accepts atimeout(the server-sidetimeoutSeconds) but gives no way to set a client socket timeout. The regular client watch already supports_request_timeout. This adds the same parameter to the dynamic watch and forwards it toWatch.stream(), so a stalled connection can be bounded on the client side.Which issue(s) this PR fixes:
Fixes #2533
Special notes for your reviewer:
Added a unit test in
client_test.pythat checks the value reaches the watcher.Does this PR introduce a user-facing change?