Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Fixes some v2 yaml parsing 🐹 #292

Merged
merged 2 commits into from
Jun 2, 2016
Merged

Conversation

vdemeester
Copy link
Collaborator

@vdemeester vdemeester commented Jun 1, 2016

This PR does two things:

Store config version in project 🐮

This is needed for networks and volumes support as we are gonna need to know the version of the config file to act based on it.

Some yaml refactoring/magic and config updates 🐹

Doing several things:

  • Split into smaller files (with test) to make it easier to read.
  • Add a Build type that handle some Build magic
  • Add an External type that handle some external magic (networks, volumes)
  • Add Networks/Network type that handle some Networks magic
  • Refactor the Ulimit types to be simpler and not user reflection

Also adds a merge_fixtures_test.go and testdata folder with some existing compose file to make sure it parses it well (should serve as quick regression tests in the future too).

/cc @joshwget (master of the yaml 😂 😝)

Fixes #291
Needed for #277 and #288 implementations

🐸 🐸

@vdemeester vdemeester added this to the 0.3.0 Admiring Murdock milestone Jun 1, 2016
@vdemeester vdemeester force-pushed the v2-yaml-fixes branch 2 times, most recently from f336219 to 2ab0c34 Compare June 1, 2016 12:02
@vdemeester vdemeester mentioned this pull request Jun 1, 2016
4 tasks
return nil
}

func handleBuildArgs(value interface{}) (map[string]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we shouldn't make these two functions specific to build arguments. We'll probably have to do something similar for logging arguments, so maybe we can move these to a utils.go?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum right now logging key works fine, but I'll keep that in mind because yeah, that's a pretty generic way of handling a map 👼

@joshwget
Copy link
Contributor

joshwget commented Jun 1, 2016

Returning the config version is definitely a good idea. Awesome work with all of the new types. Hopefully that wasn't too tedious!

Just one comment, but LGTM other than that.

This will be needed for v2 network support.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
- Split into smaller files (with test) to make it easier to read
- Add a Build type that handle some Build magic
- Add an External type that handle some external magic (networks,
  volumes)
- Add Networks/Network type that handle some Networks magic
- Refactor the Ulimit types to be simpler and not user reflection

Also adds a merge_fixtures_test.go and testdata folder with some
existing compose file to make sure it parses it well (should serve as
quick regression tests in the future too).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester vdemeester merged commit c999928 into docker:master Jun 2, 2016
@vdemeester vdemeester deleted the v2-yaml-fixes branch June 2, 2016 09:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build: path not supported
3 participants