-
Notifications
You must be signed in to change notification settings - Fork 185
Fixes kubernetes-client/python issue 1047 "ResponseNotChunked from watch" #231
Conversation
Welcome @dhague! |
The build failure seems to be a flaky test unrelated to this PR, and has occurred in other commits on |
please squash the commits have you manually tested it in your env to verify the fix? The documentation below says stream is a wrapper for read(), but does not mention read_chunked(). stream(amt=65536, decode_content=None) |
…tch" In recent versions of K8S (>1.16?), when a `Watch.stream()` call uses a resource_version which is too old the resulting 410 error is wrapped in JSON and returned in a non-chunked 200 response. Using `resp.stream()` instead of `resp.read_chunked()` automatically handles the response being either chunked or non-chunked.
|
thanks for pr /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhague, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In recent versions of K8S (>1.16?), when a
Watch.stream()
call uses aresource_version which is too old the resulting 410 error is wrapped in JSON
and returned in a non-chunked 200 response. Using
resp.stream()
instead ofresp.read_chunked()
automatically handles the response being either chunked ornon-chunked.