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 compose -p x logs -f detect new services started after command #10622

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented May 25, 2023

when we run compose --project-name logs we SHOULD detect new services being started after the initial model has been built from actual ressources. For this purpose,

  • options.Services filter is only set when project is not nil
  • create events` adds container to the watched list

added an e2e test to check this behaves as expected

Related issue
fixes #10618

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

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 83.33% and project coverage change: +0.55 🎉

Comparison is base (6f6e163) 59.55% compared to head (0d6b99e) 60.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10622      +/-   ##
==========================================
+ Coverage   59.55%   60.11%   +0.55%     
==========================================
  Files         107      107              
  Lines        9438     9450      +12     
==========================================
+ Hits         5621     5681      +60     
+ Misses       3241     3193      -48     
  Partials      576      576              
Impacted Files Coverage Δ
pkg/compose/start.go 61.57% <77.77%> (+7.80%) ⬆️
pkg/compose/events.go 79.48% <100.00%> (ø)
pkg/compose/logs.go 74.00% <100.00%> (+34.95%) ⬆️

... and 3 files with indirect coverage changes

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

@ndeloof ndeloof changed the title compute service hash with a default DeployConfig fix compose -p x logs -f detect new services started after command May 25, 2023
@ndeloof
Copy link
Contributor Author

ndeloof commented May 26, 2023

e2e test is failing due to #10621 : scale up recreate container, which takes 10s

@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team May 26, 2023 08:44
…logs` with no explicit services

Signed-off-by: Nicolas De Loof <[email protected]>
Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

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

LGTM!

I did a bunch of combinations of up & down across different terminals, targeting specific services/adjusting scale/etc with an open compose -p $NAME logs -f session and everything worked great ✨

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

@glours glours merged commit 7c3fe35 into docker:v2 Jun 2, 2023
@ndeloof ndeloof deleted the logs_follow 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.

[BUG] docker compose -p <Project> logs -f not showing logs of later started containers
3 participants