-
Notifications
You must be signed in to change notification settings - Fork 3
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
Problem about caching strategy for Lean #64
Comments
Maybe the cache key should be like this, specifying key: lake-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}-${{ github.ref }}
restore-keys: lake-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}-${{ github.ref }} |
duplicate of #62 |
Even though the failure is the same as #62, I think the suggestion to improve the key for the caching is still valid.
I think this is an improvement over the existing However, it seems to me that the For the restore-keys: lake-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }} With this @SnO2WMaN what do you think? Also for reference, the initial discussion of what key to use for the hash was here. |
Thanks for your advice. Once considered, we added |
Note: This is based on my assumptions and might not be entirely accurate.
This issue occurs when we update our project from
v4.9.0-rc1
tov4.9.0-rc2
. FormalizedFormalLogic/Foundation#85And it seems to be happens same problem branch in the nightly branch of the import-graph.
In our project, we set the GitHub Action cache strategy as follows
The problem we encountered was with the
restore-keys
we specified. The issue is that when updating the Lean version itself, the previous version's cache also becomes a fallback candidate. In our project, it seems we referenced the v4.9.0-rc1 cache, which caused the build to fail.Solution is remove fallbacks of
restore-keys
tolake-${{ runner.os }}-${{ hashFiles('lake-manifest.json') }}-${{ github.ref }}
only.Currently, the cache strategy of this action is similar (i.e., it doesn't avoid using the cache when the Lean version itself is updated).
lean-action/action.yml
Lines 93 to 99 in 52906d4
This seems to be why the nightly branch of the import-graph is broken.
As a solution, specifying
${{ hashFiles('lean-toolchain') }}
as the key should work.The text was updated successfully, but these errors were encountered: