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

Constraint build argument types. Numbers are cast into strings. #2938

Merged
merged 2 commits into from
Feb 18, 2016

Conversation

shin-
Copy link

@shin- shin- commented Feb 17, 2016

Numerical driver_opts are also valid and typecast into strings.

FIxes #2927

@shin- shin- added this to the 1.6.1 milestone Feb 17, 2016
build['args'] = resolve_build_args(build)
build['args'] = dict(
[(k, str(v)) for k, v in resolve_build_args(build).items()]
)
Copy link

Choose a reason for hiding this comment

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

Since we do this in a couple places, could we make this a function?

Copy link
Author

Choose a reason for hiding this comment

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

done 👍

Numerical driver_opts are also valid and typecast into strings.
Additional config tests.

Signed-off-by: Joffrey F <joffrey@docker.com>
@@ -292,7 +293,7 @@ def load(config_details):
config_details = config_details._replace(config_files=processed_files)

main_file = config_details.config_files[0]
volumes = load_mapping(config_details.config_files, 'get_volumes', 'Volume')
volumes = load_volumes(config_details.config_files)
networks = load_mapping(config_details.config_files, 'get_networks', 'Network')
Copy link

Choose a reason for hiding this comment

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

I just noticed we have the same issue with network.driver_opts. Probably makes sense to fix it here as well?

Signed-off-by: Joffrey F <joffrey@docker.com>
@shin-
Copy link
Author

shin- commented Feb 18, 2016

Updated to include network driver_opts as well.

@dnephin
Copy link

dnephin commented Feb 18, 2016

LGTM

shin- added a commit that referenced this pull request Feb 18, 2016
Constraint build argument types. Numbers are cast into strings.
@shin- shin- merged commit d3a95c2 into docker:master Feb 18, 2016
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.

None yet

3 participants