Jira (PUP-11868) New default strict=error breaks all deprecation warnings

10 views
Skip to first unread message

Daniel Parks (Jira)

unread,
Jun 4, 2023, 1:08:01 AM6/4/23
to puppe...@googlegroups.com
Daniel Parks created an issue
 
Puppet / Bug PUP-11868
New default strict=error breaks all deprecation warnings
Issue Type: Bug Bug
Affects Versions: PUP 8.0.1, PUP 8.0.0
Assignee: Unassigned
Created: 2023/06/03 10:07 PM
Priority: Normal Normal
Reporter: Daniel Parks

Puppet Version: 8.0.0
Puppet Server Version: N/A
OS Name/Version: all

Puppet 8 now defaults to strict=error despite what the official docs say (I filed PUP-11867).

One of the impacts of this is that all warnings become errors. This is particularly problematic for deprecation warnings, since now by default deprecations take place immediately.

An example of this is the recent change to puppetlabs/stdlib to namespace all its functions. Using the old function names, e.g. ensure_packages (puppetlabs-stdlib #1365), will now result in an error that terminates the Puppet run.

Desired Behavior: Deprecation warnings should, by default, be warnings that don’t block Puppet runs.
Actual Behavior: Deprecations warnings immediately terminate Pupet runs.

Example:

From a recent CI job on one of my modules:

Error: Evaluation Error: Error while evaluating a Function Call, deprecation. shell_escape. This function is deprecated, please use stdlib::shell_escape instead. at ["/etc/puppetlabs/code/environments/production/modules/rustup/templates/env.sh.epp", 7]:["/etc/puppetlabs/code/environments/production/modules/rustup/manifests/global.pp", 100] (file: /etc/puppetlabs/code/environments/production/modules/rustup/templates/env.sh.epp, line: 7, column: 24) on node 4e706a032afe.hgz2n3xr2b2uteg1gmg5rpevog.jx.internal.cloudapp.net

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Daniel Parks (Jira)

unread,
Jun 4, 2023, 1:32:02 AM6/4/23
to puppe...@googlegroups.com
Daniel Parks commented on Bug PUP-11868
 
Re: New default strict=error breaks all deprecation warnings

Also, this isn’t just a big problem for module authors who deprecate a function, it’s also a big problem for anybody who uses that module.

Module writers will have to choose between supporting stdlib < 9 and Puppet ≥ 6, or supporting stdlib ≥ 9 and Puppet ≥ 7.

Users will be harmed because they won’t be able to use modules that make different compatibility choices. If module A decides to support stdlib ≥ 9, and module B decides to support stdlib < 9, then they cannot be used together.

Finally, users will not know that they can set strict=warning. I am an expert user (I worked on the Puppet SRE team for years and have written types & providers) and I did not know that this was a setting until I found the puppetlabs-stdlib #1365. Other people will encounter this and understand it to be a fundamental incompatibility between modules.

Michael Hashizume (Jira)

unread,
Jun 5, 2023, 4:31:02 PM6/5/23
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
Jun 6, 2023, 4:18:01 PM6/6/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 7, 2023, 1:06:02 PM6/7/23
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages