Retry Kubernetes 410 Gone errors in watch streams#218
Draft
Retry Kubernetes 410 Gone errors in watch streams#218
Conversation
Co-authored-by: fabricebrito <1178901+fabricebrito@users.noreply.github.com>
Co-authored-by: fabricebrito <1178901+fabricebrito@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix workflow error due to old resource version
Retry Kubernetes 410 Gone errors in watch streams
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long-running jobs fail when Kubernetes watch API returns 410 (resource version expired). The existing retry logic blocks all 4xx errors, but 410 is a recoverable condition that should trigger a watch restart.
Changes
calrissian/retry.py: Added_is_retryable_4xx()to classify 410 as retryable. Updated retry condition fromretry_on_type & retry_not_4xxtoretry_on_type & (retry_not_4xx | retry_on_410).test_retry.pyandtest_k8s.py.Behavior
Other 4xx errors (400, 403, 404) remain non-retryable. 5xx and network errors continue to retry as before.
Original prompt
This section details on the original issue you should resolve
<issue_title>Got workflow error: "too old resource version: 986858921 (987192637)"</issue_title>
<issue_description>We got this error in a long running job.
I could not reproduce yet. The stacktrace came out scrambled: