Skip to content

Fix up attach filtering#13664

Open
false200 wants to merge 1 commit intodocker:mainfrom
false200:13660-attach-filter
Open

Fix up attach filtering#13664
false200 wants to merge 1 commit intodocker:mainfrom
false200:13660-attach-filter

Conversation

@false200
Copy link

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
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.

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

1 participant