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

permission issue causing failure to cache on windows #1024

Open
2 of 5 tasks
geemus opened this issue Apr 29, 2024 · 4 comments
Open
2 of 5 tasks

permission issue causing failure to cache on windows #1024

geemus opened this issue Apr 29, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@geemus
Copy link

geemus commented Apr 29, 2024

Description:
Post job cleanup fails with permission issues:

Post job cleanup.
"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/anchor/anchor --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
/usr/bin/tar: C\:/npm/cache/_logs/2024-04-29T15_30_50_704Z-debug-0.log: Cannot open: Permission denied
/usr/bin/tar: C\:/npm/cache/_logs/2024-04-29T15_30_59_272Z-debug-0.log: Cannot open: Permission denied
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to save: "C:\Program failed with error: The process 'C:\Program Files\Git\usr\bin\tar.exe' failed with exit code 2

Action version:
actions/setup-node@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
node 20.10.0
npm (? I didn't specify, so the default I suppose)

Repro steps:
Here are what I think would be the relevant bits from our setup:

      - name: Setup Node (prism)
        uses: actions/setup-node@v4
        with:
          cache: npm
          node-version-file: '.tool-versions'
      - run: npm install

I'll note that we just have a package.json and no lock at present in case that is relevant.

Expected behavior:
I expected the caching to "just work" with this setup, as it does with the same invocation on mac/ubuntu.

Actual behavior:
Setup node and the rest of the action work fine, but the cleanup/caching fails (so there is never a cache to be used).

@geemus geemus added bug Something isn't working needs triage labels Apr 29, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @geemus, Thank you for creating this issue and we will look into it :)

@priya-kinthali priya-kinthali self-assigned this May 16, 2024
@priya-kinthali
Copy link

Hello @geemus 👋,
Thank you for sharing the details!
I tried to replicate the error using the provided code snippet, but was unable to do so. By default, the actions/setup-node action looks for a dependency lock file in your repository's root. If this file is not found, the setup step will fail. You can find more information in this related document.
As I couldn't reproduce your issue, it would be really helpful if you could share a link to a minimal reproduction of the problem for further investigation. Thank you in advance:)

@geemus
Copy link
Author

geemus commented May 21, 2024

Thanks for checking on this. I changed some things to ensure there is a lock file present, but it doesn't seem to have made a difference. FWIW we run the same jobs on mac and ubuntu and they worked fine both before and after (and everything but the cache save afterward seems to work on windows). I also tried to setup a minimal reproduction case, but so far I haven't figured out how to get it to fail (it seems to work just fine, probably similar to what you saw).

@priya-kinthali
Copy link

Hello there👋,
Any luck creating a reproducible scenario? This would greatly help us in diagnosing and fixing the issue. Thanks in advance for your cooperation:)

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

No branches or pull requests

3 participants