Support _request_timeout in dynamic client watch()
@Polimixanos đang làm issue này rồi.
Từ ngày 23/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
When using the dynamic client’s watch() method:
api = self._client.resources.get(
api_version=self._api_version,
kind=self._kind
)
for event in api.watch(
timeout=server_timeout_seconds,
)
there is currently no way to configure a client-side request timeout (_request_timeout).
Current Workaround
To enforce a client-side timeout, we have to bypass Resource.watch() and directly use Watch().stream():
for raw_event in Watch().stream(
api.get,
serialize=False,
deserialize=False,
timeout_seconds=self._server_timeout_seconds,
_request_timeout=self._client_timeout_seconds,
)
Issue
The dynamic client’s watch() method internally relies on Watch().stream() but does not expose _request_timeout as a parameter: https://github.com/kubernetes-client/python/blob/master/kubernetes/base/dynamic/client.py#L203
This creates:
Inconsistent API ergonomics
Unnecessary duplication of logic for users needing client-side timeouts
Proposed Solution
Extend Resource.watch() to accept an optional _request_timeout parameter and pass it through to the underlying Watch().stream() call.
Example:
api.watch(
timeout=server_timeout_seconds,
_request_timeout=(connect_timeout, read_timeout),
)
- Ngôn ngữ chính
- Python
- Star
- 7.7k
- Fork
- 3.5k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 18
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kubernetes-client/python
-
kind/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
kubernetes-client/python#2280 · 16 bình luận · 9 reaction ·
-
Release 1.37 Đang mở
kubernetes-client/python#2691 · 1 bình luận · 1 reaction · 1 người được giao ·
-
Growing library size Đang mởhelp wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
kubernetes-client/python#2677 · 13 bình luận · 1 reaction ·
-
help wanted kind/feature
kubernetes-client/python#2602 · 6 bình luận · 1 người được giao ·
-
kind/bug
kubernetes-client/python#2596 · 12 bình luận · 2 reaction · 1 người được giao ·
Tất cả issue của kubernetes-client/python
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100