Skip to content

Commit

Permalink
fix: valid container exit code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
exu committed Jun 27, 2024
1 parent 6dd9003 commit 4ea47e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/executor/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func GetPodErrorMessage(ctx context.Context, client kubernetes.Interface, pod *c

for _, containerStatus := range pod.Status.ContainerStatuses {
if containerStatus.State.Terminated != nil &&
(containerStatus.State.Terminated.ExitCode > 1 || containerStatus.State.Terminated.ExitCode < -1) &&
(containerStatus.State.Terminated.ExitCode >= 1 || containerStatus.State.Terminated.ExitCode < -1) &&
(containerStatus.State.Terminated.Message != "" || containerStatus.State.Terminated.Reason != "") {
if message != "" {
message += "\n"
Expand Down

0 comments on commit 4ea47e9

Please sign in to comment.