-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all validation to config #2405
Merged
Merged
Conversation
This file contains 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
d617fde
to
32af510
Compare
32af510
to
7e0f3cb
Compare
7e0f3cb
to
be9f9a2
Compare
project name is already normalized to a valid name before creating a service. Signed-off-by: Daniel Nephin <dnephin@docker.com>
Includes creating a new compose.config.types module for all the domain objects. Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
At the same time, moves extra_hosts validation to the config module. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This removes the last of the old service.ConfigError Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
be9f9a2
to
533f332
Compare
LGTM |
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.
To support #1953 we need to be able to fully validate the configuration without creating a client, so all validation needs to be moved to the config package.
Includes a fix for #2008
This removes the deprecated
service.ConfigError
, and moves all the validation toconfig
. As part of this change, there is a newfinalize_service()
function which takes care of creating domain objects for things like Volumes, VolumesFrom, etc. By creating these objects during the config loading we don't have to re-parse the config again from the project and service modules.