Skip to content

Fix corner case when there's no container to attach to#10058

Merged
ndeloof merged 1 commit into
docker:v2from
ndeloof:corner_case
Dec 9, 2022
Merged

Fix corner case when there's no container to attach to#10058
ndeloof merged 1 commit into
docker:v2from
ndeloof:corner_case

Conversation

@ndeloof

@ndeloof ndeloof commented Dec 8, 2022

Copy link
Copy Markdown
Contributor

What I did
Fixed a corner case:
if one run docker compose up --scale helloworld=0 with a single-service compose file, no container is actually created (as expected) and watch will never detect application termination

Related issue
close #8752

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@ndeloof
ndeloof requested a review from glours December 8, 2022 17:58
@codecov

codecov Bot commented Dec 8, 2022

Copy link
Copy Markdown

Codecov Report

Base: 77.02% // Head: 77.02% // No change to project coverage 👍

Coverage data is based on head (d3d30cf) compared to base (0234e13).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10058   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files           2        2           
  Lines         235      235           
=======================================
  Hits          181      181           
  Misses         48       48           
  Partials        6        6           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@milas milas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - does this actually address the linked issue, however?

AFAICT that issue isn't about "no container to attach to" cases but <svc>=0 being a way to exclude a service from launching as part of up without having to list out every other service

@ndeloof

ndeloof commented Dec 9, 2022

Copy link
Copy Markdown
Contributor Author

#8752 indeeds report another issue, but the latest codebase doesn't behaves as reported (scale=0 is well supported now), still the reported scenario demonstrates as a deadlock when scale=0 is set (aka "regression").

@ndeloof
ndeloof merged commit 8f991a2 into docker:v2 Dec 9, 2022
@ndeloof
ndeloof deleted the corner_case branch December 9, 2022 09:03
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.

up --scale not working on 2.0.1

2 participants