Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restore cache to certain locations #506

Closed
FranciscoPombal opened this issue Jun 25, 2020 · 3 comments
Closed

Unable to restore cache to certain locations #506

FranciscoPombal opened this issue Jun 25, 2020 · 3 comments
Labels
bug Something isn't working cache

Comments

@FranciscoPombal
Copy link

Describe the bug

This action seems to unable to restore cache to certain locations. In this case, that would be paths starting with C:\ on Windows runners.

Note: I'm using https://github.com/lukka/run-vcpkg which uses the @actions/cache.

To Reproduce

  1. Try to setup caching to/from a directory under C:\... on Windows runners
  2. Verify that one run finishes successfully and saves the cache
  3. Start another run that would be able to restore from the previously saved cache
  4. Restoring cache fails with these errors:
C:/qbt_tools/vcpkg/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg'
C:/qbt_tools/vcpkg/.artifactignore: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.artifactignore'
C:/qbt_tools/vcpkg/.git/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.git'
C:/qbt_tools/vcpkg/.gitattributes: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.gitattributes'
C:/qbt_tools/vcpkg/.github/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.github'
C:/qbt_tools/vcpkg/.gitignore: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.gitignore'
C:/qbt_tools/vcpkg/.vcpkg-root: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.vcpkg-root'
C:/qbt_tools/vcpkg/bootstrap-vcpkg.bat: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\bootstrap-vcpkg.bat'
C:/qbt_tools/vcpkg/bootstrap-vcpkg.sh: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\bootstrap-vcpkg.sh'
...
... (same for all other vcpkg files)
...
tar.exe: Error exit delayed from previous errors.
restoreCache() failed: 'Error: Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1'.
Cache miss.

Expected behavior

Cache restoration succeeds.

Desktop (please complete the following information):

Windows Server 2019 runners

Additional context

More context can be found in the original report at lukka/run-vcpkg#25

@FranciscoPombal
Copy link
Author

lukka/run-vcpkg#25 (comment)

Good news: looks like the issue can be worked around simply by creating the path prefix in advance. So, for example, if using vcpkgDirectory: C:\qbt_tools\vcpkg in the vcpkg setup step, one would need to run something like mkdir C:\qbt_tools before the vcpkg setup step.

Make of this what you will, I'm not sure if the underlying problem resides in your action or in the upstream cache action.

Here is an example run where this workaround was used to get cache restoration working: https://github.com/FranciscoPombal/qBittorrent/actions/runs/148077320.

@NPC99
Copy link

NPC99 commented Jun 28, 2020

[Uploading

  • Licences.txt…]()

#380

@FranciscoPombal
Copy link
Author

Looks like the issue is indeed fully resolved by lukka/run-vcpkg#26, sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cache
Projects
None yet
Development

No branches or pull requests

3 participants