Kitware / gobig

Provisioning big data applications with Resonant
Apache License 2.0
5 stars 3 forks source link

fix problem where default key values for the options option in the ec… #67

Closed opadron closed 8 years ago

opadron commented 8 years ago

…2-pod2 role where not being set properly

jeffbaumes commented 8 years ago

LGTM (code scan). Seems good to factor out hard-coded options.

opadron commented 8 years ago

@jeffbaumes Thanks for staying on top of these PRs. I'll note that the change is more to do with fixing a bug than refactoring options, since both before and after versions are concerned with the same defaults.

The issue is that the option in question is a dict with sub-options. The dict needs merging in order to handle the case where the user provides only some values for its keys and expects the others to be filled with defaults.

This PR correctly implements the default-filling behavior. The prior version would replace the entire default dictionary with the user-provided one, leaving out any sub-options the user did not provide.