Skip to content

Fix up attach filtering#13664

Merged
glours merged 1 commit intodocker:mainfrom
false200:13660-attach-filter
Mar 25, 2026
Merged

Fix up attach filtering#13664
glours merged 1 commit intodocker:mainfrom
false200:13660-attach-filter

Conversation

@false200
Copy link
Contributor

What I did

Fixed docker compose up --attach ... so Compose only follows logs for explicitly attached services when containers start or restart during up.

Added a regression test covering the --attach service filter behavior.

Related issue

Fixes #13660

Signed-off-by: CodeLoopdroid <214800619+CodeLoopdroid@users.noreply.github.com>
@false200 false200 requested a review from a team as a code owner March 24, 2026 18:58
@false200 false200 requested review from glours and ndeloof March 24, 2026 18:58
@false200
Copy link
Contributor Author

Hi maintainers,

I worked on #13660 and fixed the docker compose up --attach ... behavior so Compose now respects the explicit attach filter when containers start or restart during up.

The root cause was that the start event follow path could begin following logs for services that were being monitored but were not part of the requested --attach selection. I updated that logic to check the attach filter before following logs for started containers.

I also added a regression test to cover this case and verified the fix locally with a real two-service reproduction using --attach validator, where only the selected service logs were attached.

@glours glours enabled auto-merge (rebase) March 25, 2026 08:56
@glours glours merged commit a57320f into docker:main Mar 25, 2026
43 checks passed
@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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 up --attach is ignored

3 participants