Skip to content

Commit

Permalink
include container statuses for all container exit errors
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Dittamo <[email protected]>
  • Loading branch information
pvditt committed Mar 31, 2024
1 parent b1cab3a commit d735443
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,11 @@ func DemystifyFailure(status v1.PodStatus, info pluginsCore.TaskInfo) (pluginsCo
// }
// }
//

var isSystemError bool
// In some versions of GKE the reason can also be "Terminated"
if code == "Shutdown" || code == "Terminated" {
return pluginsCore.PhaseInfoSystemRetryableFailure(Interrupted, message, &info), nil
isSystemError = true
}

//
Expand Down Expand Up @@ -887,6 +889,11 @@ func DemystifyFailure(status v1.PodStatus, info pluginsCore.TaskInfo) (pluginsCo
}
}
}

if isSystemError {
return pluginsCore.PhaseInfoSystemRetryableFailure(Interrupted, message, &info), nil
}

return pluginsCore.PhaseInfoRetryableFailure(code, message, &info), nil
}

Expand Down

0 comments on commit d735443

Please sign in to comment.