Page MenuHomePhabricator

Preserve formatting etc. in horizon hiera editor
Open, Needs TriagePublic

Description

<Krinkle> Krenair: I suppose 'cache_hosts' is useful to keep here [puppet.git] given it supports comments and commit summaries?
<Krinkle> overall though I'm on board with putting stuff in Horizon I guess, so long as we're consistent for a given domain/area (e.g. all caching/ats stuff)
<Krinkle> eg. either all project/prefix/host in puppet or in horizon
<Krenair> yeah I would like comment support at least before moving everything
<Krenair> bd808, do we have a task somewhere about preserving formatting of YAML in the horizon hiera editor?
<Krenair> I recall probably either you or and.rew mentioning us parsing and then dumping which looses that stuff
<Krenair> I did a search but nothing jumps out to me as this
<bd808> Krenair: I don't remember if anyone made a feature request about that or not. Probably not.
<bd808> we did talk about it on irc though :)
<Krenair> :D
<Krenair> ok
<Krenair> I guess I'll do that now and maybe look at the code
<bd808> we would need to split things up so that we validate using the pyyaml parser, but stop roundtriping the data through python data structures or something 
<bd808> it becomes a more ugly problem when you consider maintaining support for the form based workflow that builds the yaml for you
<bd808> probably just ugly and not impossible though
<Krenair> wasn't the form workflow the puppet classes thing?
<wikibugs> (PS13) Krinkle: hieradata: Include cache-text in Beta Cluster 'cache_hosts' [puppet] - https://gerrit.wikimedia.org/r/530773 (https://phabricator.wikimedia.org/T158837)
<Krenair> i.e. not hiera
<Krenair> opened https://phabricator.wikimedia.org/T250622
<Krinkle> OK, the above two are now cherry-picked and re-ran puppet on the various hosts and stuff still works :)
<wikibugs> Puppet, Horizon: Preserve formatting etc. in horizon hiera editor - https://phabricator.wikimedia.org/T250622 (Krenair)
<bd808> Krenair: yes, but the puppet classes thing is also hiera
<Krenair> hm
<Krenair> interesting
<Krenair> oh yes with the parameters right?
<bd808> *nod*