-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New feature: Show data result #264
Comments
As discussed in our meeting, here are some background infos:
|
I spent quite some time browsing puppet's docs and code and must admit, I am none the wiser as to how to implement this. I think there are two general possibilities:
The trouble with 1. is that the code is very convoluted and complex. I tried hard to find some lower level abstractions we could use, but found nothing suitable. So my best bet would be to use what the CLI does (see link above). The biggest obstacle is creating a "scope" for the lookup. The CLI code sets this up quite sensibly and we could probably reuse a lot of this. But as the very last step, it compiles a catalog (https://github.com/puppetlabs/puppet/blob/3192f4aab419b221402f738ed1be90de0d969be5/lib/puppet/application/lookup.rb#L413). I think this might be the reason you need to execute the command as root on a puppet server. Obviously, we cannot do this, so the only way out I currently see is mocking/stubbing a Also, according to the documentation, The alternative is to build our own implementation of If we go down that route, it might make sense to tackle #84. Sorry, I have no clear recommendation which approach would be best. When it comes to 1., I can not guarantee 100% that it is even possible, though I think it might be. Also, I have no idea how probable it is to get surprising results from When it comes to 2., it feels a lot like reinventing the wheel. I am unsure about the effort involved and fear a multitude of (possibly subtle) bugs when comparing to the original lookup function. I really wish there was a more clear definition of what "hiera" actually is (and is not). Back when it was a seperate gem, things were a lot simpler, but now there is actually no such thing as "hiera". There is only Maybe this is an opportunity for us to make such a definition, informed by how people use hiera data in practice. But maybe that is just wishful thinking on my part. |
Hi David, I doubt that we need to use the Puppet lookup code as I assume that this code is far to complex.
|
Quick question: If I try to lookup a simple scalar value, e.g. an integer, but request a merge strategy of |
@oneiros no, that's allowed for unique: https://www.puppet.com/docs/puppet/8/hiera_merging#merge_behaviors
For |
AFAIK we can close this issue as this is implemented. |
Implemented. Closing |
Discussed in #241
Originally posted by tuxmea December 22, 2023
Request
Solution
After selecting a key a new button shows up (or gets enabled) with title "result".
Upon clicking an overlay windows presents the complete result, based on lookup_options.
The text was updated successfully, but these errors were encountered: