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
Post job cleanup.
Cache hit occurred on the primary key macOS-r-3.6-9d6d6298c76f4d3f6969ba02e70924fc899df6ede745c821d69e7bc6c7583a2c, not saving cache.
Post job cleanup.
C:\Rtools\bin\tar.exe -cz --force-local -f d:/a/_temp/b77bb8ee-0267-4c3e-a392-f0271711ce95/cache.tgz -C d:/a/_temp/Library .
tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/Rtools/bin/tar: d\:/a/_temp/b77bb8ee-0267-4c3e-a392-f0271711ce95/cache.tgz: Cannot write: Broken pipe
/Rtools/bin/tar: Child returned status 2
/Rtools/bin/tar: Error is not recoverable: exiting now
##[warning]The process 'C:\Rtools\bin\tar.exe' failed with exit code 2
I can confirm that having tools where it is in the PATH on windows is causing this.
I was running into this on a repo I was converting to actions. I tried excising the rtools paths and then updating the path with GH action's set-env command but couldn't get that to work, but putting C:\Program Files\Git\usr\bin\ at the front of the path at the end of my build has let my windows caches compress and work.
It seems to be an issue with the tar executable bundled with Rtools, it doesn't find the gzip executable when trying to compress the files even if it is on the PATH.
I don't see a great way to solve this problem, we need the tools to be on the PATH during checking, but then we would have to somehow remove them before the cache is built...
May I ask what does this issue mean after setting the cache
Cache Size: ~76 MB (79338730 B)
/usr/bin/tar -xz -f /home/runner/work/_temp/41163c68-f007-4456-ae18-4b6b1951dfc0/cache.tgz -C /home/runner/work/_temp/Library
Cache restored from key: r-
Post job cleanup.
Cache hit occurred on the primary key r-, not saving cache.
You mean why the cache was not saved? As Jim said above, GHA caches are immutable.
It is not possible to update a cache. If a proper cache hit happened, that means that all the packages were restored completely, so there is no need to save the packages to the cache, because they are there already.
Activity
jimhester commentedon Nov 18, 2019
The macOS and Ubuntu ones are expected, the cache on GitHub Actions is immutable, once it has been created it can no longer be overwritten.
Not positive on the Windows issue, though because the Rtools tar is in the PATH that might be messing things up, I will investigate it.
jonkeane commentedon Nov 27, 2019
I can confirm that having tools where it is in the PATH on windows is causing this.
I was running into this on a repo I was converting to actions. I tried excising the rtools paths and then updating the path with GH action's
set-envcommand but couldn't get that to work, but puttingC:\Program Files\Git\usr\bin\at the front of the path at the end of my build has let my windows caches compress and work.This is very hacky, but got me unstuck:
https://github.com/jonkeane/dittodb/blob/master/.github/workflows/check-windows.yaml#L90-L92
jimhester commentedon Nov 27, 2019
It seems to be an issue with the tar executable bundled with Rtools, it doesn't find the gzip executable when trying to compress the files even if it is on the PATH.
jimhester commentedon Apr 3, 2020
I don't see a great way to solve this problem, we need the tools to be on the PATH during checking, but then we would have to somehow remove them before the cache is built...
jimhester commentedon Apr 3, 2020
I guess #21 (comment) has a fix that could work.
jonkeane commentedon Apr 4, 2020
Yeah, FWIW, that fix has been working for me on my windows builds for the past few months as well.
fix tar.exe not found error in Post Cache step
xihajun commentedon Dec 10, 2021
May I ask what does this issue mean after setting the cache
gaborcsardi commentedon Dec 10, 2021
@xihajun I am not sure what mean, sorry.
xihajun commentedon Dec 11, 2021
Don't worry I figure it out. Thanks for replying :)
"cache could not be clear, but will be able to change a path of saving"
gaborcsardi commentedon Dec 12, 2021
You mean why the cache was not saved? As Jim said above, GHA caches are immutable.
It is not possible to update a cache. If a proper cache hit happened, that means that all the packages were restored completely, so there is no need to save the packages to the cache, because they are there already.
github-actions commentedon Nov 6, 2022
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue