-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Use appropriate dependency condition for one-shot containers when running compose up --wait
#9572
Merged
Conversation
This file contains 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
laurazard
force-pushed
the
dont-wait-for-oneshots
branch
from
June 17, 2022 22:48
7dc5362
to
d589a01
Compare
…ning `compose up --wait` Also add e2e tests to ensure `compose up --wait` does not get stuck forever waiting for one-shot containers Signed-off-by: Laura Brehm <[email protected]>
laurazard
force-pushed
the
dont-wait-for-oneshots
branch
from
June 17, 2022 23:20
d589a01
to
fd8538f
Compare
milas
approved these changes
Jun 21, 2022
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.
LGTM
ngwxw
approved these changes
Jun 22, 2022
ngwxw
approved these changes
Jun 22, 2022
glours
approved these changes
Jun 22, 2022
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.
LGTM
… version Signed-off-by: Laura Brehm <[email protected]>
What animal is this? |
haines
added a commit
to haines/cerbos-sdk-javascript
that referenced
this pull request
Oct 25, 2022
docker/compose#9572 Signed-off-by: Andrew Haines <[email protected]>
haines
added a commit
to cerbos/cerbos-sdk-javascript
that referenced
this pull request
Oct 25, 2022
#324) docker/compose#9572 Signed-off-by: Andrew Haines <[email protected]>
cc @ilyamonakov for your case of |
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.
Signed-off-by: Laura Brehm [email protected]
What I did
When creating a dependency map to wait on during
compose up --wait
, we were previously applying therunning_or_healthy
condition to all containers indiscriminately.However, in compose files with one-shot containers used for setup (database migrations, etc.) that are configured as dependencies of others with the condition
service_completed_successfully
, this does not work and the command will get stuck as it is expected that these containers run and then exit, and so they never satisfyrunning_or_healthy
.This PR changes the dependency logic to use the appropriate condition for these containers so that
compose up --wait
exits properly when all services have reach the desired state (running/healthy for some, exited for one-shots).Also add e2e tests to ensure
compose up --wait
does not get stuck forever waiting for one-shot containers.Related issue
Fixes #9273
(not mandatory) A picture of a cute animal, if possible in relation with what you did