As part of the discussions regarding Foreman 2.0, another idea that came up is dropping support for Smart Variables.
Smart Variables were originally introduced as a hack before Puppet classes had parameters, and remained for a long time to support classes that still have not been updated to become parameterized. They allow setting global parameters to be consumed inside puppet classes. However, using global parameters inside puppet classes is considered bad practice, and with parameterized classes there is no longer a need for this workaround.
I propose deprecating smart variables in the upcoming 1.24 (with a notification for users who still use them) and dropping them in Foreman 2.0.
Note Puppet has parametrized classes since 2.6.5 which is ancient. By now everything should IMHO have proper parameters. If you do need global variables inside Puppet, you can still use parameters and that will continue to work. Since 1.21 or 1.22 (I forgot exactly which one) those also have types.
for cleaning this up.
Are we sure we can handle all that dropping in 1.25/2.0? Also have API endpoints for smart variables been marked as deprecated or would we push that to 1.24 too? Or dropping feature qualifies for dropping API endpoints too without a warning?
EDIT: please don’t get me wrong, I’m all for dropping smart variables!
Deleting code is quick
They have not, but I would think that if the whole feature is removed than it is expected to also drop it from the API.
PR for the deprecation:
This one is harder because views and database models are shared with smart class parameters. It will be easy to delete the wrong code and cause a regression
Can you please come with more ideas and more often. Thank you!
This has been open for over a week with no objections. I also checked with various sources and no one knows of users who are still using them. let’s merge the notification in for RC3.