Closed oprypkhantc closed 4 months ago
It turns out there are master
and dev
branches, and there's a commit which sounds like it should fix the issue: https://github.com/falcondev-oss/github-actions-cache-server/commit/09daaff3318cbfc69f3e70c4819b9cdf3f855046
Should I wait for the next release or is this not related?
Thanks for reporting this issue! We are aware that our current key matching algorithm does not 100% reflect how github's cache server handles keys. The commit you mentioned will be part of the 1.0.0 release which should fix your issue. I'll try on my local setup whether our new key matching algorithm fixes your issue or we still need to improve it.
I just tested it locally and it should now work as expected.
I also published a pre-release: ghcr.io/falcondev-oss/github-actions-cache-server:1.0.0-rc1
If you want to try it out keep in mind that you might need to update your setup (it should actually be simpler than before). See our WIP docs: https://dev.github-actions-cache-server.pages.dev/getting-started
Got it. Iʼll try the pre-release. Thank you for this awesome repo 💛
Hey.
Whenever you run
actions/cache@v4
on GitHub's runners, it'll skip the "save" (upload) part of the action if the cache was initially hit. When using a self-hosted runner with this server, it always uploads the whole cache, regardless of whether it was hit or not.This is a job I used to test this:
If you run it on
ubuntu-latest
with debug logging, you get these logs/results:If you instead run on a self-hosted runner, you'll get these:
As you can see, the returned cache key is different, which makes
actions/cache
think the cache was not hit and re-upload the same cache again.