dev_container: Respect runServices for Docker Compose#56293
Open
YauhenVasileusky wants to merge 4 commits into
Open
dev_container: Respect runServices for Docker Compose#56293YauhenVasileusky wants to merge 4 commits into
YauhenVasileusky wants to merge 4 commits into
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @YauhenVasileusky on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
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.
This PR fixes Docker Compose dev containers starting every service in the compose project, even when
devcontainer.jsonspecifiesrunServices.Previously, Zed deserialized
runServicesbut did not use it when invoking Docker Compose. The startup command was:With no service operands, Compose starts every enabled service in the project. This means unrelated services are started even when the devcontainer config asks to run only the primary service and its dependencies.
The fix propagates
runServicesinto the Docker Compose build/start path so Zed invokes Compose with the requested services:Compose will still start services required by
depends_on, but unrelated services are left untouched.Reproduction
.devcontainer/devcontainer.json:{ "name": "Run Services", "dockerComposeFile": "../compose.yml", "service": "devcontainer", "runServices": ["devcontainer"], "workspaceFolder": "/workspace" }compose.yml:Expected: Zed starts
devcontaineranddatabase.Before this fix: Zed also starts
unrelated.After this fix:
unrelatedremains stopped.Closes: #57279
Self-Review Checklist:
Release Notes:
runServices.