Repository navigation
composer: lossless long-syntax import/export, long-syntax-aware valid… - #5
Merged
Merged
Conversation
…ation Import/export: - ports/volumes lists mixing short and long syntax are split instead of parked wholesale in Extra; ExportYAML merges both back into one list. Previously adding a short entry through the form to a service that had long-syntax entries emitted the 'ports'/'volumes' key twice. - A build set through the form now replaces a build mapping kept from import (was a duplicate 'build' key); same rule for healthcheck. - healthcheck: add start_period/start_interval (were silently dropped on round trip). Blocks with disable:, no test, a string test or unknown keys are kept verbatim instead of being narrowed to HealthCheck. - environment mapping form: 'FOO: ""' now becomes 'FOO=' (empty string) and only a null value becomes pass-through 'FOO'. - Unmodeled keys are exported in sorted order, so saving is deterministic. Validation (own semantic checks now also see what lives in Extra): - build mapping without image no longer errors with 'image or build required'. - image together with build is no longer an error: it is valid per the Compose Specification (image names the built image). - service_healthy, 'database has no healthcheck' and 'database has no volumes' consider healthchecks/volumes kept in Extra. - docker.sock mounts and all-interfaces ports are detected in long syntax too. - validate start_period / start_interval durations. New views on ServiceConfig: HasBuild, HasHealthCheck, HasVolumes, PortStrings, VolumeStrings.
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.
…ation
Import/export:
Validation (own semantic checks now also see what lives in Extra):
New views on ServiceConfig: HasBuild, HasHealthCheck, HasVolumes, PortStrings, VolumeStrings.
What changed
How to test
Checklist
make lint/npm run lintpassesmake test/npm testpasses