Feature #14447
closedAdd serialised cache of parsed manifests
Description
This tickets covers the idea of a third JSON-based parser mentioned at https://groups.google.com/d/msg/foreman-dev/Ijvodu1hJkE/Ssl83t35IAAJ and in https://github.com/theforeman/kafo_parsers/pull/13. However, instead of a JSON-based parser in kafo_parsers, adding a cache from a serialised file around the parser in Kafo itself would have a few benefits:
- Kafo already had kafo-export-params, which I thought would be the perfect tool to extend to generate the YAML files. It already handles loading the configuration, output formats etc, so adding a new output format for the cache is trivial.
- If extending kafo-export-params to write the cache, it made sense to keep the cache reader and writer in the same project so it's easy to keep in sync.
- The cache location can be set in the Kafo configuration, which is hard to access from kafo_parsers right now.
This helps with support for Puppet AIO packages as when the cache is in use, there's no need to load the Puppet dependency in kafo_parsers.
This does delay the requirement for a puppet-strings parser, as we can generate the parser cache on the current Puppet 3 installation at build time and use it with a Puppet 4 AIO installation. It also means users won't have to install puppet-strings. We will still want a puppet-strings parser so we're not limited to building on Puppet 3.