Skip to content

Ci cache save if main only#4

Merged
solsson merged 3 commits into
mainfrom
ci-cache-save-if-main-only
Jun 16, 2026
Merged

Ci cache save if main only#4
solsson merged 3 commits into
mainfrom
ci-cache-save-if-main-only

Conversation

@solsson

@solsson solsson commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Yolean macbot01 and others added 3 commits June 11, 2026 15:55
PR runs were producing one ~500 MB rust-cache entry per (job ×
rustc × Cargo.lock) tuple. With dependency churn across PRs the
per-repo Actions cache budget grew to ~130 entries / ~65 GB,
which trips eviction of warm main-scope entries and ultimately
costs storage. PRs now still *restore* from existing caches (so
they get the same speedup, ~3-5 min per job on a librdkafka cold
build) but skip the save step, leaving cache writes to main only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lets in-flight design discussions live in the repo root as
markdown without polluting git history. The current use is
NOTES_DELIVERY_SEMANTICS.md, written locally as a shelf for the
delivery-semantics + readiness redesign while sub-decisions
(Skip semantics, commit-during-debounce concern) are still open.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Builds on main are rarely reverted, so the next main build only ever
reads from the most recent run's buildkit blobs. Per-commit layers
from older runs are dead weight: they accumulate, content-address
collisions make them hard to evict deliberately, and they push other
caches (rust-cache, etc.) closer to GitHub's 10 GB per-repo ceiling
until LRU starts evicting useful entries.

The keep-top-N=200 heuristic survives one multi-arch build's
~30-50 blob writes plus 2-3x headroom; older entries get the
`gh cache delete` treatment. PR runs are untouched (their entries
are already capped by the rust-cache save-if change in the previous
commit, and buildx writes are scoped per-ref).

Needs `actions: write` on the image job so gh CLI can delete cache
entries via the repo's API token.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@solsson solsson merged commit 95f0e03 into main Jun 16, 2026
3 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