fix: ignore restartable sidecar exit codes in k8s failure detection - #118
Merged
Conversation
Init containers declared with restartPolicy: Always are native sidecar containers: the kubelet SIGTERMs them during pod wind-down after the main task container finishes, and Kubernetes excludes their exit codes from pod and Job outcome. Treating their non-zero terminations (e.g. JVM services exiting 143 on SIGTERM) as fatal caused successful tasks to be reported as failed and misattributed genuine task failures to collateral sidecar exits. Co-Authored-By: Oz <oz-agent@warp.dev>
ianhodge
approved these changes
Aug 4, 2026
ianhodge
left a comment
Member
There was a problem hiding this comment.
Sorry for the delay on this review!
Contributor
Author
Merge activity
|
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.
User was reporting that that they were getting the following errors in their Oz agent task runs based on the exit status of their sidecars:
The Kubernetes guidance (ref) states the following:
With that in mind, I think it makes us for us to ignore non-zero exit codes for sidecar containers (init containers with
restartPolicy: always) in our handling.REMOTE-2365: https://linear.app/warpdotdev/issue/REMOTE-2365/self-hosted-k8s-worker-falsely-reports-task-failure-when-native