Skip to content

fix: preserve optional dependency state when starting by project - #14421

Closed
huong8373tt-beep wants to merge 1 commit into
docker:mainfrom
huong8373tt-beep:work/compose-14311
Closed

huong8373tt-beep wants to merge 1 commit into
docker:mainfrom
huong8373tt-beep:work/compose-14311

Conversation

@huong8373tt-beep

Copy link
Copy Markdown

Fixes #14311.

Compose stores depends_on metadata in the container label used to reconstruct a project for docker compose start -p. The label previously omitted required, so reconstructed dependencies always became required. This change stores the flag as a fourth field and restores it, while keeping older three-field labels compatible by defaulting them to required=true.

Regression coverage verifies both the new optional-dependency encoding and legacy-label compatibility.

Slai Agent Runtime assisted with the investigation, implementation, and testing of this contribution. The account owner authorized the submitted changes and is responsible for the submission.

Signed-off-by: Slai.life <huong8373tt@gmail.com>
@huong8373tt-beep

Copy link
Copy Markdown
Author

Added the DCO sign-off to the commit and force-pushed the signed commit as 3d79c228. The PR body already includes the Slai Agent Runtime assistance disclosure and account-owner authorization.

@ndeloof

ndeloof commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

duplicates #14312

@huong8373tt-beep

Copy link
Copy Markdown
Author

Thanks for the pointer. #14312 was closed because maintainers do not want to extend the string-formatted label format for this mode; this PR takes the same rejected direction. I am closing it rather than pursuing a duplicate implementation.

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] start -p <name> treats an optional (required: false) dependency as required

2 participants