Repository navigation
speed up e2e ci builds - #18337
Merged
Merged
speed up e2e ci builds#18337
Conversation
- prefer an S3 sccache backend (OIDC role + bucket repo variable) over the GHA cache backend, whose per-PR-scoped objects flooded the 10 GB Actions cache quota and left PR builds compiling at ~0% hit rate; falls back to the GHA backend when the infra is unconfigured (e.g. fork PRs) - compress the CI NSIS installer with zlib instead of solid LZMA (~11 min -> ~1-2 min for a throwaway artifact consumed once) - compile with /Z7 (embedded debug info) instead of /Zi so sccache can cache the ~200 objects that previously always recompiled - run the ~4 min disk-space cleanup as a background process, gated by a done-marker wait before the build step - shard the Windows e2e tests 4 ways instead of 2 - teach the cache-seed sentinel to open an alert issue when a seed workflow's latest completed run failed (startup_failure is invisible to the seed workflow itself and went unnoticed for two weeks)
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Applies the Windows S3-sccache pattern (OIDC credentials + backend-select step with GHA-cache fallback) to the other nine e2e build workflows, with per-platform key prefixes (the two Ubuntu 24 builds share one deliberately), and passes the AWS_SCCACHE_ROLE_ARN secret through every caller and seed. ubuntu-26/fedora-43/fedora-44 gain the id-token permission the OIDC exchange needs.
Gate the pre-build wait on free space (>= 20 GB) rather than only the cleanup done-marker: the detached cleanup competes with dependency installs for I/O and blew through the old 15-minute wait despite having already freed 13 GB. Also capture the detached process's output for diagnosis. Drop the /Z7 debug-format override: the verification run showed the same 209 non-cacheable compiles with it applied, so /Zi was never the blocker (the GHA seed's 98% hit rate already implied /Zi caches fine), and there is no reason to diverge from official builds' debug-info format.
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
The macOS e2e build failed because make-package unconditionally overrides SCCACHE_BUCKET to rstudio-build-cache whenever AWS_ACCESS_KEY_ID is set. The new OIDC credentials step exports AWS_ACCESS_KEY_ID, so the sccache server started inside make-package pointed at a bucket the rstudio-sccache-github role cannot read and failed startup, breaking every compile. Linux only survived because its sccache server was already running with the workflow's bucket before make-package ran.
…-ci-speedups # Conflicts: # .github/workflows/os-test-e2e-rstudio-desktop-os-fedora-43-x86_64.yml # .github/workflows/os-test-e2e-rstudio-desktop-os-fedora-44-x86_64.yml # .github/workflows/os-test-e2e-rstudio-desktop-os-ubuntu-26-amd64.yml # .github/workflows/os-test-e2e-rstudio-scheduled.yml
This was referenced Jul 25, 2026
This was referenced Oct 29, 2026
kevinushey
added a commit
that referenced
this pull request
Nov 2, 2026
* move daily e2e sccache from s3 to the actions cache 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 * move every e2e engine's sccache to the actions cache 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows e2e PR runs currently take ~100 minutes wall time (~56-63 min build + ~40 min tests, serial). Step-level timing of recent runs shows almost all of it is build-job overhead rather than the tests, with two structural problems and several fixed costs:
CPack: Create package) on a throwaway 99.9.9 installer that is consumed exactly once by the e2e job in the same run.Changes
AWS_SCCACHE_ROLE_ARNsecret +AWS_SCCACHE_BUCKETrepo variable, assumed via OIDC): no quota, no ref scoping, so PR and main runs share one cache. Per-platform key prefixes (win64,macos-arm64,ubuntu24-x86_64, ...); the two Ubuntu 24 builds share a prefix deliberately (same toolchain, overwhelmingly the same sources). Falls back to the GHA backend whenever the secret/variable are unset (fork PRs) or the credential exchange fails, preserving today's behavior. Backend selection must precede thesccache-actionstep, which only exports the Actions cache token whenSCCACHE_GHA_ENABLEDis already set.CPACK_NSIS_COMPRESSOR=zlibfor CI Windows builds, passed through a newRSTUDIO_CMAKE_EXTRA_ARGSenv hook inmake-package.bat(official builds are unaffected).: tried and reverted -- the verification run showed the same 209 non-cacheable compiles with it applied, so /Zi was never the blocker (the seed's 98% hit rate already implied /Zi caches fine). The 209 non-cacheable compiles remain unexplained (deterministic across runs); worth a separate look but orthogonal to this PR./Z7instead of/Zistartup_failurenever runs any job that could report itself, and the Windows seed startup-failed silently on two consecutive weekends (July 6 and 13).Infrastructure (provisioned)
Private bucket
rstudio-sccache(us-east-1, 30-day expiry, public access blocked) and IAM rolerstudio-sccache-github(GitHub OIDC,subscoped torepo:rstudio/rstudio:*, 2 h max session) in the rstudio-ide account;AWS_SCCACHE_ROLE_ARNsecret andAWS_SCCACHE_BUCKETvariable are set on this repo.Verification
All on branch dispatches of the Windows workflow:
rstudio-sccache/win64/; the free-space-gated cleanup wait passed with no stall.actionlintconfirmed byte-identical finding sets againstmain(nothing introduced) across all touched files. The sentinel's seed-failure alerting is validated by lint/YAML only (exercising it requires a failing seed run).