Skip to content

Conversation

@giulio93
Copy link
Contributor

@giulio93 giulio93 commented Nov 27, 2025

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.

@giulio93 giulio93 requested a review from lucarin91 November 27, 2025 13:21
@giulio93 giulio93 force-pushed the add_stopped_state_to_app_status branch 2 times, most recently from 9be4ebb to 1bfe213 Compare November 27, 2025 13:23
@giulio93 giulio93 force-pushed the add_stopped_state_to_app_status branch 4 times, most recently from ec999fc to dc07a7f Compare November 28, 2025 08:36
@giulio93 giulio93 force-pushed the add_stopped_state_to_app_status branch from dc07a7f to 09691b6 Compare November 28, 2025 08:36
@lucarin91
Copy link
Contributor

we should think of some test for this

@lucarin91 lucarin91 changed the title Add status stopped in container list app status fix: make app failed if a container is stopped Nov 28, 2025
appendResult(appPath, StatusStopping)
continue
}
if slices.ContainsFunc(s, func(v Status) bool { return v == StatusStopped }) {
Copy link
Contributor

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,
},
{
Copy link
Contributor

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>
@giulio93 giulio93 force-pushed the add_stopped_state_to_app_status branch from 3db2a77 to 0243557 Compare November 28, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants