Skip to content

chore(ci): evict stale lake-packages cache in host maintenance#2037

Merged
Th0rgal merged 1 commit into
mainfrom
chore/lake-packages-eviction
Jun 18, 2026
Merged

chore(ci): evict stale lake-packages cache in host maintenance#2037
Th0rgal merged 1 commit into
mainfrom
chore/lake-packages-eviction

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

  • scripts/ci_host_maintenance.sh run (weekly verity-ci-host-maintenance.timer, Sun 04:30) prunes lake-build, compiler-ccache, journald, and docker — but had no rule for lake-packages.
  • /srv/verity-ci-cache/lake-packages grows one ~5.7G entry per PR/branch/content-hash and was never evicted. On 2026-06-18/19 both x64 CI runner root disks hit 100% (hz2 701G/125 entries, hz1 1.1T/194 entries, some back to April) and the runners silently dropped offline — the runner systemd service stays active running but can't write to a full disk, so it just disconnects from GitHub.
  • This adds an mtime-based prune for lake-packages (default 14 days, override via LAKE_PACKAGES_MAX_AGE_DAYS), mirroring the existing lake-build eviction and reusing the same prune_tree helper.

Risk

  • Worst case of an over-prune (e.g. an active long-lived branch whose cache hasn't been touched in 14 days) is a cache miss on the next build — slower, never incorrect. Same risk profile as the existing lake-build/compiler-ccache evictions.

Test plan

  • bash -n scripts/ci_host_maintenance.sh (syntax)
  • On a runner host: LAKE_PACKAGES_MAX_AGE_DAYS=14 scripts/ci_host_maintenance.sh run prints lake-packages cache: removed N entries older than 14 days and frees disk
  • Re-run install-systemd so the weekly timer picks up the new prune (no unit change required; the run subcommand reads the updated script)

Note

Low Risk
Operational disk cleanup only; over-pruning would cause slower rebuilds (cache miss), not incorrect builds—same profile as existing lake-build eviction.

Overview
Weekly scripts/ci_host_maintenance.sh run now prunes $CACHE_ROOT/lake-packages the same way it already prunes lake-build and compiler-ccache, using the existing prune_tree helper (top-level entries older than mtime threshold).

A new env knob LAKE_PACKAGES_MAX_AGE_DAYS defaults to 14 and is documented in usage(), alongside the existing cache age variables.

Reviewed by Cursor Bugbot for commit bc5f015. Bugbot is set up for automated code reviews on this repo. Configure here.

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.
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
verity Ready Ready Preview, Comment Jun 18, 2026 11:31pm

Request Review

@Th0rgal Th0rgal merged commit d611daa into main Jun 18, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant