Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9699

Add pluggable API / enabler for recording all keys looked up during compilation



    • New Feature
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.8.0
    • None
    • None
    • Not Needed
    • Part of a bigger feature. Consider this part somewhat experimental until the feature is released.
    • Needs Assessment


      In order to perform impact analysis of changes to hiera data Puppet should have the ability to record all keys being looked up during a compilation.

      To do this, lookup should obtain the key :lookup_key_recorder from the context and if this key is bound, it must be to an object that responds to the message record(key).

      Thus, the contract for someone that wants to process these callbacks is to give the puppet compiler a context where :lookup_key_recorder is bound and then do what is wanted in that specific bound recorder.

      There may be opportunity to coalesce this feature with another ticket where it is requested that puppet should be able to give profiling per backend/key. If that is wanted, the API must include both a "begin" and an "end" call for every key. It is expected that a first implementation does not take that into account.

      There will be no call to the record(key method for the meta key lookup_options. From an impact analysis standpoint; as if there is any lookup of any key, there will also be a lookup of the lookup_options - so an analyzer should handle that key implicitly. (It may also want to do special processing of the content of lookup_options since it is possible to compute that a change of lookup_options for a key that is never looked up has no impact).


        Issue Links



              Unassigned Unassigned
              henrik.lindberg Henrik Lindberg
              0 Vote for this issue
              2 Start watching this issue



                Zendesk Support