Skip to content

Support _request_timeout in dynamic client watch() - #2698

Open
thev1ndu wants to merge 1 commit into
kubernetes-client:masterfrom
thev1ndu:dynamic-watch-request-timeout
Open

Support _request_timeout in dynamic client watch()#2698
thev1ndu wants to merge 1 commit into
kubernetes-client:masterfrom
thev1ndu:dynamic-watch-request-timeout

Conversation

@thev1ndu

Copy link
Copy Markdown

What type of PR is this?

/kind feature

What this PR does / why we need it:

DynamicClient.watch() accepts a timeout (the server-side timeoutSeconds) 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 to Watch.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.py that checks the value reaches the watcher.

Does this PR introduce a user-facing change?

Dynamic client `watch()` now accepts `_request_timeout` and forwards it to the underlying watch stream.

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
@kubernetes-prow kubernetes-prow Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 31, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Invalid commit message issues detected

Invalid commit messages

Keywords which can automatically close issues and hashtag(#) mentions are not allowed.

  • d88107a Support _request_timeout in dynamic client watch()

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.

@kubernetes-prow kubernetes-prow Bot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 31, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thev1ndu
Once this PR has been reviewed and has the lgtm label, please assign roycaihw for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow
kubernetes-prow Bot requested review from fabianvf and roycaihw August 31, 2026 06:55
@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 31, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @thev1ndu!

It looks like this is your first PR to kubernetes-client/python 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/python has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support _request_timeout in dynamic client watch()

1 participant