Files
coder/.github/actions
Ethan 14f66c0b07 ci: raise the Linux Go temp dir tmpfs to 16g (#31115)
Closes GRU-42

`test-go-race-pg` failed on `main` whilst linking a test binary:

```
/usr/bin/ld: final link failed: No space left on device
FAIL	github.com/coder/coder/v2/coderd/x/gitsync [build failed]
```

https://github.com/coder/coder/actions/runs/39546966484/job/119047324357

The disk that filled up was the 8g tmpfs we mount at `GOTMPDIR`
(#28919), not the root disk. `go test` puts its `$WORK` dir under
`GOTMPDIR`, `ld` writes the test binary there, and every compiled
package archive stays in `$WORK` until `go test` exits. With a warm
build cache there's barely anything to compile, so this peaks at about
1.1 GiB. With a cold cache, a `-race -p 4` build of our test packages
peaked at 8.06 GiB locally, and that's without running a single test or
writing anything to `t.TempDir()`. (The flake bot blamed the linker's
`/tmp/go-link-*` scratch dir on the root disk, but `ld` wrote to that
just fine. Pointing `TMPDIR` at the tmpfs would only make this worse.)

Our build cache comes from Depot (their runners preset `GOCACHEPROG` to
`depot gocache`), and in this run it mostly missed: 92 `(cached)`
results, versus 228 and 263 in the runs either side, with only docs
commits in between. I'm not sure why. All 8 `test-go-race-pg` ENOSPC
failures I found this month had a cold cache like this.

To fix, we'll just raise the tmpfs to 16g. `size=` is only a limit;
tmpfs takes RAM only for files that actually exist, so a bigger limit
uses no memory until something writes that much data.

There were also two ENOSPC failures in the non-race jobs on 2026-10-09
with a warm cache, which I can't explain.
2026-10-22 13:00:09 +11:00
..