Filter services in config --no-interpolate to respect [SERVICE...] argument#13637
Open
odlev wants to merge 1 commit intodocker:mainfrom
Open
Filter services in config --no-interpolate to respect [SERVICE...] argument#13637odlev wants to merge 1 commit intodocker:mainfrom
odlev wants to merge 1 commit intodocker:mainfrom
Conversation
…gument
When using docker compose config --no-interpolate with specific service
names, the SERVICE argument was being ignored and all services were
returned. This adds service filtering after the model is loaded in the
no-interpolate code path.
Fixes docker#13614
Signed-off-by: odlevq@gmail.com
Contributor
|
that's incorrect. A compose command with a SERVICE set will enable target service and dependencies, which is challenging to implement as the dependency logic relies on go types in compose-go |
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 I did
When using
docker compose config --no-interpolatewith specific service names(e.g.,
docker compose config --no-interpolate example1), the[SERVICE...]argument was being ignored and all services were output.
The root cause is that
runConfigNoInterpolate()callsToModel()whichreturns the full model without filtering by service names. Added service
filtering after model loading to match the behavior of the interpolated
code path.
Related issue
Fixes #13614
How I tested
the requested service is output when using
--no-interpolatewith aservice name filter