AICoE / aicoe-ci

AICoE-CI using TektonCD pipelines and triggers
13 stars 13 forks source link

Add shared cache to pre-commit pipelines #180

Closed VannTen closed 2 years ago

VannTen commented 2 years ago

Is your feature request related to a problem? Please describe. Context: https://github.com/thoth-station/prescriptions-refresh-job/issues/52#issuecomment-1220548801 (and the preceding discussion).

TL;DR: pre-commit install environments for it's hooks in a cache and can reuse them (if versions matches etc), which is a big win for performance. Link to pre-commit docs

Describe the solution you'd like Adding a persistent cache shared between all the runs of the pre-commit pipeline + a periodic (infrequent, like monthly cache cleanup (pre-commit gc)

Additional context Quick local measurement for a idea of the order of magnitude for the space needed:

$ du -h -d 0 ~/.cache/pre-commit
1.3G    /home/max/.cache/pre-commit
VannTen commented 2 years ago

/close