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

Cache growing overtime #181

Closed
Mirko-von-Leipzig opened this issue Dec 4, 2023 · 2 comments
Closed

Cache growing overtime #181

Mirko-von-Leipzig opened this issue Dec 4, 2023 · 2 comments

Comments

@Mirko-von-Leipzig
Copy link

I want to lead by saying thank you so much for your work.

We're running into an issue where our workspace cache grows over time. From 1.2GB three weeks ago to double that two weeks later. Clearing the cache, reset the size to 1.2GB again.

I suspect the issue is that the cache is keeping unused depedency versions i.e. if you upgrade a dep, it will still keep the old version around as well.

Our caching strategy is to only cache the main branch to reduce cache churn (due to cache size limitations). This was a recent change, so we've only noticed this now - whereas before we were constantly evicting older caches. With this new strategy we effectively have a single, long-lived cache that keeps getting updated and therefore grows.

Is this expected? Can this action somehow do a more precise cleaning job? I've read through this rust issue which makes it sound like this isn't trivial.

@Swatinem
Copy link
Owner

Swatinem commented Dec 5, 2023

yes, this is all expected behavior. The build artifacts don’t carry any version, but just an opaque hash. Its pretty much impossible which ones are needed and which aren’t.

@Mirko-von-Leipzig
Copy link
Author

Thanks for the confirmation :) Think we'll work-around by re-creating the cache with a weekly workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants