Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: This method is deprecated from manifests/custom_service.pp #160

Closed
hmorrised opened this issue Oct 15, 2017 · 4 comments
Closed
Milestone

Comments

@hmorrised
Copy link

I have just started using this module as part of a model for some future development work. I am seeing the following warnings when I run puppet apply (5.3.2):

==> puppetserver: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README. at ["/vagrant/modules/firewalld/manifests/custom_service.pp", 45]:
==> puppetserver:    (at /vagrant/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> puppetserver: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README. at ["/vagrant/modules/firewalld/manifests/custom_service.pp", 54]:
==> puppetserver:    (at /vagrant/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> puppetserver: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_Path. There is further documentation for validate_legacy function in the README. at ["/vagrant/modules/firewalld/manifests/custom_service.pp", 62]:
==> puppetserver:    (at /vagrant/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')

I am calling firewalld::custom_service from my code like this:

  8   firewalld::custom_service{ 'puppetserver':
  9     short       => 'puppetserver',
 10     description => 'Puppet Server',
 11     port        => [
 12       {
 13           'port'     => '8140',
 14           'protocol' => 'tcp'
 15       },
 16       {
 17           'port'     => '8140',
 18           'protocol' => 'udp'
 19       },
 20     ]
 21   }

And my Puppetfile has:

crayfishx-firewalld (3.4.0)
puppetlabs-stdlib (4.20.0)

It looks like the warnings are coming from the validate_* function calls, which have been deprecated in puppetlabs/stdlib. They don't break anything and I guess moving over to Puppet 4 data types would be a breaking change, but on the other hand if I am using firewalld on a number of hosts the amount of warnings could get a bit much.

@crayfishx
Copy link
Contributor

These are just deprecation warnings that will still run with Puppet 5. But, the use of validate_* is out of date now and I will replace these with proper data type hinting in the class and release a new version this week - I'm not considering this a breaking change since v3 of this module does not claim compatibiity with Puppet 3 (the base class already has data types) - thanks for pointing it out @hjohnst6 .

@crayfishx crayfishx added accepted enhancement New feature or request labels Oct 16, 2017
@crayfishx crayfishx added this to the 3.4.1 milestone Oct 16, 2017
@jfroche
Copy link
Contributor

jfroche commented Apr 6, 2018

should be fixed by #172

@virgofx
Copy link

virgofx commented Jun 5, 2018

ping @crayfishx @jfroche Still deprecation warnings in 3.4.0

@alexjfisher
Copy link
Member

This is fixed in master and will be included in the next release.

@alexjfisher alexjfisher removed the enhancement New feature or request label Oct 14, 2019
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

No branches or pull requests

5 participants