Introduce new checksum subcommand to be used for caching
What
This new checksum
subcommand implements the idea from this upstream jsonnet issue: It recursively extracts imports via static analysis. It then outputs the set of imported files together with their sha256
sums.
This can be used to detect whether a jsonnet file or any of its dependencies have changed, and re-use a cached value if not.
Why
By knowing the dependencies of a jsonnet file as well as their hashes, we can cache the processing of these files.
jsonnet compilation is one of the main bottlenecks of the runbooks pipeline (see also gitlab-com/runbooks!5599), which in the critical path for many operations related changes (alerting, elastic, probably more).
Slowdowns in that pipeline negatively impact our ability to quickly respond to incidents.
Edited by Igor