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

move /nix to /mnt/nix on Linux workflow #5264

Merged
merged 7 commits into from
Aug 2, 2024
Merged

move /nix to /mnt/nix on Linux workflow #5264

merged 7 commits into from
Aug 2, 2024

Conversation

aryairani
Copy link
Contributor

@aryairani aryairani commented Aug 2, 2024

Overview

nix is installed in /nix, which on the ubuntu-20.04 runner doesn't have enough space to build everything from scratch, resulting in CI failures on trunk and some PRs, eg #5265

This PR causes the linux runner install nix onto a disk that's bigger than /

fixes #5266

Implementation notes

adds a step to mount -o bind /mnt/nix /nix before installing nix, and this seems to work.

Interesting/controversial decisions

Test coverage

the nix steps still pass

Loose ends

@aryairani aryairani changed the title debug nix-dev-cache move /nix to /mnt/nix on Linux workflow Aug 2, 2024
@aryairani aryairani marked this pull request as ready for review August 2, 2024 19:03
@aryairani aryairani requested a review from a team as a code owner August 2, 2024 19:03
@aryairani aryairani requested a review from sellout August 2, 2024 19:03
Copy link
Contributor

@sellout sellout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very helpful. I made a few non-blocking suggestions.

.github/workflows/nix-dev-cache.yaml Show resolved Hide resolved
.github/workflows/nix-dev-cache.yaml Outdated Show resolved Hide resolved
@@ -38,3 +43,5 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: build all packages and development shells
run: nix -L build --accept-flake-config --no-link --keep-going '.#all'
- name: print disk free status
run: df -h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m guessing this is intentional and not just leftover debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I added this intentionally for future debugging

Copy link
Member

@stew stew Aug 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems super weird to me. /mnt is only supposed to be used transiently by a system administrator, not something that should be scripted against. There is no reason (if you care about the FHS) that there should be anything mounted to /mnt to make it a separate filesystem than /. Is /mnt just some other big disk on GHA?

If this works, that's great, I'm just curious, as this seems kinda wrong to me...

.github/workflows/nix-dev-cache.yaml Outdated Show resolved Hide resolved
@@ -24,6 +24,11 @@ jobs:
- macOS-14
steps:
- uses: actions/checkout@v4
- name: set up nix mount points on Linux
Copy link
Contributor Author

@aryairani aryairani Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: set up nix mount points on Linux
- name: switch nix mount point on Linux
# On the Linux runner `/` doesn't have enough space, but `/mnt` does.

Copy link
Contributor

@ChrisPenner ChrisPenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for handling the annoying CI stuff!

@aryairani aryairani merged commit 69886f4 into trunk Aug 2, 2024
35 checks passed
@aryairani aryairani deleted the nix-tmate branch August 2, 2024 22:21
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

Successfully merging this pull request may close these issues.

nix-dev-cache keeps failing
4 participants