Skip to content

ci: start a fresh dependency cache per profile and month - #12957

Merged
cv merged 1 commit into
v1from
ci/cache-generations
Oct 10, 2026
Merged

cv merged 1 commit into
v1from
ci/cache-generations

Conversation

@cv

@cv cv commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Failure

The Rust dependency caches have grown from 1.3–1.5 GB to about 2.9 GB per platform in a day. Before saving, rust-cache keeps target artifacts by crate name only, not by version or build hash (cleanProfileTarget at the pinned revision). When a key change restores an older cache, the new cache therefore keeps every earlier build of each crate. The two profile changes in #12905 and #12885 each rebuilt every dependency with new hashes.

The larger caches slow both ends of each run. Windows setup restores for 123–210 s. When v1 saves a changed key, the Windows Build and test save takes 298–433 s, and lifecycle tests wait for it. Those saves made warm runs take 850–1,095 s instead of about 600 s.

Decision

Add two parts to the rust-cache prefix:

  • The hash of .cargo/config.toml: a profile change starts a fresh cache instead of extending the old one.
  • The current UTC month: this bounds the slower growth from lockfile updates, at the cost of one cold build per platform each month.

Within a generation, manifest, lockfile, and toolchain-file changes still restore the previous cache and rebuild only what changed. Deleting unused artifacts before saving isn't reliable, because Cargo doesn't touch an artifact that's already fresh, so a job can't tell which files it used.

The new prefix also resets the current oversized caches: the first v1 push after merge builds each platform cold. The old entries expire unused.

Validation

  • actionlint passes on the workflows, and the composite action parses as YAML with the new step.
  • cargo ci passed: 1,324 workspace tests and all 120 lifecycle tests.
  • fern check passes.
  • After merge, the v1 cache entries should return to about 1.3–1.5 GB per platform and stay there within the month.

@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit a3c5b93 into v1 Oct 10, 2026
@cv
cv deleted the ci/cache-generations branch October 10, 2026 04:58
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 2026
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance labels Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants