Issue #7736 has been reported by Daniel Pittman. ---------------------------------------- Refactor #7736: Uniform, pleasant, regular deprecation warnings https://projects.puppetlabs.com/issues/7736
Author: Daniel Pittman Status: Unreviewed Priority: Normal Assignee: Category: deprecation Target version: Affected Puppet version: 2.7.0rc3 Keywords: Branch: At the moment we have multiple paths in the code that lead to deprecation warnings being issued, in about equal measure: 1. `Puppet::Util::Warnings`, a module, mixed in to provide `notice_once` and `warnonce` 2. `Puppet.deprecation_warning`, which uses global state for deprecation 3. `Puppet.warning` (or `self.warning`), which just always warns, always 4. `raise "we killed this"` Number four (raising) is reasonable, if we uniformly take the approach, but the other three should be unified. The first two (the module, and the global) follow different rules for storage, clearing deprecation warnings, and how they rate-limit. This is suboptimal; they should be unified, ideally by eliminating one or the other entirely. Number three (just warning) is a disaster: we issue an unlimited number of warnings about deprecation, potentially flooding logs, and generally annoying folks. Plus there is no easy way to identify in the code that this is actually a deprecation; I have no certainty that I saw every deprecation point, but only the ones where the free-text message happened to include the substring `[Dd]epr`, of which there were a great many. Having a single, coherent, uniform way to move code through the path from warning, to error, to dead, would be a great boon. Adding the ability to robustly identify that this is a deprecation would be an additional bonus. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
