You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Identical cache key hits on ubuntu/mac, but misses on Windows #362
Run actions/cache@v2
with:
path: build
key: package-5fc9dd41a6ade85100c424bab5b08d65d79922d1
Cache not found for input keys: package-5fc9dd41a6ade85100c424bab5b08d65d79922d1
Remember, these are all parallel runs of exactly the same build step. Will try to post some debugging information when I can figure out how to do it.
Reacted by Silvio Traversaro, Milos Marinkovic, Be, Rikard Nordgren, Matthew Haughton, Rob Cowsill and TOMIKAWA Sotaro
Looking at the discussion in #301 and also in the README.md about the use of zstd on Linux and macOS, it looks like this is a semi-known issue, but it sure needs to be documented. I don't like hearing sob stories as a developer myself but I've literally spent hours wrestling actions/cache into shape here only to be stopped on the 5 yard line :-( I guess I'll have to use artifact uploads instead for this one. But to be clear—it's not a total sob story; the cache is working great for my OS-dependent artifacts!
I have the same problem in two different workflows. First caching on ubuntu-latest in one job, then using the cache in ubuntu, macos and windows in other jobs. In ubuntu and macos it works fine, but in Windows I get cache not found.
👋 @milosmns@rikardn@mcg1969@mzabaluev this behaviour is due to difference in compression algorithms used. Linux and macos use zstd but Windows does not due to issues. We have this documented and also a workaround. Please refer to the documentation to if you want to use cross-os caching with Windows. Closing this issue as it is a duplicate of #888 and has been documented.
Since you just mentioned that there's a documented workaround for this problem, is it possible to make that workaround the default behavior? I ask about this because (at least for me) having cross-os support is the default thing I want when building for multiple platforms.
And if not, it's also ok, but it would be nice to get some reasoning behind the decision if possible 😅
@milosmns there were multiple issues with zstd on windows due to which it had to be disabled, causing different cache version on windows. We are looking into restoring the cross-os behaviour as default. Meanwhile, hopefully the workaround helps.
Activity
mcg1969 commentedon Jul 6, 2020
Updated this run with debugguing information.
Here's the log for a failed hit:
Here are the successful Urls from Windows, Linux, and Mac cache attempts, respectively:
As you can see, the
keysentry is the same, but theversionentry is not.mcg1969 commentedon Jul 6, 2020
It looks like the
versionkey is a function of the compression program, which differs between Windows and Mac.mcg1969 commentedon Jul 6, 2020
Looking at the discussion in #301 and also in the README.md about the use of
zstdon Linux and macOS, it looks like this is a semi-known issue, but it sure needs to be documented. I don't like hearing sob stories as a developer myself but I've literally spent hours wrestlingactions/cacheinto shape here only to be stopped on the 5 yard line :-( I guess I'll have to use artifact uploads instead for this one. But to be clear—it's not a total sob story; the cache is working great for my OS-dependent artifacts!refactor: arbitrarily change cache key to see if that cures Windows c…
milosmns commentedon Dec 20, 2020
I'm experiencing a similar issue (also working fine on linux/mac and failing to store anything on windows)... https://github.com/milosmns/tema/actions/runs/434017347
Looks like some folder permission issue... On my side it's a Kotlin/Native showcase project
rikardn commentedon Feb 19, 2021
I have the same problem in two different workflows. First caching on
ubuntu-latestin one job, then using the cache in ubuntu, macos and windows in other jobs. In ubuntu and macos it works fine, but in Windows I getcache not found.See my failed runs here: https://github.com/UUPharmacometrics/PsN/runs/1928546379?check_suite_focus=true and here https://github.com/pharmpy/pharmpy/runs/1928367509?check_suite_focus=true
Let me know if I can assist in resolving this in any way.
mzabaluev commentedon Mar 9, 2021
See here for the explanation: #330 (comment)
github-actions commentedon Mar 10, 2022
This issue is stale because it has been open for 365 days with no activity. Leave a comment to avoid closing this issue in 5 days.
milosmns commentedon Mar 10, 2022
Is it fixed though?
lvpx commentedon Sep 7, 2022
👋 @milosmns @rikardn @mcg1969 @mzabaluev this behaviour is due to difference in compression algorithms used. Linux and macos use
zstdbut Windows does not due to issues. We have this documented and also a workaround. Please refer to the documentation to if you want to use cross-os caching with Windows. Closing this issue as it is a duplicate of #888 and has been documented.milosmns commentedon Sep 7, 2022
Hey @pdotl, thanks for getting back to this 🙏
Since you just mentioned that there's a documented workaround for this problem, is it possible to make that workaround the default behavior? I ask about this because (at least for me) having cross-os support is the default thing I want when building for multiple platforms.
And if not, it's also ok, but it would be nice to get some reasoning behind the decision if possible 😅
Thanks!
lvpx commentedon Sep 7, 2022
@milosmns there were multiple issues with
zstdon windows due to which it had to be disabled, causing different cache version on windows. We are looking into restoring the cross-os behaviour as default. Meanwhile, hopefully the workaround helps.milosmns commentedon Sep 7, 2022
Awesome, good to know. Cheers.