-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
build['args'] = resolve_build_args(build) | ||
build['args'] = dict( | ||
[(k, str(v)) for k, v in resolve_build_args(build).items()] | ||
) |
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.
Since we do this in a couple places, could we make this a function?
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.
done 👍
ee187ea
to
ba25db6
Compare
Numerical driver_opts are also valid and typecast into strings. Additional config tests. Signed-off-by: Joffrey F <joffrey@docker.com>
ba25db6
to
1952b52
Compare
@@ -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') |
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.
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>
Updated to include network |
LGTM |
Constraint build argument types. Numbers are cast into strings.
Numerical
driver_opts
are also valid and typecast into strings.FIxes #2927