Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Remove deprecated functions (validate_legacy, hiera_hash, is_hash and has_key) - #99

Open
lcharreau wants to merge 5 commits into
petems:masterfrom
lcharreau:master
Open

Remove deprecated functions (validate_legacy, hiera_hash, is_hash and has_key)#99
lcharreau wants to merge 5 commits into
petems:masterfrom
lcharreau:master

Conversation

@lcharreau

@lcharreau lcharreau commented Jan 8, 2024

Copy link
Copy Markdown

Since stdlib version 9.x, the validate_legacy, is_hash and has_key functions have been deprecated.
The hiera_hash function is also deprecated (I've replaced it with the lookup function with the 'hash' merge strategy).

@lcharreau

Copy link
Copy Markdown
Author

Fixes #90

@lcharreau lcharreau changed the title Remove deprecated functions (validate_legacy and hiera_hash) Remove deprecated functions (validate_legacy, hiera_hash, is_hash and has_key) Jan 10, 2024

@siebrand siebrand left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is one error in your PR, and puppet-lint -f will fix the other issues that prevent using this module with puppet 8.

You can take siebrand@d0d18e2 if you like.

Comment thread manifests/files.pp Outdated
validate_legacy(String, 'validate_re', $ensure, ['^absent$', '^present$'])
validate_legacy(String, 'validate_string', $swapfile)
Enum['present','absent'] $ensure = 'present',
Stdlib::Absolutefile $swapfile = '/mnt/swap.1',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should be Stdlib::Absolutepath. Module with this PR applied throws an error:

Error: Resource type not found: Stdlib::Absolutefile

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ok thanks for your feedback. I fixed the reported errors using pdk bundle exec rake lint_fix (for Puppet8).

@mvphilip

Copy link
Copy Markdown

Hello,
Thanks for the work on this. In addition though:

metadata.json requirements for stdlib should be revved to >= 9.6.0
spec/spec_helper_acceptance.rb has a hardcoded module install of puppetlabs-stdlib that shoudl be set to 9.6.0

Thaks,

-mp

@kenyon

kenyon commented Apr 18, 2024

Copy link
Copy Markdown

@mvphilip this module was migrated to Vox Pupuli: https://github.com/voxpupuli/puppet-swap_file

@siebrand

Copy link
Copy Markdown

@kenyon Any idea when it will be published on puppet forge for the first time?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants