Skip to content

move every e2e engine's sccache from s3 to the actions cache - #19387

Merged
kevinushey merged 2 commits into
mainfrom
test/e2e-sccache-gha-cache
Nov 2, 2026
Merged

kevinushey merged 2 commits into
mainfrom
test/e2e-sccache-gha-cache

Conversation

@kevinushey

@kevinushey kevinushey commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Addresses #19355 (step 5).

Every e2e engine moves its sccache objects from the rstudio-sccache S3 bucket, where each hit from a GitHub-hosted runner is billed as egress, to the Actions cache. #19357 has already cleared space in the cache, and the repo's limit is now 20 GB.

Changes

  • All engines: a "Configure sccache" step sets SCCACHE_GHA_ENABLED=true, with SCCACHE_GHA_RW_MODE=READ_WRITE on refs/heads/main and READ_ONLY everywhere else. Only runs on main write. PR builds read main's entries and don't add their own, so they can't push main's entries out of the cache, which is what happened in speed up e2e ci builds #18337.
  • Daily engines (macOS 26, macOS 15, Windows Server 2025, Ubuntu 24 server and desktop) have a nightly seed on main that keeps their entries current.
  • Rotation-only engines (macOS 14, macOS 27, Windows 11 arm64, the Linux rotation distros) compile only when dispatched from source. A dispatch from main fills their entries, which age out after a week unread; a dispatch from any other ref reads whatever main has. Windows 11 arm64 builds on the same windows-2025 image as Windows Server 2025, so it reads that engine's nightly entries. Linux engines that build bare on the Ubuntu 24 runner with the same toolchain read Ubuntu 24's.
  • Removed: the S3 credential steps, the AWS_SCCACHE_ROLE_ARN secret from every workflow that declared or passed it, and the sccache_backend and sccache_key_prefix keys from the .github/e2e-linux/ configs. The AWS_SCCACHE_ROLE_ARN repo secret, the AWS_SCCACHE_BUCKET repo variable, the IAM role, and the bucket itself are now unused by this repo.
  • make-package (macOS, Linux) skips the aws sts credential probe when SCCACHE_GHA_ENABLED is set, so GitHub builds no longer log a spurious AWS error. Jenkins builds still default to the rstudio-build-cache bucket; they run inside AWS and are unchanged.
  • Windows seed: it now runs nightly like the other seeds. os-test-e2e-rstudio-desktop-os-windows-server-2025-seed.yml, the separate weekly Windows seed, is deleted because it duplicated that run.

Trade-offs

  • PR builds no longer save their own objects. A PR that edits a widely-included header recompiles everything that includes it on every push, until it merges and the nightly seed caches the result.
  • PRs against rel-* branches only hit objects that are byte-identical to main's, since nothing seeds a rel-* scope. Under S3 they shared one cache with everything else. About ten rel-* PRs merged in October against roughly two hundred on main. If that becomes a problem, a rel-* seed is a follow-up.
  • A from-source dispatch of the whole rotation fleet from main would write roughly 1 GB per engine into main's scope at once. LRU eviction would then drop whatever had gone longest unread, which could include the daily seeds' entries until their next nightly run.
  • After this merges, every seed's trigger paths will have changed, so all the seeds run on main straight away and fill the cache. PR builds compile without cache hits until those runs finish.

Validation

  • An external fork PR (Fix RSTUDIO_USE_SYSTEM_DEPENDENCIES #19239), which can't use the AWS role, has already been building with this backend. It got 638/648 cache hits on Windows and 904/918 on Linux server, at about 0.14 s per read, which matches S3.
  • actionlint reports the same findings on main and on this branch; shellcheck likewise for make-package.
  • A script checked every reusable-workflow call and found no caller passing a secret its callee no longer declares.
  • A source build dispatched on this branch exercised the read-only path on Windows, macOS, and Linux server (see comments below).

The macOS 26, macOS 15, Windows Server 2025 and Ubuntu 24 engines now
keep their sccache objects in the Actions cache instead of the
rstudio-sccache S3 bucket, whose every hit was billed as egress. Runs on
main (the nightly seeds) write; every other ref reads main's entries
with SCCACHE_GHA_RW_MODE=READ_ONLY, so PR entries can't crowd main's
out of the repo's cache limit (#18337).

The Linux desktop engine picks its backend per config: gha for
ubuntu-24-x86_64, s3 for the rotation-only distros. The other
rotation-only engines stay on S3.

The Windows seed now runs nightly like the others, replacing the
weekly Windows seed workflow.

Addresses #19355
@kevinushey

kevinushey commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

I ran a test build on this branch: Windows Server 2025, built from source, build only (run 41383259813, passed in 51 min).

  • sccache used the Actions cache in read-only mode (Cache location: ghac, sccache backend: GitHub Actions cache (READ_ONLY)).
  • 378 of 648 compiles were cache hits (58%), averaging 0.075 s per read, with 0 read errors and 0 timeouts. The hits came from the ~700 Windows entries the seed saved on main on Oct 27-29, which predate the commits merged since then. A cache refreshed by the nightly seed should get the ~98% that S3 gets.
  • 270 cache write errors, one for each miss. Those are the saves read-only mode refuses. The compiles themselves still succeeded.
  • The branch's cache scope is still empty, so the PR build wrote nothing to the cache.

The PR's own e2e run (41383246727) also built from source, so it tested the same read-only mode on the other platforms:

build hits / compiles write errors result
windows 378 / 648 270 passed
macos 0 / 817 817 passed
linux-server 0 / 918 918 passed

macOS and Linux get no hits because main has no sccache entries in the Actions cache for them yet. The seeds will save those when they run after this merges. Until then, those builds compile everything, just as these did.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
4796 0 230 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1200 0 43 0
✅ desktop-macos 1206 0 38 0
✅ desktop-windows 1198 0 50 1
✅ server-linux 1140 0 51 0
✅ setup 48 0 32 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 4219d3357e2d7e4880b516201a9ac22b3362ab55 - Run #1863

The rotation-only engines (macOS 14, macOS 27, Windows 11 arm64, and the
Linux rotation distros) follow the daily engines off the rstudio-sccache
S3 bucket. Every engine now uses the same rule: main writes, every other
ref reads main's entries. The sccache_backend and sccache_key_prefix
engine-config keys, the S3 credential steps, and the AWS_SCCACHE_ROLE_ARN
secret plumbing go away, and make-package skips the AWS credential probe
when the Actions cache backend is already configured.

Addresses #19355
@kevinushey kevinushey changed the title move daily e2e sccache from s3 to the actions cache move every e2e engine's sccache from s3 to the actions cache Nov 2, 2026
@kevinushey

Copy link
Copy Markdown
Collaborator Author

Pushed 4219d33: the rotation-only engines (macOS 14, macOS 27, Windows 11 arm64, and the Linux rotation distros) now use the Actions cache too, under the same rule as the daily engines (main writes, every other ref reads). That removes the S3 code path and the sccache_backend / sccache_key_prefix config keys entirely, along with the AWS_SCCACHE_ROLE_ARN plumbing in the scheduled and certification workflows. make-package also skips the aws sts probe when the Actions cache backend is already set. The PR description now reflects the full move and its trade-offs.

@kevinushey

Copy link
Copy Markdown
Collaborator Author

Validation of 4219d33, which puts every engine on the Actions cache:

  • The PR's own e2e run (41393279738) built from source on all four daily platforms and passed.
  • A build-only source dispatch of ubuntu-24-arm64, a rotation-only engine, exercised the rewritten Linux workflow (41393375944, passed in 47 min).

Every build logged sccache backend: GitHub Actions cache (READ_ONLY) and Cache location: ghac, with 0 read errors and 0 timeouts. The macOS and Linux builds also logged make-package's new Using GitHub Actions build cache line instead of the aws sts error.

build hits / compiles avg read write errors result
windows (Server 2025) 378 / 648 0.32 s 270 passed
macos (26 arm64) 0 / 817 n/a 817 passed
linux-server (ubuntu 24) 0 / 918 n/a 918 passed
linux-desktop (ubuntu-24-x86_64) 0 / 814 n/a 814 passed
linux-desktop (ubuntu-24-arm64, dispatched) 0 / 814 n/a 814 passed

As before, the Windows hits come from the entries the seed saved on main on Oct 27-29; the other platforms have no main entries yet, so they get them when the seeds run after this merges. The write errors are the saves read-only mode refuses, one per miss. The branch scope and the PR's merge-ref scope both still hold 0 cache entries, so nothing wrote to the cache.

@kevinushey
kevinushey merged commit fb22359 into main Nov 2, 2026
49 checks passed
@kevinushey
kevinushey deleted the test/e2e-sccache-gha-cache branch November 2, 2026 17:49
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