saz/puppet-timezone

deprecation warnings on validate_bool

AxisNL opened this issue · 3 comments

Hey, I just installed a new puppet machine. I'm using module puppetlabs-stdlib (v4.17.1) and saz-timezone (v3.5.0). When trying to set a timezone, I get a deprecation warning:

Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/timezone/manifests/init.pp", 56]:
(at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')

It seems this code:

validate_bool($hwutc)
validate_bool($autoupgrade)

Should be updated to match the newer stdlib behaviour since puppet 3 is deprecated?

edit: this seems to fix the deprecation warnings:

validate_legacy(Boolean, 'validate_bool', $hwutc)
validate_legacy(Boolean, 'validate_bool', $autoupgrade)

As far as I can tell this issue has been fixed by PR #45.

@mark0n You're right. But there's no new release on the puppet forge.
@saz Can you push a 3.5.1 or 3.6.0? 😃

saz commented

There will be version 4 soon 😄