puppetlabs / puppetlabs-puppet_agent

Module for managing Puppet-Agent
Apache License 2.0
41 stars 192 forks source link

(maint) replace legacy validate function with datatype #628

Closed bastelfreak closed 1 year ago

bastelfreak commented 1 year ago

This replaces the validate_absolute_path() function call with a datatype from puppetlabs/stdlib. The type is available since the 4.13.1 release of stdlib (and this module already depends on 5.1 and newer).

Some background: I'm currently debugging a slow pe-puppetserver metrics API. The puppet-profiler is enabled and provides metrics for all called functions. In our environment the puppet_agent module is the only one still using this legacy function. By replacing it with a datatype, it follows current best practice guides and also speeds up the API because it has to care about less metrics (in my specific case at least).

puppet-community-rangefinder[bot] commented 1 year ago

puppet_agent is a class

that may have no external impact to Forge modules.

This module is declared in 3 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

bastelfreak commented 1 year ago

Hey team @phoenix, can you please take a look? :)

mhashizume commented 1 year ago

Thank you for this PR @bastelfreak , could you rebase and I can approve/merge?

bastelfreak commented 1 year ago

@mhashizume done. Can you please also take a look at #632 ?