You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In watch.py, next() is set to stop iteration if the k8s server provides an empty response (i.e. when the server timeout expires). I believe this is undesirable.
From the perspective of kubernetes_asyncio, it should not matter if the client or if the server has timed out; the watcher should attempt to reconnect unless the user-specified timeout (timeout_seconds) has elapsed.
I believe this is how the standard Python client handles it:
When iter_resp_lines(resp) returns a value which evaluates to False (e.g. the k8s api returns an empty response), iteration stops. Unless _stop has been set to True, the client will attempt to reconnect.
The text was updated successfully, but these errors were encountered:
In watch.py,
next()
is set to stop iteration if the k8s server provides an empty response (i.e. when the server timeout expires). I believe this is undesirable.kubernetes_asyncio/kubernetes_asyncio/watch/watch.py
Lines 145 to 150 in 91b2c41
Instead, the logic should be similar to the logic in the previous
except
block, which handlesasyncio.TimeoutError
:kubernetes_asyncio/kubernetes_asyncio/watch/watch.py
Lines 136 to 141 in 91b2c41
From the perspective of kubernetes_asyncio, it should not matter if the client or if the server has timed out; the watcher should attempt to reconnect unless the user-specified timeout (
timeout_seconds
) has elapsed.I believe this is how the standard Python client handles it:
https://github.com/kubernetes-client/python-base/blob/d30f1e6fd4e2725aae04fa2f4982a4cfec7c682b/watch/watch.py#L141-L157
When
iter_resp_lines(resp)
returns a value which evaluates to False (e.g. the k8s api returns an empty response), iteration stops. Unless _stop has been set to True, the client will attempt to reconnect.The text was updated successfully, but these errors were encountered: