-
Notifications
You must be signed in to change notification settings - Fork 509
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
Find more intuitive name for prune --keep-storage
#458
Comments
I just asked on Slack and couldn't find any examples (beyond the minimal "Amount of disk space to keep for cache" docs). This option is definitely not intuitive. Even the suggested options don't really make sense to me, in the context of executing Is it actually a persistent setting to define once, and it will be remembered forevermore? What happens when the build cache exceeds the What I want to do is prevent the cache from filling up my disk, but without having to prune EVERYTHING from the cache on a schedule (and causing a slow build while still needed cache data is repopulated immediately after the prune). |
What would the the unit? i.e., |
I just tested and this command |
Agree with above comments. On CI servers, it would be nice to define a maximum size for the cache and then have oldest items automatically pruned. It's unclear if that's the purpose of this parameter or not. |
I agree that documentation on this feature is minimal. I tried the following on my machine:
I then rebuilt a recent image (that I deleted with
So regularly running |
Just found this option and it looks promising, if its clear how it works! While it works, I'm not sure how it decides what stays and what goes. 🤔 Also, it seems to go for dangling cache, but I'm not sure what this means in this context. Are these only layers that are not part of any current build? It seems to destroy caches that were used seconds ago, which makes me wonder what stays.. |
It seems like some users can be confused by the term
keep-storage
and misunderstood it as meaning the amount of free storage to keep, aka leave behind on the disk, instead of the maximum amount of cache that can be used up for cache by BuildKit.Help output can be improved of course, but I find it also important to keep things as intuitive as possible and am open to deprecating and renaming the flag. Open to suggestions. The corresponding
keepStorage
name in GC policies would also need to be updated accordingly, which means the new name should also make sense in the context of a GC policy.So far candidates are:
--max-cache-storage
--max-storage
--max-cache
--storage-limit
The text was updated successfully, but these errors were encountered: