I think this is pretty interesting. I prefer 'expire' to 'deprecate', because 'deprecate' implies that it will actually break at some point, and what you really want here is just to remove the code at some future date, so expiration seems to make more sense.
How would you want the system to behave when expired code is run? Would you just want a log message, a full failure, maybe switch the class to noop? On Apr 26, 2013, at 4:00 AM, Dean Wilson <[email protected]> wrote: > I have a need to mark certain resources with an expiry / deprecation date so > when we no longer need them applied we get some kind of reminder. > > One concrete use case for me is the promotion of a cronjob from an adhoc > resource pushed via puppet to a packaged version that comes from an rpm. Once > we release that rpm we no longer need the puppet version. > > I've put together a small proof of concept for deprecating individual > resources - http://pastie.org/7719128 - and I thought I'd ask the list what > they thought of the idea and if the poc - with a little tidying, validation / > better docs and such forth - would be accepted. > > I've had some great feedback from Richard Clamp and we've discussed having a > possible function or type to mark entire classes as deprecated - > > Type - > deprecate { 'stop foo': warn_from => 'yyyymmdd', fatal_from => 'yyyymmdd' } > > Function call > class foo { > deprecate '20140101', 'The future has arrived, use bars!' > ... > } > > What does the list think? > > Dean > PS Maybe expires is a better name for this. Commence bike shedding ;) > -- > Dean Wilson http://www.unixdaemon.net > Profanity is the one language all programmers understand > --- Anon > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-dev?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | +1-615-594-8199 Join us at PuppetConf 2013, August 22-23 in San Francisco - http://bit.ly/pupconf13 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
