-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(executor): Move exit code capture to controller. See #5251 #5254
Conversation
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
if node.Outputs != nil && node.Outputs.ExitCode == nil { | ||
for _, c := range pod.Status.ContainerStatuses { | ||
if c.Name == common.MainContainerName && c.State.Terminated != nil { | ||
node.Outputs.ExitCode = pointer.StringPtr(fmt.Sprint(c.State.Terminated.ExitCode)) | ||
updated = true | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MUCH better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have buggy code in the executor where it is hard to test when you can have that buggy code in the controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should run before PodGC. I think it should be. we need to test the edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This runs whenever the exit code is known (because the container is terminated) but has not been set yet.
I'm doubling-down on this refactoring.
Closing. Re-opening shortly. |
See #5251