cli/compose: assorted fixes and cleanups#6803
Draft
thaJeztah wants to merge 6 commits intodocker:masterfrom
Draft
cli/compose: assorted fixes and cleanups#6803thaJeztah wants to merge 6 commits intodocker:masterfrom
thaJeztah wants to merge 6 commits intodocker:masterfrom
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The existing code only sorted by PublishedPort (host port), and did not account for multiple ports mapped to the same host-port, but using a different protocol. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- construct merge-opts as a slice - remove intermediate var for overrideServices - use slices.SortFunc for sorting Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The code was using an intermediate map, indexed by name, for both the "base" services _and_ for overrides. This meant that multiple files containing an override for a service would be ignored. Remove the intermediate map for overrides, and apply all overrides for a service instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It's now only used once; let's inline it to remove some abstraction. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Inline it in mergeLoggingConfig and add some vars, which also makes it more readable. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
9d7df02 to
cdc3038
Compare
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.
cli/compose/convert: convertUlimits: modernize
cli/compose/convert: convertEndpointSpec: fix sorting of ports
The existing code only sorted by PublishedPort (host port), and did
not account for multiple ports mapped to the same host-port, but
using a different protocol.
cli/compose/loader: mergeServices: tidy up and modernize
cli/compose/loader: mergeServices: remove intermediate map for overrides
The code was using an intermediate map, indexed by name, for both the
"base" services and for overrides. This meant that multiple files
containing an override for a service would be ignored.
Remove the intermediate map for overrides, and apply all overrides for
a service instead.
cli/compose/loader: mergeServices: inline mapByName
It's now only used once; let's inline it to remove some abstraction.
cli/compose/loader: remove getLoggingDriver
Inline it in mergeLoggingConfig and add some vars, which also
makes it more readable.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)