Skip to content

Fix service_completed_successfully to require exit code 0#1481

Open
mokibit wants to merge 2 commits into
containers:mainfrom
mokibit:depends-on-exit-code-0
Open

Fix service_completed_successfully to require exit code 0#1481
mokibit wants to merge 2 commits into
containers:mainfrom
mokibit:depends-on-exit-code-0

Conversation

@mokibit

@mokibit mokibit commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Fix service_completed_successfully to verify the dependency exits with code 0, per the Docker Compose spec. Previously, it only checked that the container had stopped, ignoring non-zero exit codes and allowing dependent services to start even if the dependency failed.

Docker Compose implementation reference:
https://github.com/docker/compose/blob/v2.29.7/pkg/compose/convergence.go#L433

This PR builds on #1337 thanks to mrIncompetent.

Fixes #1330, #575.

@mokibit mokibit force-pushed the depends-on-exit-code-0 branch from 9b6615d to 5a7908b Compare June 22, 2026 15:56
Comment thread tests/integration/deps/test_podman_compose_deps.py Outdated
@mokibit mokibit force-pushed the depends-on-exit-code-0 branch 5 times, most recently from 6333a90 to 9a1b618 Compare June 29, 2026 19:21
mrIncompetent and others added 2 commits June 30, 2026 21:15
Previously accepted any container stop, now correctly validates exit code 0 matching Docker Compose behavior.

Docker Compose implementation reference:
https://github.com/docker/compose/blob/v2.29.7/pkg/compose/convergence.go#L433

Signed-off-by: Henrik Schmidt <mrIncompetent@users.noreply.github.com>
Co-authored-by: Monika Kairaityte <monika@kibit.lt>
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
@mokibit mokibit force-pushed the depends-on-exit-code-0 branch from 9a1b618 to 73435b3 Compare June 30, 2026 18:15
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.

depends_on service_completed_successfully isn't always followed

3 participants