Skip to content
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 7 commits into from
Nov 25, 2015

Conversation

dnephin
Copy link

@dnephin dnephin commented Nov 17, 2015

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 to config. As part of this change, there is a new finalize_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.

@dnephin dnephin added this to the 1.6.0 milestone Nov 17, 2015
@dnephin dnephin force-pushed the move_all_validation_to_config branch 2 times, most recently from d617fde to 32af510 Compare November 17, 2015 22:16
@dnephin dnephin force-pushed the move_all_validation_to_config branch from 32af510 to 7e0f3cb Compare November 23, 2015 17:37
@dnephin dnephin force-pushed the move_all_validation_to_config branch from 7e0f3cb to be9f9a2 Compare November 23, 2015 18:29
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>
@dnephin dnephin force-pushed the move_all_validation_to_config branch from be9f9a2 to 533f332 Compare November 23, 2015 18:33
@aanand
Copy link

aanand commented Nov 25, 2015

LGTM

aanand added a commit that referenced this pull request Nov 25, 2015
@aanand aanand merged commit cfb1b37 into docker:master Nov 25, 2015
@dnephin dnephin deleted the move_all_validation_to_config branch November 25, 2015 15:49
@dnephin dnephin modified the milestones: 1.5.2, 1.6.0 Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants