Skip to content

Expose client-side request timeouts in dynamic watch() (#31) - #2801

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-client:masterfrom
brendandburns:agent/p2-issue-16
Nov 22, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-client:masterfrom
brendandburns:agent/p2-issue-16

Conversation

@brendandburns

@brendandburns brendandburns commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

DynamicClient.watch() exposed a server-side stream timeout but not the client-side connection/read timeout. The wrapper now accepts and forwards _request_timeout, keeping the two timeout controls distinct.

  • Usage: timeout limits the server-side watch; _request_timeout uses the client’s scalar or (connect, read) convention.
for event in pods.watch(timeout=300, _request_timeout=(5, 30)):
    ...

Supersedes: #2527 which seems to have stalled.

`DynamicClient.watch()` and `Resource.watch()` now accept and forward `_request_timeout` for client-side connection/read timeouts.

* test: cover dynamic watch client request timeout
* fix: forward client timeout through dynamic watch
@kubernetes-prow kubernetes-prow Bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 22, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from roycaihw and yliaog November 22, 2026 23:00
@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 22, 2026
@yliaog

yliaog commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

/kind feature
/release-note-edit

`DynamicClient.watch()` and `Resource.watch()` now accept and forward `_request_timeout` for client-side connection/read timeouts.

@kubernetes-prow

Copy link
Copy Markdown
Contributor

@yliaog: /release-note-edit must be used with a single release note block.

Details

In response to this:

/kind feature
/release-note-edit

`DynamicClient.watch()` and `Resource.watch()` now accept and forward `_request_timeout` for client-side connection/read timeouts.

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.

@kubernetes-prow kubernetes-prow Bot added 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. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 22, 2026
@yliaog

yliaog commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

thanks for the PR

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 22, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, yliaog

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 4c0a684 into kubernetes-client:master Nov 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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()

2 participants