Fix service_completed_successfully to require exit code 0#1481
Open
mokibit wants to merge 2 commits into
Open
Conversation
9b6615d to
5a7908b
Compare
p12tic
reviewed
Jun 22, 2026
6333a90 to
9a1b618
Compare
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>
9a1b618 to
73435b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
service_completed_successfullyto 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.