Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shared cache to pre-commit pipelines #180

Closed
VannTen opened this issue Aug 19, 2022 · 1 comment
Closed

Add shared cache to pre-commit pipelines #180

VannTen opened this issue Aug 19, 2022 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@VannTen
Copy link
Contributor

VannTen commented Aug 19, 2022

Is your feature request related to a problem? Please describe.
Context: thoth-station/prescriptions-refresh-job#52 (comment)
(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 VannTen added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 19, 2022
@VannTen
Copy link
Contributor Author

VannTen commented Aug 29, 2022

/close

@VannTen VannTen closed this as completed Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant