-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Prefer Hiera data to params.pp #652
base: master
Are you sure you want to change the base?
Conversation
This limit the quantity of spaghetti code we add when adding support for another platform. No functional change.
python::gunicorn_package_name: 'gunicorn' | ||
python::manage_pip_package: true | ||
python::manage_venv_package: true | ||
python::pip::group: 'root' |
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.
Kudos to who can tell me what is wrong here: the default value is not catch by Automatic Parameter Lookup in spec/defines/pip_spec.rb
. Setting an explicit value in the test suite or a default value in manifests/pip.pp
for the $group
parameter workaround the issue, but I don't get why it is not working as expected.
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.
Also, setting values for sub-classes of python is unusual (and maybe not supported?) but I would like to avoid breaking backwards compatibility in this PR.
d12d59e
to
d30263f
Compare
I would expect Automatic Parameter Lookup to do exactly this, but it does not.
d30263f
to
3a3ff1d
Compare
@@ -0,0 +1,11 @@ | |||
--- | |||
python::version: '3' |
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.
can you please keep the data in the init.pp instead common.yaml? That enables puppet-strings to pick it up and document it in the REFERENCE.md.
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.
at https://voxpupuli.org/docs/reviewing_pr/, we have:
Are hiera yaml files added for data-in-modules? Ensure that the data is compatible with hiera 5. Static data that is equal across every supported operating system must stay in the init.pp, it shouldn’t be moved to a common.yaml due to puppet-strings issue #250.
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.
These parameters in common.yaml
have overrides in other data/**/*.yaml
and should be os-dependent. They where previously documented as:
Default value: `$python::params::<foo>`
this line is not shown anymore. If we put the value in init.pp
instead of common.yaml
, wrong default values would be documented for some operating systems.
This limit the quantity of spaghetti code we add when adding support for
another platform.
No functional change.