Skip to content

Move all validation to config - #2405

Merged
aanand merged 7 commits into
docker:masterfrom
dnephin:move_all_validation_to_config
Nov 25, 2015
Merged

aanand merged 7 commits into
docker:masterfrom
dnephin:move_all_validation_to_config

Conversation

@dnephin

@dnephin dnephin commented Nov 17, 2015

Copy link
Copy Markdown

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 <[email protected]>
Includes creating a new compose.config.types module for all the domain objects.

Signed-off-by: Daniel Nephin <[email protected]>
At the same time, moves extra_hosts validation to the config module.

Signed-off-by: Daniel Nephin <[email protected]>
This removes the last of the old service.ConfigError

Signed-off-by: Daniel Nephin <[email protected]>
@dnephin
dnephin force-pushed the move_all_validation_to_config branch from be9f9a2 to 533f332 Compare November 23, 2015 18:33
@aanand

aanand commented Nov 25, 2015

Copy link
Copy Markdown

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