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

fix race condition on compose logs #10104

Merged
merged 1 commit into from Dec 20, 2022
Merged

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Dec 20, 2022

What I did

  • printer MUST run before it can handle ContainerEventAttach events. So we MUST start goroutine first
  • prefer an explicit call to printer.Stop() to avoid potential race condition if another goroutine tries to send last log event to the printer after context has been canceled

Related issue
#8880 reported to not be fixed might be related

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

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team December 20, 2022 08:24
@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

Base: 76.98% // Head: 75.79% // Decreases project coverage by -1.19% ⚠️

Coverage data is based on head (0ab5079) compared to base (9d12eec).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10104      +/-   ##
==========================================
- Coverage   76.98%   75.79%   -1.20%     
==========================================
  Files           2        2              
  Lines         252      252              
==========================================
- Hits          194      191       -3     
- Misses         51       53       +2     
- Partials        7        8       +1     
Impacted Files Coverage Δ
pkg/e2e/framework.go 74.04% <0.00%> (-1.28%) ⬇️

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.

@glours glours merged commit 7cf6d5e into docker:v2 Dec 20, 2022
@ndeloof ndeloof deleted the logs_race_condition branch December 20, 2023 13:47
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.

None yet

2 participants