Skip to content
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

merged 3 commits into from May 24, 2018


Copy link

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.

Copy link

Fixed the rubocop issues that occurred, but didn't know how to replace the subject.execute calls in the tests with them still working. Please let me know if you have a solution for this.

Copy link

david22swan commented Mar 7, 2018

@juliantodt Are you still active on this pr?
In regards to the rubocop issue at this point I feel that you should disable the rule for now, an example on how to do so is shown below:

Disable Commands:
Disable rubocop over a block off code
# rubocop:disable Lint/UselessAssignment
{Code Block}
# rubocop:enable Lint/UselessAssignment

Disable rubocop for a single line:
{Code Line} # rubocop:disable RSpec/InstanceVariable

Copy link

Fixed the rubocop issues like @david22swan suggested and rebased the pr.

Copy link

hunner commented Mar 29, 2018

@juliantodt Thanks! Should we also print deprecation warnings in the puppet3 functions so we can remove them at the next major bump?

Copy link

@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.

Copy link

eputnam commented May 24, 2018

@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.

@eputnam eputnam merged commit b8e3772 into puppetlabs:master May 24, 2018
tobias-urdin added a commit to tobias-urdin/puppet-mariadb that referenced this pull request Oct 30, 2018
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].

[4] puppetlabs/puppetlabs-mysql#1044
openstack-gerrit pushed a commit to openstack/puppet-openstack-integration that referenced this pull request Oct 30, 2018
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]

[4] puppetlabs/puppetlabs-mysql#1044

Change-Id: Ib5ff4bd7119b8dfee91c884007c617dfaa591840
alexjfisher added a commit to alexjfisher/puppetlabs-mysql that referenced this pull request Apr 28, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants