| Naeem Output like you suggest is too simplistic - many lookup results are composed out of multiple paths from multiple locations (a deep merge for example resulting in a hash, a merge with knockout values that removes information, a value that is composed out of interpolation of other lookups, etc. etc. A backend has access to the explain feedback and can produce its own set of information - it may for instance operate on a complex key, it may have its own kind of hierarchy and set of paths. It is simply not doable to reduce it to the simple information you want as it will be wrong in a very large percentage of all lookups. So - I don't see that we can provide that in puppet. You will naturally face the same challenge if you want to attempt to simplify the result of explanations down to that. It may work in your particular case if you are not using deep merges, aliases, or any fancy backends. I am not sure how much work it would be to support a combination of --explain-all and --compile, (not sure if it perhaps already works by just using --explain and --compile. By also specifying a log destination that ends with .json you could perhaps get all of the explain output logged to that file. (I have not tried, in theory it could work). If that does not work, we may need to tweak the implementation we have. Naturally, we need to prioritize such a feature against all other features being requested. If we do prioritize this it will be to "better support understanding and debugging hiera lookup used when compiling" and I think we need to really understand what that means - given that it is not doable to reduce it to the simple case you wish is it really meaningful to dump all of the information - did that just lead to exchanging one problem for another? What is a good user interface in this case? etc. I added this ticket to our Epic for things to consider for Puppet in the 6.y series. However, I don't think it is clear yet how a better debugging support would actually work (given all the things I already commented on). |