Skip to content

Commit 1158ca2

Browse files
authored
fix(dogfood/coder): run go clean cache at workspace shutdown (#18685)
The Go build cache has a tendency to accumulate and waste space (typically in the realm of 10-70 GB). This change automatically cleans up the cache on shutdown to prevent accumulation.
1 parent 6f2834f commit 1158ca2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dogfood/coder/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ resource "coder_agent" "dev" {
496496
#!/usr/bin/env bash
497497
set -eux -o pipefail
498498
499+
# Clean up the Go build cache to prevent the home volume from
500+
# accumulating waste and growing too large.
501+
go clean -cache
502+
499503
# Clean up the unused resources to keep storage usage low.
500504
#
501505
# WARNING! This will remove:

0 commit comments

Comments
 (0)