Repository navigation
e2e: pre-install required R packages on the windows and macos runners - #18487
Merged
Merged
Conversation
The Windows and macOS e2e workflows never passed install-required-packages to the os-e2e-deps action, so the harness's REQUIRED_PACKAGES set (DBI, shinytest2, rmarkdown, ...) was installed from cran.r-project.org at test time on every run: by globalSetup when it could, and by per-test ensurePackages self-healing when it could not. During a CRAN outage those installs hang mid-suite (s4_unloaded_package, shinytest2 in the pr-18449 all-platforms run) instead of failing fast. Pass install-required-packages to the deps action on every desktop engine, matching Linux (PR #18390), so the set is installed from PPM into the cached R library before tests and a warm cache installs nothing at all. The macOS workflows and the scheduled Windows autocomplete workflow also gain the PW_RSTUDIO_R_LIBS_USER wiring that points globalSetup at that same library (the main Windows workflow already had it). The Linux Server workflow deliberately keeps its own system-library seed: its sessions run as a per-run user, and tests that exercise uninstall flows (fortunes, DBI) cannot remove packages from a root-owned library.
This was referenced Aug 8, 2026
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 |
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.
Problem
In the pr-18449 all-platforms e2e run, all three unexpected failures were desktop-windows tests hung in mid-suite package installs:
s4_unloaded_package.test.tsstuck on.rs.ensurePackageInstalled("DBI", repos = "https://cran.r-project.org")withand
shinytest2.test.tsstuck oninstall.packages("shinytest2", ...)with no output, both until the test timeout.The root cause is that the Windows and macOS e2e workflows never pass
install-required-packagesto theos-e2e-depsaction, so the cached R library contains only the harness's DESCRIPTION dependencies. Therequired-packages.txtset (which already includes DBI and shinytest2) is instead installed from cran.r-project.org at test time on every run -- by globalSetup when CRAN is reachable, and by per-testensurePackagesself-healing when it is not. A CRAN outage therefore surfaces as mid-suite hangs rather than a fast, clearly-attributed setup failure.Linux already works the way we want: PR #18390 flipped
preinstall_r_packageson for every Linux engine, installing the set from PPM into the cached library before tests run.Change
install-required-packages: "true"toos-e2e-depsin the Windows main workflow, the scheduled Windows autocomplete workflow, and all three macOS workflows, matching the Linux engines. The set installs from PPM (not cran.r-project.org) in the deps step, lands in the cachedR-libstree, and a warm cache installs nothing at all. A cold-cache install failure now fails the "Install e2e test dependencies" step instead of hanging tests.PW_RSTUDIO_R_LIBS_USERwiring (pointing globalSetup at that same library) to the macOS and autocomplete workflows; the main Windows workflow already had it. Without it, globalSetup provisions the harness-default per-host path, which is a different, uncached directory on these ephemeral runners.os-e2e-deps/action.yml,required-packages.txt, andr-libs-setup.tsthat described the required-set install as Fedora-only.The Linux Server workflow is deliberately unchanged: it seeds a root-owned system library with its own curated list, because its sessions run as a per-run user and tests that exercise uninstall flows (fortunes, DBI) cannot remove packages from a root-owned library.
Notes
-req<hash>suffix when the flag is set;restore-keysstill prefix-matches the old caches, so the first runs restore the existing library and top up the missing packages. The scheduled main-branch runs then save the complete library under the new key.ensurePackages/ensurePackageInstalledcalls still exist as a self-heal path, and they still point at cran.r-project.org; with the library pre-populated they reduce to presence checks. Repointing them at PPM would be a possible follow-up but is not needed for this fix.Verification
actionlintreports only pre-existing shellcheck style notes (identical count onmain).e2e/rstudiosource changes are comment-only.