You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The max-cache-size-mb input added in 8fa7f0c never did anything.
setup-docker-builder v1 accepted it and pruned in its own post step, but the v2
rewrite dropped the input, and the repo pins v2.1.0. GitHub only WARNS on an
unknown composite input, so every build since has logged
Unexpected input(s) 'max-cache-size-mb', valid inputs are ['cache-key', ...]
and pruned nothing. Scanned every tag to confirm: the input exists in v1.8.0
through v1.12.0 and in none of v2.0.0, v2.0.1, v2.1.0.
Rather than downgrade a builder rewrite to reach a config knob, run the prune
ourselves. This is v1's command verbatim (its dist/index.js pruneBuildkitCache),
against the fixed address v2 itself uses for `buildctl du` and `debug workers`:
sudo buildctl --addr tcp://127.0.0.1:1234 prune --all --keep-storage <MB>
Both flags checked against BuildKit master rather than assumed. buildctl's --all
is not `docker buildx prune --all`: it means "include internal/frontend
references", and cache/manager.go shows the only records skipped without it are
those typed internal or frontend plus refs shared with an external source. It
does not wipe the cache. --keep-storage maps straight onto the modern
MaxUsedSpace field, so it is buildctl's spelling of --max-used-space, not a
deprecated alias, and it remains the only size flag buildctl exposes.
Being a blocking command is the other reason to own it here. Turborepo's
equivalent eviction runs on a detached thread that is never joined, and on a
206 GB cache it makes no measurable progress inside a 150s job; a foreground
buildctl prune completes or reports why it did not.
Warn rather than fail, since an oversized cache is not worth failing a deploy
over — but print `buildctl du` either side, because a silent no-op is exactly
the failure mode that hid this regression for a day.
0 commit comments