Repository navigation
Merge multiple compose files in the session - #42316
Draft
ggarzia-MSFT wants to merge 2 commits into
Draft
ggarzia-MSFT wants to merge 2 commits into
ggarzia-MSFT wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…to user/ggarzia/compose-multi-file # Conflicts: # src/windows/wslcsession/ComposeNormalizer.cpp # src/windows/wslcsession/ComposeSpec.cpp # src/windows/wslcsession/ComposeSpec.h
This branch has not been deployed
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.
Summary of the Pull Request
Merges multiple Compose files in the WSLC session.
wslc compose -f a.yml -f b.yml ...works, and so does the automatic discovery ofcompose.override.yml. Previously both failed because the session accepted only a single document.PR Checklist
Detailed Description of the Pull Request / Additional comments
ComposeNormalizer::Normalizeaccepts one or more documents and passes all of them toComposeSpec::Parse.ComposeSpec::Parsemerges documents in collection order:command.environmentis merged by variable name andvolumesby container path.portsthat are not already present are appended.!resetclears a setting or removes a service;!overridereplaces a setting or service instead of merging it.imageare checked after merging.BaseDirectory.wslc-compose-operations.mdand theWSLCComposeDocumentcomments inwslc.idlto describe the merge behavior.Stacked on #42257 (
user/ggarzia/compose-globals).Validation Steps Performed
WSLCComposeTests::ComposeMultipleDocumentsMerge,WSLCComposeTests::ComposeMultipleDocumentsReportFailingDocument,WSLCE2EComposeLifecycleTests::WSLCE2E_Compose_MergesDiscoveredOverrideFilecmake --build . -- -m(x64 Debug): passed