-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
github-action: re-usability of distrib cache #6809
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
Conversation
|
A few tips & trick using Install necessary plugin: List all caches: List |
|
@mreid-tt and @hgy59 I was able to test the cache changes which worked great! As no chache existed for this branch it falled back to latest cache avaiable from master, from there executed the download of all dependencies, completed the build, then all set. Now comes the interesting part: I re-ran this same PR, this time it re-used the previous cache, and finally it noticed that all downloads where already present in cache and simply checked digests! This looks like working well and should avoid tons of false-positives caused by download errors. The only caveat is that I cannot test the Another pair of 👀 would be nice before pushing this in. |
|
I've now also fixed something anoying relatively to *.wrong files created, further when re-using a previously existing cache directory with changes in digests. It now does the validation of the digests and if failed and as to .wrong, re-try once to download the file. Here's a case I tested: The outcome is as expected and this allowed to re-use all other |
|
@th0ma7 great, if this works, we also shouldn't reach the 10GB cache limit (but if we do, I don't know wheter this redesign will work over the time (probably we have to ensure the limit is not reached an omit further caching ?) AFAICS the toolchains are not that big (50 to 100 MB) that is typically about 1GB in total (including DSM 7.2?). Sorry, can't check, currently AKF |
|
Thnx for your feedback, will look at how to consider them in the solution. I believe I'm already not that far from having something to play with, preliminary tests looked good but still a WIP. |
|
@mreid-tt and @hgy59 I believe its ready, by that I mean I tested all I could from within the PR. Things worth noting:
|
1 similar comment
|
Some of this is beyond my expertise but it seems good to go. |
|
AFAICS you limit the cache to 2GB. probably we need a strategy to avoid caching the largest source files (even those would save most download time) further needs To save some more space we could limit the toolchain caches to generic archs. |
hgy59
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's give it a try....
|
I'm sure this will need adjustments... Probably on the cleaning script to be more aggressive in the removal of certain areas such as toolchains unused since little while for instance. But we can revert it as needed. |
|
@hgy59 and @mreid-tt Just so you know, there is now a new
|

Description
Improves the GitHub Actions cache strategy for the
distribfolder to reduce redundant downloads and speed up builds.The current cache configuration uses
github.run_idas the cache key, which creates a unique cache entry for every workflow run. This means:Additionally, GitHub automatically evicts caches that haven't been accessed in 7 days, which can result in a completely empty cache after periods of low activity.
Proposed Solution
1. Updated cache strategy in
build.ymlrestore-keys: distrib-fallback to always find the most recent available cache2. New
distrib-cache-maintenance.ymlworkflowA scheduled workflow that runs twice weekly (Monday and Thursday) to:
.wrongby checksum verificationdistrib/that haven't been modified in 180 daysdistrib-*cache entries (other caches liketoolchain-*are not affected)3. Updated
download.sh.wrong), the download is automatically retried onceBenefits
Testing
jellyfin)Fixes #6806
Checklist
all-supportedcompleted successfullyType of change