-
Notifications
You must be signed in to change notification settings - Fork 70
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
Update ensure_packages->stdlib::ensure_packages; require stdlib 9 #249
Conversation
The `ensure_packages()` function is deprecated with stdlib 9. It triggers a catalog compilation warning on Puppet 7 and a catgalog compilation error on Pupppet 8. This PR switches to the successor, `stdlib::ensure_packages()`. This function got introduced in stdlib 9.
|
This should then update the minimum version of stdlib to 9? |
|
They do work, but you will see this on Puppet 7: And on Puppet 8 it's an error (and if you switch strict mode to on on puppet 7, it will fail there as well). I suggest to merge #250 for a new minor release, then merge #249 and do a major release. |
|
Why does CI then pass on Puppet 8 without that change? |
|
Apparently this is a whole clusterfuck that broke so much stuff that there's now a patch within the deprecation method: And the old This got implemented in stdlib 9.something. But 9.0.0 + Puppet 8 will actually fail. edit: Got implemented as workaround in Stdlib 9.2.0: puppetlabs/puppetlabs-stdlib@f7dd14a |
|
If only there had been a release of Puppet 8 where the methods were deprecated and replacements available. That would have made the whole migration so much less painful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other places we've treated this as a major version bump, given the pain of stdlib 9. At this point I'm not too worried about it anymore given our other modules have made the jump too.
|
If only the modules would be more flexible and would have done a new stdlib 8 release with the new namespaced functions after everybody noticed that the 9.0 release was shit. That's what annoys me even more. This issue slipped through and we all noticed it only after the release. But refusing the backport the changes is just a shitmove. |
|
So we just forbid 9.x < 9.2.0 and are done? |
We had that idea but if I remember it correctly metadata.json doesn't support that properly. Also the whole hack in stdlib is a workaround and ideally we move away from the old functions. Edit: The issue isn't that the old functions are deprecated, the issue is that the successors got introduced in the same major release as the old ones were deprecated. They should have been introduced earlier. |
…petlabs/stdlib 9 This follows theforeman/puppet-puppet#913 and theforeman/puppet-dns#249

The
ensure_packages()function is deprecated with stdlib 9. It triggers a catalog compilation warning on Puppet 7 and a catgalog compilation error on Pupppet 8. This PR switches to the successor,stdlib::ensure_packages(). This function got introduced in stdlib 9.