-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Introduce new config format with volume support and versioning #2113
Conversation
|
||
@validate_top_level_object | ||
def get_config_version(config): | ||
return config.get('version') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be in a separate function. It's a dict lookup so can just be a line in pre_process_config
function and then that way we're not doing validate_top_level_object
twice.
Sorry, just so i understand correctly... Docker compose is going to be switching to using json now instead of yaml files? Just want to get ready for this change since i'll be upgrading as soon as the new version comes out. |
@michaeljs1990 no we're not switching to json. We can use jsonschema with yaml configuration since they deserialize into the same python structure. |
@dnephin thanks, sorry for the confusion. |
6bf736b
to
6e1c4a7
Compare
607af35
to
2bdaabf
Compare
The validation module has been updated to detect automatically which version is being used and switch schemas accordingly. Signed-off-by: Joffrey F <[email protected]>
This change effectively discards the contents of the 'volumes' dictionary if using a v2 config. This will be implemented separately. The version is detected dynamically to support both legacy and v2 formats. Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Daniel Nephin <[email protected]>
Rewrite some of the logic to better accomodate differing formats now and in the future. Signed-off-by: Joffrey F <[email protected]>
Reference service definition in the base field schema (v1) instead of copying it over. Limit acceptable types for driver options in volume definition. Signed-off-by: Joffrey F <[email protected]>
To support the expanding config format, we now use a complex `config.Config` object containing version, services, and volumes information. project.Project updated accordingly and tests take the new format into account. Signed-off-by: Joffrey F <[email protected]>
Add Volume class that supports basic volume operations (creation, removal, inspection). Project class sets up volume at the beginning of Project.up() Volume config is now properly passed down to Project class. Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
API 1.21 is required to support volume declaration. Update tearDown method for integration tests to remove test volumes. Signed-off-by: Joffrey F <[email protected]>
The volume format returned by the API has changed in recent version, causing issues when trying to recreate containers with volumes attached. Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Volumes were being inserted in the services list, causing issues at runtime. Also catch API error when volume driver is invalid. Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
322f713
to
84a9f0e
Compare
Signed-off-by: Joffrey F <[email protected]>
Closing in favor of #2421 (because the code has undergone significant changes since, rewriting the PR had become easier than rebasing the changes). |
This is a work in progress (volume support is not implemented) submitted early so we can start discussing the design approach and new schema.