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

Consider option to set TMPDIR from action #197

Closed
jalaziz opened this issue Oct 30, 2023 · 2 comments · Fixed by #199
Closed

Consider option to set TMPDIR from action #197

jalaziz opened this issue Oct 30, 2023 · 2 comments · Fixed by #199
Labels
bug Something isn't working

Comments

@jalaziz
Copy link
Contributor

jalaziz commented Oct 30, 2023

I recently ran into NixOS/nix#395, resulting in an unexpected "out of space" error when running a build in nix-shell despite there being plenty of space on the runner.

While I could set TMPDIR myself, it seems like it may be beneficial to set it from this action as the default nix behavior is not very GitHub Actions Runner friendly.

It seems like the best candidate is setting TMPDIR to $RUNNER_TEMP.

@sandydoo sandydoo added the bug Something isn't working label Nov 2, 2023
@sandydoo
Copy link
Member

sandydoo commented Nov 2, 2023

@jalaziz, thanks for linking to that issue. The fallback to $XDG_RUNTIME_DIR is problematic. It might be a good idea to set $TMPDIR until NixOS/nix#395 is resolved.

Using $RUNNER_TEMP sounds reasonable to me. @domenkozar, thoughts?

@domenkozar
Copy link
Member

If we can set it in the action that would be great.

local testing says

echo $NIX_BUILD_TOP
/run/user/1000

jalaziz added a commit to jalaziz/install-nix-action that referenced this issue Nov 3, 2023
Set `TMPDIR` if not already set to workaround potential disk space
issues while running builds in a nix shell. See NixOS/nix#395 for
more info.

fixes cachix#197
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

Successfully merging a pull request may close this issue.

3 participants