Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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 👍

@shin- shin- force-pushed the 2927-buildargs-types branch from ee187ea to ba25db6 Compare February 17, 2016 18:42
Numerical driver_opts are also valid and typecast into strings.
Additional config tests.

Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- force-pushed the 2927-buildargs-types branch from ba25db6 to 1952b52 Compare February 17, 2016 19:53
@@ -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
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants