-
Notifications
You must be signed in to change notification settings - Fork 583
Ignore Puppet's strict
setting when calling function without namespace
#1377
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
Conversation
I don't feel strongly either way but I wonder if it would be cleaner to have the implementation and updates should be in separate PRs? |
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 think this is probably the least painful path forward from the current situation. I hope that in the future we will do a better job of not introducing a deprecation and the replacement facility in the same release. Otherwise, strict = error
will quickly become meaningless and/or users will change to strict = warn
.
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.
Makes sense to me.
How's everyone feeling about this today? |
I agree with @chelnak . @alexjfisher what do you think? |
@chelnak @bastelfreak I've split this into 2 commits and opened #1378 with just the updates to the |
Thank you! |
This PR should be ready for a rebase now! |
The merge-base changed after approval.
The merge-base changed after approval.
The merge-base changed after approval.
Previously, when a user had the Puppet setting `strict` set to `error` (which is the default in Puppet 8), a call to one of stdlib's functions via the deprecated non-namespaced function would cause a hard failure instead of just logging a warning and calling the real namespaced function. In this change, all of our shims have been updated to call `deprecation` with its new third parameter, (`use_strict_setting`), set to `false`. The non-namespaced versions will now only ever log warnings informing users to moved to the namespaced versions. It will not raise exceptions even if `strict` is set to `error`. This change will make it much easier for users to migrate to stdlib 9 (and to upgrade modules that now depend on stdlib 9) Fixes puppetlabs#1373
Previously, when a user had the Puppet setting
strict
set toerror
(which is the default in Puppet 8), a call to one of stdlib's functions via the deprecated non-namespaced function would cause a hard failure instead of just logging a warning and calling the real namespaced function.In this change, all of our shims have been updated to call
deprecation
with its new third parameter, (use_strict_setting
), set tofalse
. The non-namespaced versions will now only ever log warnings informing users to moved to the namespaced versions. It will not raise exceptions even ifstrict
is set toerror
.This change will make it much easier for users to migrate to stdlib 9 (and to upgrade modules that now depend on stdlib 9)
Fixes #1373
(Note, this PR description was updated after the
deprecation
function update was extracted into its own PR #1378)