Skip to content
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

log: fix race on container kill #10459

Merged
merged 1 commit into from
Apr 12, 2023
Merged

log: fix race on container kill #10459

merged 1 commit into from
Apr 12, 2023

Conversation

milas
Copy link
Contributor

@milas milas commented Apr 11, 2023

What I did
Fix an error that could happen while streaming logs (compose up or compose logs -f) and a container gets killed and goes away too fast.

If we go to inspect a container that we got an event for and it no longer exists on the server, handle clean up without erroring out.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did
a hedgehog peering out of some foliage

@milas milas requested a review from a team April 11, 2023 21:19
@milas milas self-assigned this Apr 11, 2023
@milas milas requested review from nicksieger, ndeloof, StefanScherer, ulyssessouza, glours and laurazard and removed request for a team April 11, 2023 21:19
If we go to inspect a container that we got an event for and it
no longer exists on the server, handle clean up without erroring
out.

Fixes docker#10373.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (a4af5e2) 59.76% compared to head (01a21dd) 59.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10459   +/-   ##
=======================================
  Coverage   59.76%   59.77%           
=======================================
  Files         105      105           
  Lines        9074     9076    +2     
=======================================
+ Hits         5423     5425    +2     
- Misses       3080     3081    +1     
+ Partials      571      570    -1     
Impacted Files Coverage Δ
pkg/compose/start.go 53.76% <0.00%> (-0.55%) ⬇️

... and 1 file with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@milas milas merged commit 9ef173a into docker:v2 Apr 12, 2023
@milas milas deleted the watch-kill-race branch April 12, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] docker-compose does not shut-down resources gracefully while using depends_on condition
3 participants