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

Caching on windows-latest Fails (v5) #61

Closed
mondash opened this issue Sep 28, 2020 · 3 comments
Closed

Caching on windows-latest Fails (v5) #61

mondash opened this issue Sep 28, 2020 · 3 comments

Comments

@mondash
Copy link
Contributor

mondash commented Sep 28, 2020

Description of the bug

Caching creation fails when using the windows-latest runner.

To Reproduce

  1. Create a new job using windows-latest as the runner.
  2. Set expo-cache to true.
  3. Run the job.

Expected behavior

The cache to be created successfully.

Actual behavior

Cache creation fails: see log below.

Additional context

Partial output of the action in our workflow demonstrating the error:

saving cache path C:\hostedtoolcache\windows\expo-cli\3.27.11\x64
primary key expo-cli-win32-x64-yarn-3.27.11
C:\windows\system32\tar.exe -cz --force-local -f D:/a/_temp/003e8de7-33fb-48ca-ad3c-d9382a497fa9/cache.tgz -C C:/hostedtoolcache/windows/expo-cli/3.27.11/x64 .
tar.exe: Option --force-local is not supported
Usage:
  List:    tar.exe -tf <archive-filename>
  Extract: tar.exe -xf <archive-filename>
  Create:  tar.exe -cf <archive-filename> [filenames...]
  Help:    tar.exe --help
Warning: The process 'C:\windows\system32\tar.exe' failed with exit code 1

If I had to guess, this problem is due to using the (almost 1 year out of date) Cypress fork of the cache action. Looking at the README for this repo, I see that the fork was originally used because the official action didn't support caching for 3rd party actions. I think that it is now possible to use the official action to do this and in doing so will use the newer code in the official action which will resolve this issue.

If possible, I'd really appreciate it if you would consider updating to use the official cache action. Thanks for your hard work and your time!

@mondash
Copy link
Contributor Author

mondash commented Sep 29, 2020

Figured I'd go ahead and post an update since I decided to take a crack at a solution myself. My proof-of-concept fork seems to be working after updating to use @actions/cache package in place of the Cypress fork. There's a slight change in signature between the fork and the current version, but the functionality of this action remains the same.

I've run into an issue which causes the action to fail when using a matrix due to some issues with concurrency. I've got a quick and dirty fix, but it's not scalable long-term. I'll continue working on this in my free time and keep you updated. If I get to a point where I feel like this is an appropriate solution, I'll go ahead and make a PR.

Here's the link to my fork: https://github.com/mondash/expo-github-action
And to the test repo using the action: https://github.com/mondash/test-expo-action/settings/access

@byCedric
Copy link
Member

byCedric commented Oct 2, 2020

Awesome, thanks for the report! It's a bit weird that it fails on tar.exe. Looks like Github updated it to a different version in their virtual environments and caused this. I'll test this tomorrow as well!

@byCedric
Copy link
Member

byCedric commented Dec 4, 2020

Alright, as mentioned you should be able to use it already! You can use @master as the version, that includes the fix you made with some additional tweaks. I'll release it asap, but still want to do some testing.

@byCedric byCedric closed this as completed Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants