Skip to content

Provide stdlib::ensure_resource(s) functions - #1450

Open
dlucredativ wants to merge 2 commits into
puppetlabs:mainfrom
dlucredativ:ensure_resources_v4
Open

Provide stdlib::ensure_resource(s) functions#1450
dlucredativ wants to merge 2 commits into
puppetlabs:mainfrom
dlucredativ:ensure_resources_v4

Conversation

@dlucredativ

Copy link
Copy Markdown

This PR translates legacy defined_with_params and ensure_resource(s) functions to namespaced v4 functions.

@CLAassistant

CLAassistant commented Feb 28, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jst-cyr

jst-cyr commented Jul 27, 2026

Copy link
Copy Markdown
Member

@dlucredativ : Thanks for the PR! I'm looking at prioritizing review by the team and would love some help understanding what issue you were having that brought about these changes? Can you explain a little about the 'why' behind adding the namespaced functions?

@dlucredativ

Copy link
Copy Markdown
Author

@dlucredativ : Thanks for the PR! I'm looking at prioritizing review by the team and would love some help understanding what issue you were having that brought about these changes? Can you explain a little about the 'why' behind adding the namespaced functions?

I don't have a specific issue, but I was under the impression that stdlib gradually deprecates legacy API functions, e.g. because of https://help.puppet.com/core/8/Content/PuppetCore/env_troubleshoot_leakage.htm

@b4ldr b4ldr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

params = {} if params == ''
ret = false

if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hope we can drop this test now 4.6.0 is long since dead

@jst-cyr

jst-cyr commented Aug 15, 2026

Copy link
Copy Markdown
Member

Running CI tests for this PR here: #1489

@jst-cyr

jst-cyr commented Aug 15, 2026

Copy link
Copy Markdown
Member

CI results are in via #1489. The only red platform (SLES-12) fails while provisioning the test VM, not in the acceptance tests themselves, and it fails the same way on main today with the nightly tests. All other platforms are green. No new or different failures were introduced by this PR. 👍

Still needs engineering review, but acceptance testing looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants