Sparse clone the prometheus-exporters repo
This sparse clones the prometheus-exporters, while maintaining chef git resource compatibility.
Chef git resource continues as expected.
Conditionally sparse-checkout the exporters and collectors as required.
What part of "we need to find a way to solve this properly" was hard to understand?
What part of "we need to find a way to solve this properly" was hard to understand?
I am more than happy for a better solution to replace this, until then I hope we can use something like this to shave many minutes off test run times.
So I just tried this with the apache-ubuntu-2204 test and bizarrely it made no difference to the run time which I do admit I don't really understand.
Ubuntu 20.04 is too old for the sparse checkout, but Ubuntu 22.04, 24.04 and Debian 12 is faster in my testing. Saving of at least 40 seconds per test which pulls in prometheus. Speed very dependent on clone speed from github, which can vary a lot.