Skip to content

Commit d611daa

Browse files
authored
chore(ci): evict stale lake-packages cache in host maintenance (#2037)
The weekly host-maintenance run prunes lake-build, compiler-ccache, journald, and docker, but never touched /srv/verity-ci-cache/lake-packages. That dir grows one ~5.7G entry per PR/branch/content-hash and was never evicted, so the x64 runner root disks filled to 100% and the runners silently dropped offline (the runner service stays active but can't write). Add an mtime-based prune for lake-packages (default 14 days, override via LAKE_PACKAGES_MAX_AGE_DAYS), mirroring the existing lake-build eviction. Worst case of an over-prune is a cache miss on the next build, never incorrectness.
1 parent 4b6ca2d commit d611daa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/ci_host_maintenance.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -euo pipefail
44
CACHE_ROOT="${CACHE_ROOT:-/srv/verity-ci-cache}"
55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66
LAKE_BUILD_MAX_AGE_DAYS="${LAKE_BUILD_MAX_AGE_DAYS:-21}"
7+
LAKE_PACKAGES_MAX_AGE_DAYS="${LAKE_PACKAGES_MAX_AGE_DAYS:-14}"
78
COMPILER_CCACHE_MAX_AGE_DAYS="${COMPILER_CCACHE_MAX_AGE_DAYS:-21}"
89
ARTIFACT_MAX_AGE_HOURS="${ARTIFACT_MAX_AGE_HOURS:-24}"
910
JOURNAL_VACUUM_TIME="${JOURNAL_VACUUM_TIME:-14d}"
@@ -23,6 +24,7 @@ Subcommands:
2324
Environment:
2425
CACHE_ROOT Default: /srv/verity-ci-cache
2526
LAKE_BUILD_MAX_AGE_DAYS Default: 21
27+
LAKE_PACKAGES_MAX_AGE_DAYS Default: 14
2628
COMPILER_CCACHE_MAX_AGE_DAYS Default: 21
2729
ARTIFACT_MAX_AGE_HOURS Default: 24
2830
JOURNAL_VACUUM_TIME Default: 14d
@@ -61,6 +63,7 @@ run_maintenance() {
6163

6264
mkdir -p "$CACHE_ROOT"
6365
prune_tree "$CACHE_ROOT/lake-build" "$LAKE_BUILD_MAX_AGE_DAYS" "lake-build cache"
66+
prune_tree "$CACHE_ROOT/lake-packages" "$LAKE_PACKAGES_MAX_AGE_DAYS" "lake-packages cache"
6467
prune_tree "$CACHE_ROOT/compiler-ccache" "$COMPILER_CCACHE_MAX_AGE_DAYS" "compiler ccache"
6568

6669
if [ -x "$SCRIPT_DIR/ci_local_persistence.sh" ]; then

0 commit comments

Comments
 (0)