Conversation
DryRunClient fakes container state as permanently running/healthy, which never satisfies the exited-state check that service_completed_successfully waits for. With up -d passing no default timeout, the wait loop polled forever and dry-run never returned, even though no container was ever really started. Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
Wait has no real container to observe in dry-run: getContainers falls back to the live daemon and finds nothing, so the command failed with a misleading "no containers for project" error instead of signaling upfront that the operation doesn't apply under simulation. Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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
Fixed two related
--dry-runbugs:docker compose --dry-run up -dhung forever when a service dependedon another via
depends_on: condition: service_completed_successfully.DryRunClientfakes container state as permanently running/healthy,which never satisfies the exited-state check that
service_completed_successfullywaits for — and sinceup -dappliesno default timeout, the wait loop polled every 500ms indefinitely.
isServiceCompletednow short-circuits to an immediate success indry-run mode.
docker compose --dry-run wait <service>failed with a misleadingno containers for project "X"error instead of a clear signal thatthe command doesn't apply under simulation (
waithas no realcontainer to observe in dry-run).
Waitnow refuses upfront with aclear error instead.
Related issue
fixes #14269
(not mandatory) A picture of a cute animal, if possible in relation to what you did
