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
Unable to restore symlinks from cache on Windows #1043
We noticed that since version 3.2.1 of actions/cache that our CI jobs have started failing. This seems to be caused by the inability to restore symbolic links, resulting in the following output in our failing job:
/usr/bin/tar: node_modules/.bin/acorn: Cannot create symlink to '../acorn/bin/acorn': No such file or directory
/usr/bin/tar: node_modules/.bin/pidtree: Cannot create symlink to '../pidtree/bin/pidtree.js': No such file or directory
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: "C:\Program failed with error: The process 'C:\Program Files\Git\usr\bin\tar.exe' failed with exit code 2
Reverting back to version 3.2.0 seems to resolve the issue, allowing the CI to pass again.
@Phantsure Yeah, looks like adding the OS to the cache key fixes this issue. This does however still seem like a breaking change that was introduced in a patch version.
Activity
Phantsure commentedon Dec 26, 2022
@jonkoops It looks like the workflow is not using npm cache like suggested here https://github.com/actions/cache/blob/main/examples.md#node---npm and the keys are not OS specific. You may use any one of those solutions to keep using latest v3 for now.
We are looking into this specific issue. Reason for this issue is, on windows, cache restore step is restoring cache saved on linux/mac runners and symlinks don't work due to path differences in windows and *-unix like systems.
danyeaw commentedon Dec 26, 2022
We ran in to a similar problem here: gaphor/gaphor#1950
Is there a way to disable this cross-os caching? This cache step is specific to a library being built on Windows.
jonkoops commentedon Dec 26, 2022
@Phantsure Yeah, looks like adding the OS to the cache key fixes this issue. This does however still seem like a breaking change that was introduced in a patch version.
bishal-pdMSFT commentedon Dec 29, 2022
Version
3.2.1has been reverted and this issues should be gone now. We are evaluating options on how to fix issue of symbolic links across OS.jonkoops commentedon Dec 31, 2022
Thanks, that's very much appreciated!
Phantsure commentedon Jan 12, 2023
New changes have been released with symlink fix. #984 (comment)
Closing this issue for now. If you feel it is persistent then you may reopen.