deric / puppet-mesos

Puppet module for managing Mesos nodes
https://forge.puppetlabs.com/deric/mesos
Apache License 2.0
69 stars 61 forks source link

Porting functions to the modern Puppet 4.x API #95

Open binford2k opened 4 years ago

binford2k commented 4 years ago

We noticed that your Puppet module includes Puppet 3.x function(s) and created this pull request to help you get started porting them to the new API.

The Puppet function API has a long history and many people in the ecosystem, including you, took advantage of this API to extend Puppet to do some really cool things. Unfortunately the original function API had many critical limitations, and so Puppet introduced a new and improved API with Puppet 4.x.

Each modern Puppet 4.x function is just a little faster and just a little safer to use, meaning that as we all port our functions over, compilation times across the ecosystem will get more and more performant. Modern Puppet 4.x functions have improved thread safety, memory management, and load time. Even more importantly, they’re isolated to the environment they’re loaded from.

And as a developer, you'll see benefits like namespaced function signatures, automatic data type checking, multiple dispatches allowing you to easily handle different kinds of function invocations, and vastly improved code reuse.


This pull request was autogenerated and the ported functions do not yet take advantage of the data type checking or multiple dispatches. You will want to finish the port by making those changes and adding any documentation updates. See this tutorial for more information.

While you're at it, double check to see if there are any functions that couldn't be automatically ported and update them yourself.

To be extra cautious about losing data, this pull request did NOT delete the legacy function files, so when you're satisfied with the new functions, don't forget to delete the legacy code!

If this repo is a fork, when you're all done, you might consider contributing your work upstream.


If you have any questions, feel free to ping me in this PR, or stop by the Puppet Community Slack to chat. And thanks so much for being part of our vibrant community of developers!