Open Sec-ant opened 3 weeks ago
Should be fixed by #539.
The synchronize
workflow will update Cargo.toml
and Cargo.lock
when it runs the codegen job (bump the revision of biome). And the cache key is hashed against the Cargo.lock
file. That's why every time it runs, it will save the cache with a new cache key. Thus filling up the cache storage rapidly (10 Gb limit)
I'll try disabling caching provided by that action and handling the cache by ourselves.
Do we need caching at this point?
Do we need caching at this point?
Yes, or rust will build all the dependencies each time we run codegen.
After #552, we now use a single cache key rust-cache
to restore and update the rust cache, the cache storage will no longer be filled by different rust caches and we can still speed up our build time with it.
We probably should do the same for the pnpm cache. Because each time when synchronize
workflow is exectued, pnpm lockfile is also updated, so its cache is invalidated. So the cache is not being used, and only eating up the storage.
I'm sorry for reopening this again. But the current workaround is not ideal for the following reasons:
moonrepo/setup-rust
for referenceTo address the above issues, I plan to fork https://github.com/moonrepo/setup-rust and do some experiments.
So I reopen this issue as a reminder.
CI and caching, two difficult things combined! You're brave @Sec-ant 👏
The current cache settings of the action
setup-rust
are not working well. We've reached the limit and the caches are not being restored or saved properly. This also slows down the codegen job.I'll look into it.