-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Handling Watch Stream Exception #843
Comments
Hi @neliel123 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
I'm currently trying to figure out what we should be doing with the Using K8s: 1.10.3 Here is a rough outline of our code, right now: while True:
try:
stream = watch.Watch().stream(client.list_pod_for_all_namespaces)
for pod in stream:
# do some parsing
except K8sApiException as e:
# swallow error
except ValueError as e:
# We occasionally run into this problem: https://github.com/kubernetes-client/python/issues/895
# swallow error if above issue comes up When we swallow errors, the stream is started fresh and the |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@salilgupta1
So I think you don't need to pass back |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
have this code that is implemented as a thread as a watch component.
But sometimes for some reason, I am getting below exception
Currently I am catching the APIException and let it pass...I am just wondering what should be the proper way to handle this?
Should I stop the watch object and then create a new watch object?
I don't exactly know how to reproduce the error as it seems to be random in nature so I am just wondering what should I do in my except code.
The text was updated successfully, but these errors were encountered: