Comment 2 for bug 1596373

Revision history for this message
Ben Nemec (bnemec) wrote :

I actually noticed this myself recently. This one script is eating up something like 6 minutes of our overcloud deploy time, just to translate some JSON to YAML.

Unfortunately, while it's pretty easy to rewrite the inner loop as Python (and it does massively decrease the runtime), because we do some icky things with jq there I don't think we'll get the same output from the Python version and I'm not sure how to make it the same. IIUC, we're reading some JSON values without parsing them in jq and in Python it's going to parse the entire thing at once so we lose the ability to read the raw unparsed values.

Of course, this partial json model is bad and really confusing anyway, so ideally we would just stop passing magic values that we don't want to parse and properly escape them. I'm not sure how huge a task that would be though, and it's possible it might break custom templates in the field that are relying on this bad behavior. :-(