Keep CI's Go module cache deletable, and use the runner's sqlc #23

Merged
olli merged 1 commit from fix/ci-module-cache into dev 2026-10-15 14:05:26 +03:00
Collaborator

The server job for 27c87b4 failed on dev, after the same commit had passed on its branch, so staging stayed on ffc1615. These two changes are the fix.

Module cache

Go makes its module cache read-only, so the runner could not delete a server job's workspace afterwards. Each run left its modules, about 800M with sqlc's, on the runner's tmpfs until it filled. GOFLAGS now includes -modcacherw, which keeps the cache writable and the workspace removable.

sqlc from the runner

sqlc now comes from the runner's image instead of being built from tools/go.mod on every run; building it accounted for most of those modules. Before sqlc diff, the job checks that the runner's sqlc version matches the release tools/go.mod pins (currently v1.31.1 on both sides). README notes that the runner needs sqlc and that the two are bumped together.

Local development is unchanged: go tool -modfile=tools/go.mod sqlc generate still works.

After merging

Staging should move from ffc1615 to this commit, which also brings the OpenBao/Vault fix from #22.

The `server` job for `27c87b4` failed on `dev`, after the same commit had passed on its branch, so staging stayed on `ffc1615`. These two changes are the fix. ## Module cache Go makes its module cache read-only, so the runner could not delete a `server` job's workspace afterwards. Each run left its modules, about 800M with sqlc's, on the runner's tmpfs until it filled. `GOFLAGS` now includes `-modcacherw`, which keeps the cache writable and the workspace removable. ## sqlc from the runner sqlc now comes from the runner's image instead of being built from `tools/go.mod` on every run; building it accounted for most of those modules. Before `sqlc diff`, the job checks that the runner's `sqlc version` matches the release `tools/go.mod` pins (currently `v1.31.1` on both sides). README notes that the runner needs sqlc and that the two are bumped together. Local development is unchanged: `go tool -modfile=tools/go.mod sqlc generate` still works. ## After merging Staging should move from `ffc1615` to this commit, which also brings the OpenBao/Vault fix from #22.
Keep CI's Go module cache deletable, and use the runner's sqlc
Some checks failed
CI / lint (push) Successful in 2s
CI / server (push) Successful in 24s
CI / image (push) Successful in 3s
CI / verify-staging (push) Successful in 51s
Release / find-image (push) Failing after 0s
Release / verify-production (push) Has been skipped
5770fee426
Go makes its module cache read-only, so the runner could not delete a
server job's workspace afterwards, and each run left its modules, some
800M with sqlc's, on the runner's tmpfs until it filled. -modcacherw
keeps the cache writable and the workspace removable.

sqlc now comes from the runner's image instead of being built from
tools/go.mod on every run, which was most of those modules. The job
first checks the runner's sqlc is the release tools/go.mod pins, so the
two cannot drift apart unnoticed.
olli merged commit 5770fee426 into dev 2026-10-15 14:05:26 +03:00
olli deleted branch fix/ci-module-cache 2026-10-15 14:05:26 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
olli/olli.puhakka.dev!23
No description provided.