-
Notifications
You must be signed in to change notification settings - Fork 7
fix: make app failed if a container is stopped #116
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
base: main
Are you sure you want to change the base?
Conversation
9be4ebb to
1bfe213
Compare
dc07a7f to
09691b6
Compare
|
we should think of some test for this |
| containerState: []container.ContainerState{container.StateRunning, container.StateDead, container.StateRemoving, container.StateRestarting, container.StateExited}, | ||
| want: StatusFailed, | ||
| }, | ||
| { |
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.
we should add a test for the new check
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.
Created as status failed!
i've also added statusMessage string example inspired by some real cases
3db2a77 to
0243557
Compare
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
0243557 to
2549af2
Compare
2549af2 to
a09d652
Compare
9b7128a to
fbcc770
Compare
fbcc770 to
fe0cced
Compare
339d18c to
09a7e8b
Compare
09a7e8b to
acba544
Compare
| return StatusStopped | ||
| case container.StateExited: | ||
| if !isExitBySignal(statusMessage) { | ||
| return StatusFailed |
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.
| return StatusFailed | |
| // The app exited on its own, which we consider a failure. | |
| return StatusFailed |
| return StatusStopped | ||
| case container.StateDead: | ||
| return StatusFailed | ||
|
|
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.
Motivation
If at least a container of an application is stopped due to any reason, the application status should be failed.
In this way even if other containers are up and running the state of the application state is set as failed, and the user can debug the failed container.