Skip to content

ci: retire the app-build caches and fit the ASan archive (#1801, phase A) - #3129

Merged
zackees merged 2 commits into
masterfrom
infra/1801-cache-allocation
Oct 31, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/1801-cache-allocation

Conversation

@vpacher

@vpacher vpacher commented Oct 31, 2026

Copy link
Copy Markdown
Member

Fixes #1801

What

Phase A of the plan in #1801 (Decided: 2026-10-30): the six app-build families leave the Actions cache, so the declared family maxima fit [cache].budget. The same PR raises the sanitize shape of the zccache family to 1GB, so the PR asan job gets master's archive again.

Why now, without the larger cache limit: actions/cache/storage-limit still answers 402 on 2026-10-31. The repository holds 9.93 GiB in 46 entries; the six app families are 5.71 GiB of it and hit 9 of 42 restores, all on nightly, dispatch and release runs.

The ASan cache: master's zccache-sanitize-asan-ON-* archive is 753,363,578 B, and the sanitize shape allowed 300MB, so the janitor evicted it. PR asan jobs then built cold, and CI Gate waits for them:

PR run Restore zccache Build, test and launch Job
#3077, 2026-10-30 (hit) 26 s 1392 s 25 min
41157362985, 2026-10-31 (miss) 0 s 3296 s 55 min
41158012437, 2026-10-31 (miss) 1 s 2696 s 46 min

Raising only the sanitize maximum would not work: with 80 MB left under the cap, the 718 MB entry would push out caches by LRU, and each nightly writes the app caches again. With phase A the stored total is about 4.9 GiB.

Changes

  • ci.toml: no flatpak-builder, windows-ccache-x64, windows-ccache-arm64, zccache-ubuntu, xcode-x86_64 or xcode-arm64; sanitize = { max = "1GB" }. Declared total (CACHE-004 arithmetic): 10,257,799,577 B against 10,737,418,240 B (was 17,618,803,096 B).
  • build-project.yaml: the macOS, Windows, Ubuntu and Flatpak app builds restore and save no compiler cache. These went with the caches they served: the Ubuntu snapshot size check, the Flatpak cache_key and the legacy dependency restore of flatpak-compiler-consumer, and the flatpak-cold-build input (also in ci.yml; every Flatpak build is cold now). Flatpak keeps cache: true, which passes --ccache to flatpak-builder (ci: Flatpak build takes ~17 min; where the time goes #651).
  • Native transport seed (perf: accelerate Windows/macOS validation CI and publishing with compiler caches, PCH and zccache/reld #782): the dispatch-only seed goes from the app build to the native-cache-transport job as a one-day artifact, native-cache-seed-<platform>-<suffix>, instead of an Actions cache entry. download-artifact fails on a missing name, as the exact restore with fail-on-cache-miss did. The suffix (ci/native_cache_seed.py) still binds the seed to the producer's profile.
  • release-rust.yaml: no read-only restore of the retired caches. The release builds cold: Windows x64 15m34s against 3m08s warm (perf: accelerate Windows/macOS validation CI and publishing with compiler caches, PCH and zccache/reld #782).
  • publish.yaml: no lookup of a master Flatpak builder cache (cache: false).
  • Docs: docs/ci-tooling.md (cache section, Flatpak measurement); docs/ci-speed-flatpak-pch-1760.md marks the cold-build input as retired.

What gets slower: nightly, dispatch and release app builds (macOS, Windows, Ubuntu, Flatpak) always start cold. They were cold in 79 % of the restores before. No PR or merge-queue lane uses these caches. The release-asset transport (#782, phases B/C) can bring them back outside the budget.

Commits

  1. RED 44ef18b: 10 failures on master:
    • test_declared_families_fit_in_the_budget: 17,618,803,096 B > 10,737,418,240 B;
    • test_app_build_families_are_retired_with_their_consumers: 6 subtests, one per family;
    • test_sanitize_shape_holds_the_measured_asan_archive: 300MB < 1.25 × 753,363,578 B (fixture ci/fixtures/sanitize-compiler-cache.json);
    • test_native_cache_transport_workflow.py: 2 tests, the seed hand-off by artifact.
  2. GREEN bad08a8: the changes above. Tests that pinned the retired caches are removed (test_native_cache_exact_hit.py, test_ubuntu_cache_preserve.py and the fixture cache-retention-ubuntu.json) or rewritten (test_ci_toml.py Flatpak and native-architecture checks, test_release_native_cache.py, test_tier2_cache_retention.py, test_zccache.py, test_native_cache_journal.py, test_hybrid_packaging.py, test_flatpak_measurement_scope.py).

Tests

  • ci/test_*.py on macOS: the same pass/fail set as master, apart from the changed files. The remaining macOS failures are host-specific and fail on master too.
  • Local gate (Linux), stamped head bad08a8: lint, rust-test, cross (Windows and macOS clippy and Dylint) and tier2-linux passed (7 min 15 s).
  • Not run: a dispatch with native-cache-transport-probe. The artifact hand-off is checked only by the workflow-text tests. The first manual transport run after merge shows it end to end.

Checklist

  • Base is master
  • I claimed the issue, or no one else has an open PR for it
  • RED, then GREEN commits
  • User-visible change: not applicable (CI only)
  • (Optional) Local gate passed and the pushed head is stamped
  • Warning or flag changes: not applicable
  • Intentional differences from C: not applicable

🤖 Generated with Claude Code

vpacher and others added 2 commits October 31, 2026 08:00
)

The pinned ci-lint's CACHE-004 sums the [cache.family] maxima and
compares the sum with [cache].budget. On master the sum is
17618803096 B against 10737418240 B, so the janitor cannot keep every
family and GitHub evicts the cook layers first. ci-lint precheck fails
on other rules too, so nothing gates CACHE-004 today.

Tests for phase A (Decided on #1801, 2026-10-30), all failing on
master:

- test_declared_families_fit_in_the_budget: the CACHE-004 arithmetic,
  offline.
- test_app_build_families_are_retired_with_their_consumers: the six
  app-build families (flatpak-builder, windows-ccache-x64/-arm64,
  zccache-ubuntu, xcode-x86_64/-arm64) are gone from ci.toml, and no
  workflow saves or restores their keys.
- test_sanitize_shape_holds_the_measured_asan_archive: the master asan
  zccache archive is 753363578 B (fixture), the sanitize shape max is
  300MB, so the janitor evicts it and PR asan jobs build cold.
- The native transport seed (#782) goes from the app build to the
  transport job as an artifact, not through the Actions cache.

10 failures: budget 1, retired families 6, sanitize 1, seed hand-off 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Phase A of #1801 (Decided 2026-10-30): the six app-build families leave
the Actions cache, so the declared maxima fit [cache].budget and the
janitor stops evicting the caches every PR and queue run uses.

- ci.toml: drop flatpak-builder, windows-ccache-x64/-arm64,
  zccache-ubuntu, xcode-x86_64/-arm64; raise the zccache sanitize shape
  to 1GB (master's asan archive is 753363578 B). Declared total
  10257799577 B against 10737418240 B.
- build-project.yaml: the macOS, Windows, Ubuntu and Flatpak app builds
  restore and save no compiler cache. The Ubuntu snapshot size check,
  the Flatpak cache key and the flatpak-cold-build input (ci.yml too)
  served only those caches and go with them.
- The dispatch-only native transport seed (#782) goes from the app
  build to the transport job as a one-day artifact
  (native-cache-seed-<platform>-<suffix>) instead of an Actions cache
  entry; download-artifact fails on a missing seed as the exact restore
  did.
- release-rust.yaml: no read-only restore of the retired caches; the
  release builds cold (Windows x64 15m34s against 3m08s warm, #782).
- publish.yaml: no lookup of a master Flatpak builder cache.
- Tests that pinned the retired caches are removed or rewritten
  (test_native_cache_exact_hit.py, test_ubuntu_cache_preserve.py and
  its fixture removed); docs/ci-tooling.md says what changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=a05c75e26b5021c63e19845fbdaa79868e2fc22d secs=435 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a
Ci-Attestation: {"at":1793431059,"gate":"rust/all/fmt","host":"linux-x86_64","key":"c7b4016c195219323755b83c7396eea37c36e2dbb07f12ebed3a1fe878daa331","lane":"lint","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":84,"stamp":"f9fa7722c5a531ea7702d74bde7a17e1","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"c7b4016c195219323755b83c7396eea37c36e2dbb07f12ebed3a1fe878daa331","lane":"lint","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":84,"stamp":"4f8188a5a8861a64493c96c12b2aab9b","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"d60e52d81e174ab08c14a4398ecaf1a0d767e48b1c4ad5d1da753030f9075b0e","lane":"rust-test","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":207,"stamp":"a9783b5574a36abda9e2cc1270182686","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"d40fa81447db93128a913f614f6caca06800884e52a8f99541af927d9abed73b","lane":"cross","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":143,"stamp":"0318e8c7b769ed015226b28da8680478","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"d40fa81447db93128a913f614f6caca06800884e52a8f99541af927d9abed73b","lane":"cross","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":143,"stamp":"68cb4e5a7c909c922f322878a7c315e2","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"d40fa81447db93128a913f614f6caca06800884e52a8f99541af927d9abed73b","lane":"cross","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":143,"stamp":"de053c7504c631cbe942337ee9b3a36a","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"d40fa81447db93128a913f614f6caca06800884e52a8f99541af927d9abed73b","lane":"cross","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":143,"stamp":"ef7a404214795606222bc4610af21ccc","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}
Ci-Attestation: {"at":1793431059,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"14bba1aaae962c232afd3e37e60119aeaccce9efbcae8f654b924d6f6ab59edf","lane":"tier2-linux","parents":["44ef18bef193c478d5f8ae70cffd824e053620c1"],"secs":247,"stamp":"16ac18fbf2218a03158e546355ad5c90","tree":"a05c75e26b5021c63e19845fbdaa79868e2fc22d","v":1,"via":"run"}

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: matches the 2026-10-30 Decided: on #1801 (phase A). It drops the six app-build families, and the declared total (10.26 GB) fits the 10.74 GB budget. Raising sanitize to 1 GB gives PR asan master's archive again, which the 25-vs-46/55-minute table justifies. The seed for the transport job (#782) moves to a one-day artifact and still fails on a missing name. The cost (cold nightly and release app builds) is stated. No PR or queue lane depended on these caches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(ci): reconcile global cache capacity and retain measured warm seeds

2 participants