Repository navigation
Description
Summary
E2E builds on GitHub-hosted runners read their sccache objects from the rstudio-sccache S3 bucket (us-east-1, set up in #18337). GitHub-hosted runners run outside AWS, so every cache hit is billed as S3 internet egress. A warm build downloads ~850 objects (~0.85 GB), roughly $0.08 per build. Moving the bucket to another region wouldn't help, since internet egress is priced the same from us-east-1 and us-east-2.
GitHub now sells Actions cache storage above the free 10 GB ($0.07/GiB/month), and we can raise this repo's limit to 20 GB. Cache downloads aren't billed. The goal is to move the daily platforms' sccache back to the Actions cache, after cleaning up what already fills it.
Why we left the Actions cache
From #18337: sccache's GHA backend stores each object as its own cache entry in the PR's merge-ref scope. 6,150 of the repo's 6,174 entries were sccache objects, the repo sat at the 10 GB quota, the entries the main-branch seeds maintained were LRU-evicted, and PR builds hit the cache ~0% of the time.
Current state (measured 2026-10-29)
- The cache is at 10.0 / 10 GiB (1,387 entries). Its least recently used entry was last read about a day earlier, so it is evicting constantly.
- The rotation engines flush it every Sunday. Scheduled rotation runs test the daily build, so they never compile or use sccache. They do save their test-dependency caches on main (Playwright browsers, pak downloads, R library: ~0.55 GB per engine), and the Sunday runs cover ~22 engines (~12 GB). For the last seven Sundays (Sep 13 to Oct 25), the cache-seed sentinel has re-dispatched the macOS 26, Ubuntu 24, and Windows seeds every Sunday afternoon.
- Superseded GWT builds. GWT output is keyed on a hash of the GWT sources and is only reused on an exact key match. Every merge that touches
src/gwtsaves a new 30-80 MB entry per platform key, and the old one is never read again. The Windows key had 7 versions on main. - Duplicates. The Ubuntu 24 desktop and server workflows saved byte-identical test-dependency caches under two scopes (~0.5 GB).
- The Windows tools cache is 2.1 GB, mostly unneeded. About 970 MB is download archives that
rstudio-tools.cmd's:installkeeps after extracting. Another ~340 MB is the extracted copilot language server, whichinstall-dependencies.cmddeletes and re-extracts on every run. About 0.5 GB is unused variants: Boost and OpenSSL debug/x86 builds, other platforms' copilot SDK binaries, and a standalone pandoc. Trimming the archives, the copilot directory, and OpenSSL brings it to ~1.05 GB; Boost (~140 MB) stays because SOCI rebuilds need every variant.
Sizing
Keeping everything we save today, plus the daily platforms' sccache:
| GB | |
|---|---|
| Daily platforms' caches (tools, Playwright, R, GWT, node) for Windows x64, macOS arm64, macOS x86_64, Ubuntu 24 | ~6.7 |
| Old GWT builds kept for 7 days | ~5 |
| Rotation engines' test dependencies (~20 distinct engines) | ~10-12 |
| sccache for the 4 daily platforms, plus a week of changes | ~5-6 |
| Margin (fork PRs, stray PR entries) | ~2 |
| Total | ~30 |
With the cleanups below, the load is ~14 GB, which fits a 20 GB limit with ~6 GB of headroom (more once the Windows tools cache is trimmed).
Plan
- pass the sccache role to the windows seed #19356: the Windows seed passes
AWS_SCCACHE_ROLE_ARN. It had been falling back to the GHA backend and writing ~0.8 GB of sccache objects into main's scope. - reduce what e2e workflows store in the actions cache #19357: the rotation and certification workflows stop saving test-dependency caches, the sentinel prunes GWT builds to the two newest per key, and Ubuntu 24 server and desktop share keys.
- reduce what e2e workflows store in the actions cache #19357 also trims the Windows tools cache before saving (~1 GB): it drops kept archives (all but the copilot zip), the extracted copilot directory, and unused OpenSSL variants. Boost stays, since a SOCI rebuild needs every variant.
- Raise the repo's Actions cache limit to 20 GB.
- move every e2e engine's sccache from s3 to the actions cache #19387: move the daily platforms' sccache to the Actions cache. Main-branch seeds write; PR builds set
SCCACHE_GHA_RW_MODE=READ_ONLY, which the pinned sccache v0.16.0 supports. The weekly rotation engines don't compile, so nothing else needs sccache. - Re-measure cache usage a week after each step.
Activity
pass the sccache role to the windows seed (#19356)
trim the windows tools cache before saving it
compress actions cache entries at zstd level 9
set ZSTD_CLEVEL once per engine workflow
share the windows tools trim with the arm64 workflow
document the noble-amd64 deps scope shared with linux server
drop unused GH_REPO from the gwt prune step
reduce what e2e workflows store in the actions cache (#19357)
move every e2e engine's sccache to the actions cache
move every e2e engine's sccache from s3 to the actions cache (#19387)
kevinushey commentedon Nov 4, 2026
Post-merge validation of #19387 (merged 2026-11-02 17:49 UTC), measured 2026-11-04.
Mode. Every "Configure sccache" step on main logged
READ_WRITE; every PR build loggedREAD_ONLY.sccache --show-statsreportsCache location: ghaceverywhere; no engine references S3 any more.Seeds (main, READ_WRITE). The first seeds after the merge ran cold, as expected (0-58% hits, the Windows seed re-using the stale entries from the #19239 test). By the nightly seeds of 2026-11-03 and 2026-11-04 they hit almost everything:
PR builds (READ_ONLY). Runs 41582492097 (2026-11-03) and 41845930050 (2026-11-04) hit 98.3-98.8% on all four build engines, at 0.07-0.20 s per read -- the same rate S3 gave. Their "Cache write errors" equal their misses: that is sccache counting the saves it refused in READ_ONLY mode, so nothing lands in PR merge-ref scopes.
Cache budget. 22.1 GB / 6,043 entries against the 40 GB limit. sccache entries on
refs/heads/main: 3,742 (3.2 GB), i.e. ~0.8 GB per engine as sized above. 2,279 entries (1.69 GB) are still parked underrefs/pull/19239/mergefrom the READ_WRITE test on that fork PR; they have not been read since 2026-10-30 and will age out under the 7-day rule.Rotation engines. The scheduled rotation run (41798231284) skipped every build job (it tests the dailies), so those engines have no entries on main yet; they warm the first time a source build is dispatched from main.
Not related to the switch. Two seeds failed on 2026-11-04 15:59 UTC: the Windows seed on a transient
hashFileserror (the next push seed passed) and the macOS 15 seed ongetaddrinfo ENOTFOUND github.comduring electron-forge packaging (#19420, opened by the sentinel; closes itself on the next green seed).Step 5 is done. Step 6 (re-measure) is due around 2026-11-09.