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

Same cache folder prevents running the action on same VM using different runners #1196

Open
2 of 5 tasks
VOVELEE opened this issue Jan 7, 2025 · 0 comments
Open
2 of 5 tasks
Labels
bug Something isn't working needs triage

Comments

@VOVELEE
Copy link

VOVELEE commented Jan 7, 2025

Description:

Currently cache state directory is being hardcoded to the same 56acbeaa-1fef-4c79-8f84-7565e560fb03 value.
This causes permission issues in the following situation:

  • One virtual machine has multiple GitHub runners
  • Every runner is running under different user context
  • Stale action is executed on multiple runners against multiple repositories

This causes state.txt to be owned by the user context of the first runner which executes the Github action preventing others runners to be able to use the state cache functionality.
One potential solution is to the STALE_DIR folder name to be a hash of the repository name. This will ensure that every repository will get its own state.

  • Example error
Error: Error: EACCES: permission denied, open '/tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03/state.txt'
Error: EACCES: permission denied, open '/tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03/state.txt'

Action version:

  • Available in the latest one

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
See description.

Expected behavior:
See description.

Actual behavior:
See description.

@VOVELEE VOVELEE added bug Something isn't working needs triage labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant