Introduce --abort-on-container-failure#11680
Merged
ndeloof merged 1 commit intodocker:mainfrom Apr 8, 2024
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11680 +/- ##
==========================================
- Coverage 54.57% 54.48% -0.10%
==========================================
Files 145 145
Lines 12605 12624 +19
==========================================
- Hits 6879 6878 -1
- Misses 5037 5053 +16
- Partials 689 693 +4 ☔ View full report in Codecov by Sentry. |
glours
reviewed
Apr 3, 2024
Contributor
glours
left a comment
There was a problem hiding this comment.
Some questions about the command flags compatibility before approving
| flags.BoolVar(&create.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.") | ||
| flags.BoolVar(&up.noStart, "no-start", false, "Don't start the services after creating them") | ||
| flags.BoolVar(&up.cascadeStop, "abort-on-container-exit", false, "Stops all containers if any container was stopped. Incompatible with -d") | ||
| flags.BoolVar(&up.cascadeFail, "abort-on-container-failure", false, "Stops all containers if any container exited with failure. Incompatible with -d") |
Contributor
There was a problem hiding this comment.
Incompatible with -d or cascadeStop or both?
If not compatible with -d, I think you forgot to add the associated check in validateFlags function
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This was referenced Jun 20, 2024
robertvolkmann
added a commit
to metal-stack/mini-lab
that referenced
this pull request
May 9, 2025
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.
What I did
Introduce
--abort-on-container-failureas a custom flavor for cascade stop, which only stops on container failure (exit != 0). This allows to run "tasks" defined by services (sorry for the conceptual mismatch) and complete successfully if all succeeded, but fail if any failed, and kill the others (aka "fail fast")Related issue
closes #10225
(not mandatory) A picture of a cute animal, if possible in relation to what you did
