-
Notifications
You must be signed in to change notification settings - Fork 796
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
Use puppet4 functions-api #1044
Conversation
Fixed the rubocop issues that occurred, but didn't know how to replace the |
@juliantodt Are you still active on this pr? Disable Commands: Disable rubocop for a single line: |
cdab838
to
37a060f
Compare
Fixed the rubocop issues like @david22swan suggested and rebased the pr. |
@juliantodt Thanks! Should we also print deprecation warnings in the puppet3 functions so we can remove them at the next major bump? |
@hunner Added the deprecation warnings. Couldn't use stdlib's deprecation function because we allow old enough versions of it together with the mysql-module though. |
@juliantodt went ahead and added strings docs to have them in there. It's a new pseudo-requirement so I didn't think you needed to be responsible for it. |
In minor release Puppet 5.5.7 they introduced a change [1] that caused all Puppet 3 function to pretty much stop working properly. This causes issues like [2] for Puppet >= 5.5.7 The puppetlabs-mysql module has support for the puppet 4+ compatible functions since it's 6.0.0 release, bug was tracked in [3]. The fix in the module is here [4]. [1] https://tickets.puppetlabs.com/browse/PUP-9137 [2] https://gist.github.com/tobias-urdin/491e97da6585def720fc4f830e212f30 [3] https://tickets.puppetlabs.com/browse/PUP-9270 [4] puppetlabs/puppetlabs-mysql#1044
The fix that fixes the functions api to the puppet 4 syntax is released in 6.0.0 which causes the undefined issue [1] [2]. On this line [3] in the latest 5.x release it should be for example mysql::deepmerge. The Puppet change that caused this [3] and the puppetlabs-mysql that fixes it [4] [1] http://logs.openstack.org/46/613446/2/check/puppet-openstack-unit-5.5-centos-7/f7f3999/job-output.txt.gz#_2018-10-30_00_19_35_920695 [2] https://tickets.puppetlabs.com/browse/PUP-9270 [3] https://tickets.puppetlabs.com/browse/PUP-9137 [4] puppetlabs/puppetlabs-mysql#1044 Change-Id: Ib5ff4bd7119b8dfee91c884007c617dfaa591840
There's been a properly namespaced modern `mysql::password` function for some time. See puppetlabs#1044 When the modern API non-namespaced shim was removed in a68004c the `puppet/parser/functions` version still existed so users who hadn't migrated to `mysql::password` would have reverted to this legacy API version. This commit finally removes the legacy version, but puts back the shim for now (to not create a breaking change just yet). Both namespaced and non-namespaced shim are tested.
The legacy puppet3 functions-api should be avoided.
This migrates the existing functions to the new api and uses it in the module. It also adds the tests for the new functions based on those for the olds when they existed.
We should keep the legacy functions for now to allow compatibility for those using the functions outside out this module.