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
So, cache wasn't found (which was expected for this build) but none of the jobs were able to save the cache either? I saw in a comment on another issue that multiple jobs in a matrix with the same cache key will cause a race and the first to finish will save results to the cache which is OK for what I'm doing, but that hasn't happened - none of the jobs saved the result as expected.
Reacted by Youfu Zhang, Honza Bittner, Josh Bleecher Snyder, Csaba Apagyi, Adam Bliss, Juliusz Gonera, Jendrik Seipp, Rui Chen, Chao Yang, Ricardo Canastro and 56 more
It looks like some of the runners failed with a tar error:
C:\windows\System32\tar.exe -cz -f d:\a\_temp\2872e9c9-c5e0-4d11-b84e-7581c522ad03\cache.tgz -C d:\a\detekt\detekt\$HOME\.gradle\caches\modules-2 .
tar.exe: could not chdir to 'd:\a\detekt\detekt\$HOME\.gradle\caches\modules-2'
[warning]Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1. Ensure BSD tar is installed and on the PATH.
This failure occurred after that runner "reserved" the cache. The issue now is that that cache is in the "reserved" state, which is preventing other runners from uploading to the cache. The "reserved" state is automatically cleared once a day, however, we'll need to fix the tar issue or you'll continue to see this warning.
@joshmgross Was there any fix for having multiple tar commands on the path?
I'm running into same issue using actions/cache@v1.
Run actions/cache@v1
with:
path: toolchain
key: toolchain-b5bb1ca45a199ba1026d31f7995b3f04bbae726b0390b2f6b2c67bdf7d98183e
Cache not found for input keys: toolchain-b5bb1ca45a199ba1026d31f7995b3f04bbae726b0390b2f6b2c67bdf7d98183e.
I'm getting this error too. Was experimenting with this feature and a mistake caused an action fail with a tar error. Now it seems there's no way to fix it. Is there at least a workaround?
Hi @hiranya911, could you please link me to the repo if it is public. If you're getting a tar error each time, it'll continue to get stuck in the bad state.
@hiranya911 Thanks for providing the requested info. I took a look and both issues are related to how runners "reserve" the cache.
The run using firebase-cli as the key worked successfully. Essentially, one of the runners of your matrix strategy reserves the right to upload the cache. If you look at the post cache step in build (3.6), you'll see that step succeeded in creating the cache. The others fail with the message that the cache already exists because build (3.6) created the cache.
In the run with the tar error, the cache gets into a bad state because it already reserved the cache but failed to create the tar. The workaround is to either use a different key or wait the approximately 24 hours for the reservation to expire. We reserve the cache this way to prevent having many runners (when a matrix strategy is used) all tarring and uploading the identical cache. We are working on a fix to reduce the time a cache stays reserved, which should help alleviate this issue.
Unfortunately, there's not a good way right now to distinguish these cases, except to look at the post cache step in each runner to see if one succeeded. Hope this helps :)
I have a similar issue. On my system it seems, that caches are bound to an OS. We have implemented the following pipeline using matrix build parallelization :
the jobs on the right should all restore a cache created by the middle job. Anyhow, what's interesting is, that the linux jobs on the right get a cache hit while the windows builds on the right cannot find the cache of the middle job. Is this by intention, even considered to be a different bug, or simply related to this issue?
@maybeec This feels different. You are pointing out that linux and macos caches are compatible and windows are not. Work is going in that area if you like to track: #984
Activity
dhadka commentedon Jan 9, 2020
It looks like some of the runners failed with a tar error:
This failure occurred after that runner "reserved" the cache. The issue now is that that cache is in the "reserved" state, which is preventing other runners from uploading to the cache. The "reserved" state is automatically cleared once a day, however, we'll need to fix the tar issue or you'll continue to see this warning.
@joshmgross Was there any fix for having multiple tar commands on the path?
zhangyoufu commentedon Jan 14, 2020
I'm running into same issue using actions/cache@v1.
I think I triggered this bug by setting the path to a single file instead of a folder.
hiranya911 commentedon Jan 15, 2020
I'm getting this error too. Was experimenting with this feature and a mistake caused an action fail with a tar error. Now it seems there's no way to fix it. Is there at least a workaround?
zhangyoufu commentedon Jan 15, 2020
@hiranya911 Use a different key.
Per https://help.github.com/en/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy, you have other choices:
hiranya911 commentedon Jan 15, 2020
@zhangyoufu I've already tried several different keys. For each key I get a
not foundat the initialization and analready existsat the post cleanup.dhadka commentedon Jan 15, 2020
Hi @hiranya911, could you please link me to the repo if it is public. If you're getting a tar error each time, it'll continue to get stuck in the bad state.
hiranya911 commentedon Jan 15, 2020
I'm not getting a tar error. That only happened once. This is the repo: https://github.com/firebase/firebase-admin-python/actions
dhadka commentedon Jan 15, 2020
Thanks, I'm taking a look. Can you also please enable debugging and trigger another run?
hiranya911 commentedon Jan 15, 2020
Here's one of the recent builds with the issue: https://github.com/firebase/firebase-admin-python/commit/a9c14a05d3d45a7a88a585120079cdc1d8af00f8/checks?check_suite_id=401125647
And here's the run with the tar error: https://github.com/firebase/firebase-admin-python/commit/3125a039dde2cc41ac79e616d4fd63ffbccb773e/checks?check_suite_id=401104866
dhadka commentedon Jan 15, 2020
@hiranya911 Thanks for providing the requested info. I took a look and both issues are related to how runners "reserve" the cache.
The run using
firebase-clias the key worked successfully. Essentially, one of the runners of your matrix strategy reserves the right to upload the cache. If you look at the post cache step inbuild (3.6), you'll see that step succeeded in creating the cache. The others fail with the message that the cache already exists becausebuild (3.6)created the cache.In the run with the tar error, the cache gets into a bad state because it already reserved the cache but failed to create the tar. The workaround is to either use a different key or wait the approximately 24 hours for the reservation to expire. We reserve the cache this way to prevent having many runners (when a matrix strategy is used) all tarring and uploading the identical cache. We are working on a fix to reduce the time a cache stays reserved, which should help alleviate this issue.
Unfortunately, there's not a good way right now to distinguish these cases, except to look at the post cache step in each runner to see if one succeeded. Hope this helps :)
hiranya911 commentedon Jan 15, 2020
Thanks @dhadka for looking into it. You're indeed right. I finally managed to get a cache hit with the firebase-cli key: https://github.com/firebase/firebase-admin-python/runs/390362670
It looks like Linux-Firebase-CLI key is currently in the broken reserved state, so it won't work until 24 hours has passed.
It also looks like, content under $HOME are indeed cacheable:
apparently have to use a new key?
thisismydesign commentedon Jan 28, 2020
Same.
@joshmgross Why is this an enhancement instead of a bug?
49 remaining items
github-actions commentedon Nov 28, 2022
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
Phantsure commentedon Nov 28, 2022
fix(caching): rotate cache key daily (workaround actions/cache#144)
fix(caching): rotate cache key, make caching optional (#20)
Phantsure commentedon Dec 13, 2022
Anyone who has recently faced this can they share the workflow? Need to reproduce this to investigate. Logs of workflow run should also work
Phantsure commentedon Dec 13, 2022
@maybeec This feels different. You are pointing out that
linuxandmacoscaches are compatible andwindowsare not. Work is going in that area if you like to track: #984wpbonelli commentedon Dec 14, 2022
https://github.com/MODFLOW-USGS/modflow6/actions/runs/3624583228/jobs/6111766806#step:6:152
That run uses a fork of
actions/cacheoffering finer-grained control but presumably encounters the same issuePhantsure commentedon Dec 15, 2022
@w-bonelli Was the cache already present as I don't see a
Cache not foundwarning? If it was already present then this message is correct.Update: I also see that the workflow is using save only action. And this message is possible with save only action when cache exists with same key
Phantsure commentedon Dec 16, 2022
Closing this as this issue seems resolved with newer versions. I am not able to reproduce this.
wpbonelli commentedon Dec 16, 2022
Is it no longer possible for the cache to get stuck in a reserved state after a failed upload?
Would you mind helping me better understand what's going on when there is a
Cache not foundbut then the cache can't save?SKETCH-2924: No longer redownloading, rebuilding, and recaching Fortr…