#708 keys go install-built tool binaries on the Go toolchain version:
$(DOWNLOAD_DIR)/tools/<tool>@<version>_<goversion>_<os>_<arch>
Each Go upgrade therefore produces a fresh set of binaries, and nothing evicts the superseded ones. Pruning was deliberately left out of #708: DOWNLOAD_DIR defaults to $(HOME)/.cache/makefile-modules, shared between repositories which may be on different toolchains, so unconditional pruning would thrash the cache.
But the growth is real. As @SgtCoDFish noted in review, cert-manager builds ~35 Go tools, several of them large (golangci-lint, cosign, syft, goreleaser; openapi-gen is 25MB on its own) — a full generation is on the order of 1GB+. GitHub Actions caps caches at 10GB per repository, so a few Go bumps will start evicting, and Prow's hostPath node caches have no eviction at all.
Proposal:
- An opt-in
prune-tools-cache target which removes cached tool binaries whose embedded <goversion> does not match the current GO_TOOLCHAIN_VERSION (and perhaps tool versions no longer referenced).
- A note in the tools module README about cache growth and when to run it.
with claude fable-5
#708 keys
go install-built tool binaries on the Go toolchain version:Each Go upgrade therefore produces a fresh set of binaries, and nothing evicts the superseded ones. Pruning was deliberately left out of #708:
DOWNLOAD_DIRdefaults to$(HOME)/.cache/makefile-modules, shared between repositories which may be on different toolchains, so unconditional pruning would thrash the cache.But the growth is real. As @SgtCoDFish noted in review, cert-manager builds ~35 Go tools, several of them large (
golangci-lint,cosign,syft,goreleaser;openapi-genis 25MB on its own) — a full generation is on the order of 1GB+. GitHub Actions caps caches at 10GB per repository, so a few Go bumps will start evicting, and Prow's hostPath node caches have no eviction at all.Proposal:
prune-tools-cachetarget which removes cached tool binaries whose embedded<goversion>does not match the currentGO_TOOLCHAIN_VERSION(and perhaps tool versions no longer referenced).with claude fable-5