Ignore Puppet's strict setting when calling function without namespace#1377
Ignore Puppet's strict setting when calling function without namespace#1377chelnak merged 1 commit intopuppetlabs:mainfrom
strict setting when calling function without namespace#1377Conversation
|
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.
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.
|
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
strictset 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
deprecationwith 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 ifstrictis 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
deprecationfunction update was extracted into its own PR #1378)