Group external stacks reliably via com.docker.compose.project label (#14)#15
Merged
Conversation
Adds label-based grouping as step 0 of assembly (always on, no guessing): containers carrying com.docker.compose.project group into a .composeLabeled stack regardless of the name-prefix setting. This is reliable (no false 'qa' stack, #12) and groups externally- launched stacks once the compose tool labels them (upstream Mcrich23/Container-Compose#110). - StackOrigin.composeLabeled (trusted; no 'wild' badge; link a compose file to enable up/down) - ProjectRegistry.composeProjectLabel constant + label grouping before known/inferred - StackSection offers 'Link compose file' for any unlinked stack - Test: label grouping works with inference off; unlabeled containers stay standalone - Verified live: a patched-container-compose 'shop' stack groups with no 'wild' badge Closes #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds label-based grouping as the first (always-on) step of stack assembly: containers
carrying
com.docker.compose.projectgroup into a.composeLabeledstack — reliably, withno name guessing. Complements the upstream label PR (Mcrich23/Container-Compose#110) and the
default-off name-prefix inference from #13.
Why
The name-prefix heuristic can't tell a real stack from unrelated containers sharing a prefix
(#12). The compose project label is authoritative, so once a compose tool sets it, we group
by it — no false positives, works for externally-launched stacks.
Behavior
.composeLabeledstacks without a linked compose file offer Link compose file… to enable up/down.Verified live (macOS 26, container 1.0.0)
Launched a
shopstack with a patchedcontainer-compose(which now writes the label),then rendered Consai:
shopgroups as a labeled stack with no "wild" badge; unlabeledconek-pgstays standalone. The same stack from the unpatched binary showed flat — confirminggrouping is driven by the label. 25 ConsaiCore tests pass.
Closes #14