-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add Hiera overrides #273
base: main
Are you sure you want to change the base?
Add Hiera overrides #273
Conversation
Also other cases that should be tested:
I can't commit to actually finishing all of that, but would love to collaborate on it. Also wouldn't mind if someone else takes this work and brings it to the finish line. |
Other test cases: unbound::service_name: unbound
unbound::restart_cmd: "systemctl restart %{lookup('unbound::service_name')}" Another would be to define the merge strategy with for example hashes and arrays. |
I think the patch already works wit that or am i missing something?
Personally i think its fine to display the raw value without doing the interpolation i.e. if there is a need to do interpolation then i think we really should look at reusing
can you give an example? |
I mentioned it as a testcase. When I hacked it up I only tested it with a module that has data. I wrote some code, but it deserves some testing.
I agree, but the question is how well it renders.
I think that would actually be a downside. The lookup happens at runtime so the user should know this. Otherwise they may be surprised when the change the value that's looked up.
My test cases until now always had a small string. In the table that rendered fine. If you have a large hash, the rendering may end up completely unreadable. |
Yes sure, same, haven't even though about spec test yet :)
on this on the other the other hiera point i think we agree
yes could be, but could also argue that if the input hash is that big then you probably need to refactor (i know massive sweeping statement) |
@ekohl - what are your thoughts on this PR? Are you still interested in moving it forward? |
It is possible to explode the Hiera overrides and generate a table in the reference.
I'd love to see it move forward, but given my current workload I can't say I'll have the time any time soon. I've rebased it to see about the tests, but I'd love it if someone could take over. |
2340d1b
to
44a8de6
Compare
Cool. Yeah I would like to see this move forward too. I'll note that it is up for grabs.. Maybe it's something I'll try to circle back on once I've finished my current batch of work. |
@ekohl Would their be anyone from vox that would like to move this PR forward? If not, I think closing it would be a good idea since it's going to fall behind. |
@ekohl We are currently taking a look into this and were interested in knowing more about this. |
I still think it's a worthy addition, but currently don't have the bandwidth to finish this myself. If anyone is willing to take it over, that would be great. It probably needs verification in various scenarios (since I did only minimal testing) and someone needs to think about the formats. Right now it's limited to HTML. There's a commented line in the |
hey @ekohl - we've began a little investigation into the work still outstanding in this PR to see if we can help get this over the line for you, so I was just hoping to clarify a couple of things with you:
Once that's cleared up I can go back to the team and see about picking this up and getting it moving again, we much appreciate your help and work on this! |
I can imagine I missed some things. For example, I didn't expect this part:
The filename implies it's only used for classes and defines, so I didn't account for plans. I also don't use plans myself, so i didn't show up in my testing.
Correct, but IMHO it should be considered. I just didn't know what was the best way. |
Thanks for getting back and clarifying! We can start mapping out now how to proceed! |
It is possible to explode the Hiera overrides and generate a table in the reference.
This is an incomplete draft, but does work at least with the reference. voxpupuli/puppet-openvmtools#42 is an example.
I know that the place where Hiera data is loaded is wrong. It's inefficient to load it for every class while it should only be loaded once per module. It also has no tests and doesn't generate anything in HTML or in JSON.
Another thing to verify is whether the Forge can render the details. Currently I've only tested it on Github. On Github it renders like this:
Note that the details can be expanded but are collapsed by default to deal with the potentially large tables.
Fixes #250