Repository navigation
consolidate linux desktop e2e workflows into one parameterized workflow - #18360
Merged
Merged
Conversation
Replace the eight per-OS Linux Desktop E2E workflows (ubuntu 22/24/26, debian 13, fedora 43/44, rocky 9/10) with a single reusable workflow, os-test-e2e-rstudio-desktop-linux.yml, parameterized by an 'os' input. Per-engine knobs (runner, container image/options, DEB/RPM, cache keys, daily-manifest key, labels) live in .github/e2e-linux/<os>.json, and distro-specific steps (runtime packages, repo enablement, sysctls, locale, R install quirks) live as small shell hooks under .github/e2e-linux/<script_dir>/. See .github/e2e-linux/README.md. Callers updated: the PR orchestrator, the ubuntu-24 scheduled wrapper and cache seed, and the scheduled rotation, whose eight copy-pasted Linux job blocks become one dynamic-matrix job driven by the pick job's selection. Deliberate behavior changes (previously drifted between the copies): - every engine now uses the S3-with-GHA-fallback sccache backend (ubuntu 22 and rocky 9 were still GHA-only) - GWT cache saves are gated to main-scoped runs everywhere (fedora also saved from PR-scoped runs) - the fedora-only daily-installer cache step is dropped - blob/report artifact names are engine-suffixed everywhere, so overlapping download globs in a combined all-engines run can no longer sweep another engine's shards into a merge Net: about 4,750 lines removed.
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. |
RStudio E2E - all platforms1 test(s) failed
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 |
kevinushey
added a commit
that referenced
this pull request
Jul 29, 2026
* treat an empty PW_RSTUDIO_R_LIBS_USER as unset The consolidated Linux e2e workflow (#18360) sets PW_RSTUDIO_R_LIBS_USER: ${{ ... == 'true' && format(...) || '' }} intending the empty branch to mean "use the harness default". A GitHub Actions env: value of '' is exported as a defined empty string, so rLibsUserTemplate()'s `??` took it as an explicit override and the R_LIBS_USER template became "". R treats an empty R_LIBS_USER as unset and computes its HOME-relative default, so globalSetup installed REQUIRED_PACKAGES under the real HOME while the session under test -- whose HOME the desktop fixture redirects into the per-run sandbox -- resolved a different, empty library. That is the exact hazard this file's header comment describes. citations.test.ts "inserts an R Package citation" then failed both attempts on every affected engine (the five with preinstall_r_packages empty: ubuntu-22/24-x86_64/24-arm64/26, debian-13): the panel searches the session's installed packages, finds no knitr, and reports "No matching packages". Use || so an empty override falls back, and name the source of the resolved library in the prep log so a future mismatch is visible in the job output rather than only as a missing package. * address review: CRLF manifest parsing, base::: expander, provenance logging Follow-ups from the review on #18390, all in the file this PR already touches: - required-packages.txt was split on '\n' only, so a Windows checkout (core.autocrlf=true on the GHA runners) left a trailing '\r' on every line. '\r' is a line terminator for JS regex, so in /#.*$/ the '.' cannot cross it and '$' anchors past it -- no comment was ever stripped, and all six header lines were passed to install.packages() as package names. Every Windows shard has been printing "[r-libs] WARNING: failed to install: # R packages pre-installed ..." as a result, which made the one signal that would reveal a genuinely missing package permanent noise. - .expand_R_libs_env_var lives in base, not tools, and ':::' does not inherit, so tools:::.expand_R_libs_env_var errored on every call and the reduced gsub fallback ran unconditionally. It happens to agree with R for the %p / %v templates we actually use, so nothing was mis-expanded, but the documented path never executed and %U / %S / %%-escaping would have been wrong. The fallback now marks itself so a future regression is visible in the prep log. - The template and its provenance are logged before prepareRLibs()'s early returns, so a skip-prep run -- the configuration most likely to be pointed at the wrong library -- is no longer diagnostic-free. - The module header and the README entry for PW_RSTUDIO_R_LIBS_USER now state that an empty value is treated as unset. * preinstall required R packages on every linux e2e engine The five engines with PPM binary coverage (ubuntu-22/24/26 x86_64, ubuntu-24 arm64, debian-13 arm64) left preinstall_r_packages empty, so globalSetup installed the 23-package REQUIRED_PACKAGES set into the harness-default library (~/.cache/rstudio-playwright) -- which is not in any workflow cache -- on every single run. Flipping the flag routes the install through os-e2e-deps into the job-level R-libs tree, which is cached (keyed on the manifest via -req<hash>), and points globalSetup at it via PW_RSTUDIO_R_LIBS_USER, so a warm run installs nothing. ubuntu-24-x86_64 and ubuntu-26-x86_64 also get explicit cache scopes (noble-amd64 / resolute-amd64): both used the legacy empty scope, i.e. one shared "Linux" key. Tolerable while the cache held only pak's DESCRIPTION deps, but with the full compiled package set in the tree, noble and resolute sharing a library is an ABI hazard -- whichever engine saved first on main would hand its binaries to the other, and the presence check would see them as installed. The new scopes start those two caches cold; they warm on the next main-scoped run. No heartbeat change: fedora/rocky raise it because a cache miss can source-compile at test time, but these engines install binaries in the deps step, outside the watchdog's scope.
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.
What
Replaces the eight per-OS Linux Desktop E2E workflows (Ubuntu 22/24/26, Debian 13, Fedora 43/44, Rocky 9/10 -- ~6,200 lines, ~94% copy-paste within a distro family) with a single reusable workflow parameterized by an
osinput. Net: -6,444 / +1,691 lines.New structure:
.github/workflows/os-test-e2e-rstudio-desktop-linux.yml-- the one workflow. A smallsetupjob loads the engine config and republishes it as job outputs, which parameterizeruns-on,container.image/options, timeouts, cache keys, DEB vs RPM, and the daily-manifest key. An emptyimageruns the job bare on the runner, which is how the Ubuntu engines coexist with the container engines..github/e2e-linux/<distro>-<ver>-<arch>.json-- per-engine scalar knobs (~35 lines each). Every engine name ends in its architecture, so the arch is visible in the dispatch picker, job names, artifact names, and the PW project label. Adding an engine is now "copy the closest config, adjust" -- see.github/e2e-linux/README.md..github/e2e-linux/<dir>/*.sh-- the genuinely distro-specific steps as hooks: Chromium runtime package lists, EPEL/CRB enablement, the jammy pkgconf/Java-17 quirks, Fedora's dnf R install, Debian's PPM codename rewrite, locale exports. Fedora 43/44 share a dir, as do Ubuntu 24/26. The Xvfb-vs-Cage and root-vs-setpriv variants collapsed into one run script driven by two config flags.Callers updated:
linux-desktopnow calls the consolidated workflow withos: ubuntu-24-x86_64(pluspaths:filter updates).pickemits a filteredlinux_matrix, and each entry's installer URL is looked up vianeeds.resolve.outputs[matrix.url_key]. Slates/crons unchanged.Cache keys, PW project labels, and SHARD_NAMEs are preserved verbatim per engine (dashboard/cache continuity); the ubuntu-24 tools/rlibs keys stay shared with the Linux Server build.
Deliberate behavior changes
These were points where the eight copies had silently drifted, each with its own justifying comment; the consolidation picks one policy:
AWS_SCCACHE_ROLE_ARNsecret from callers.playwright-blob-report-linux-desktop-*(and fedora-44's...-fedora-*) matched other engines' blob artifacts, so those merged reports could silently include foreign results.Architecture
Raised in review: architecture is an attribute of each engine rather than a second selection axis, since every config is single-arch.
ubuntu-24-x86_64,rocky-10-arm64), andpretty_namematches. Beyond readability this removes a prefix hazard: the merge job globsplaywright-blob-report-linux-desktop-<os>-*, so a bareubuntu-24would have swept upubuntu-24-arm64's blobs. Renaming the config files leaves every cache key untouched (they live inside the files), so continuity holds.archinput on bothworkflow_dispatchandworkflow_callis cross-checked against the config'stools_arch, failing the run on a mismatch. It's an assertion, not a selector --auto(the dispatch default) accepts whatever the config declares. This catches an engine being re-pointed at a different runner without its arch-bearing cache keys, installer artifact, and daily platform key following.arch.ubuntu-24-arm64engine, so Ubuntu 24 can be run on both arches. It's the bare-runner shape onubuntu-24.04-arm, and it shares the arm64 tools/rlibs/GWT cache keys withdebian-13-arm64, which already builds bare on that same host withinstall-dependencies-noble-- so it starts warm. Dispatch-only for now (not in the scheduled rotation), so it costs no nightly runner time until it's proven.Validation
actionlintis clean on all changed workflows (remaining shellcheck notes are the same style classes the untouched macOS/Windows/Server workflows carry).tools_archandpretty_name; no engine name is a prefix of another; no two engines of different arch sharesccache_key_prefix,installer_artifact,pw_label, ore2e_deps_cache_scope(an empty scope meansrunner.osalone, so arm64 engines must set it); every calleros/archpair resolves to a config that agrees; hook scripts passbash -n; thepickmatrix mapping was tested locally including the empty-selection case.-<tools_arch>(the blob-report glob is only collision-free while no engine name prefixes another),archmust be non-empty (required: truealone only rejects an absent key, not an expression that resolved to nothing), and every config value must be a single-line string (they are republished askey=valuejob outputs, so a newline could forge output keys).workflow_dispatchof the new workflow from this branch (ubuntu-24-x86_64, one container engine, and rocky-10-arm64 would cover the first three):container.imagerunning bare -- the highest-consequence one, since all four bare engines (including the PR-gating ubuntu-24 run) depend on it. If GitHub rejects it, the fallback is to emit the whole container mapping as JSON fromsetupand usecontainer: ${{ fromJSON(...) }}withnullfor bare engines.timeout-minutesfrom aneedsoutput.name: ${{ matrix.name }}onuses:jobs.needs.resolve.outputs[matrix.url_key]in the scheduled rotation -- indexing aneedsoutput by a matrix value. This one fails silently: an unsupported index yields an empty URL, which means "self-resolve the latest daily", so a version-pinned dispatch would test the wrong build behind a green check. Only aworkflow_dispatchwithversionexercises it (both crons leave it empty).macOS, Windows, Linux Server, and the cache-seed files are deliberately untouched; they're natural follow-ups once this pattern is settled.