Repository navigation
Open
Labels
Description
Background
Getting the e2e suite's R packages installed where the session can see them is currently spread across several runner-specific mechanisms:
- The package list itself is single-sourced (
e2e/rstudio/required-packages.txt) and the installer is one shared action (os-e2e-deps), but every workflow must hand-wire a pair of settings that only work together:install-required-packageson the action, andPW_RSTUDIO_R_LIBS_USERpointing globalSetup at the same library the action populated. Configuring one without the other silently degrades to a thinner library plus test-time CRAN installs -- the failure class behind both treat an empty PW_RSTUDIO_R_LIBS_USER as unset #18390 (env var set but effectively empty on Linux) and the desktop-windows CRAN-outage hangs diagnosed in the pr-18449 all-platforms run (env var set but flag missing; fixed by PR e2e: pre-install required R packages on the windows and macos runners #18487). - The Linux Server workflow has a third mechanism: a hand-curated package list seeded into a root-owned system library, with a caveat comment warning that uninstall-test subjects must never be added to it.
- Repo selection exists twice: PPM in the action's bash, cran.r-project.org in
r-libs-setup.tsfor non-Linux.
Plan
- Make
os-e2e-depsown the whole contract. Defaultinstall-required-packagesto"true"and have the action exportPW_RSTUDIO_R_LIBS_USER(pointing at itsr-libs-userinput) toGITHUB_ENVitself, skipping the export when the caller already defines the variable or opts out of the install. The action already exportsPLAYWRIGHT_BROWSERS_PATHthe same way. Callers then can't half-configure the pairing, and the per-workflow env/flag wiring (Windows x2, macOS x3, the Linux test-step expression) gets deleted. - Server: provision the per-run test user's library instead of the system library. After
os-e2e-depspopulates the workspaceR-libstree, copy it into the test user's default user library (~/R/%p-library/%v) andchownit. R picks that path up with no env plumbing (nothing has to survive rserver's per-session environment rebuild, E2E sandbox AI credentials do not reach an RStudio Server session #18348), sessions get every package read-write, and uninstall-flow tests work on anything. The root-owned system-library seed and its separate curated list are then retired. Notes: the DBI uninstall test (s4_unloaded_package) is@desktop_onlyso it never ran on server anyway;fortunes(themissing_packages_bannersubject) stays absent from every manifest;readris genuinely used (import_dataset.test.ts) and moves intorequired-packages.txt;tidyverseis referenced by no test and is dropped. - Keep what encodes real differences: the macOS
cache-scopekeys (ABI boundaries) and the Linux per-enginepreinstall_r_packagesescape hatch (passing an empty value still opts out).
Out of scope
packageRepo() in r-libs-setup.ts and the per-test ensurePackageInstalled self-heal path still point at cran.r-project.org; with the library pre-populated everywhere these reduce to presence checks, so repointing them at PPM can be considered separately.
Activity
e2e: consolidate R package provisioning in the os-e2e-deps action - #…