Closed florianvazelle closed 3 weeks ago
Thanks for raising this. It looks like we should be catching the 410 and restarting the watch with the latest resourceVersion
.
When the requested watch operations fail because the historical version of that resource is not available, clients must handle the case by recognizing the status code 410 Gone, clearing their local cache, performing a new get or list operation, and starting the watch from the resourceVersion that was returned.
https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes
Which project are you reporting a bug for?
kr8s
What happened?
I'm experiencing an issue when waiting jobs with
kr8s
, like this:And sometimes the code crash and logs:
I can easily avoid the crash, but I wonder if it's expected to have a 410 response here.
I think it's come from the
async_watch
method that replace theraw
attribute with this error response dict:I don't know if the
resourceVersion
, send when we callasync_watch
, is correctly updated for the next call !Anything else?
I use
kr8s 0.15.0
Some references from the kubernetes documentation: