chef icon indicating copy to clipboard operation
chef copied to clipboard

Sparse clone the prometheus-exporters repo

Open Firefishy opened this issue 1 year ago • 4 comments

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.

Firefishy avatar Apr 24 '24 16:04 Firefishy

What part of "we need to find a way to solve this properly" was hard to understand?

tomhughes avatar Apr 24 '24 16:04 tomhughes

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.

Firefishy avatar Apr 24 '24 16:04 Firefishy

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.

tomhughes avatar Apr 24 '24 19:04 tomhughes

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.

Firefishy avatar Apr 25 '24 11:04 Firefishy