Skip to content
New issue

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

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

Already on GitHub? # to your account

Devbox cache restore fails on self-hosted runners #49

Closed
supershal opened this issue May 16, 2024 · 4 comments
Closed

Devbox cache restore fails on self-hosted runners #49

supershal opened this issue May 16, 2024 · 4 comments

Comments

@supershal
Copy link
Contributor

The devbox cache is restored to /usr/local/bin/devbox. https://github.com/jetify-com/devbox-install-action/blob/main/action.yml#L58

This works well with github hosted runners. however self hosted runners runs as a runner user and they dont have permission to restore files outside home or workspace.
As a result the cache restore fails.

/usr/bin/tar -xf /runner/_work/_temp/fe855c32-ce18-4de4-a823-45e0f7cd2593/cache.tzst -P -C /runner/_work/myorg/myrepo --use-compress-program unzstd
/usr/bin/tar: ../../../../usr/local/bin/devbox: Cannot open: Permission denied
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Cache not found for input keys: Linux-X64-devbox-cli-0.10.6

Related issue filed at actions/cache: actions/cache#1127

Various self hosted images are built from Dockerfiles at:
https://github.com/actions/actions-runner-controller/tree/master/runner

Should the devbox restored and installed at ~/.local/bin directory and make it accessible by adding it to $PATH?

@supershal
Copy link
Contributor Author

@LucilleH any thoughts on this?

github-merge-queue bot pushed a commit that referenced this issue May 20, 2024
Addresses #49
The `runner` user on self hosted runners does not have access to
`/usr/local/bin` path. This result in cache restore failures at
`/usr/local/bin`.
We can install devbox at user's home directory and make it accessible to
subsequent actions.
@LucilleH
Copy link
Contributor

@supershal Good call! Thank you for the suggestion and PR

@DjoleLepi
Copy link

It seems that the line mentioned in the comment here wasn't fixed wit the PR.

The devbox cache is restored to /usr/local/bin/devbox. https://github.com/jetify-com/devbox-install-action/blob/main/action.yml#L58

@LucilleH
Copy link
Contributor

LucilleH commented Jun 8, 2024

@DjoleLepi you are right 😭

@LucilleH LucilleH reopened this Jun 8, 2024
LucilleH added a commit that referenced this issue Jun 8, 2024
Update action.yml devbox CLI cache location. Addresses #49

Signed-off-by: Lucille Hua <lucille.hua@gmail.com>
github-merge-queue bot pushed a commit that referenced this issue Jun 12, 2024
Update action.yml devbox CLI cache location.

Addresses #49

Signed-off-by: Lucille Hua <lucille.hua@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

3 participants