-
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
ec999fc to
dc07a7f
Compare
dc07a7f to
09691b6
Compare
|
we should think of some test for this |
| appendResult(appPath, StatusStopping) | ||
| continue | ||
| } | ||
| if slices.ContainsFunc(s, func(v Status) bool { return v == StatusStopped }) { |
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 have some test for checking the whole app transicition, I want to avoid that if a stop an application this transitioning in the fail state. So this check is ok, if all the other container are running, but if I am stopping an app, I don't want to get a fail state during the transition from running to stopped
| 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
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
3db2a77 to
0243557
Compare
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.