Skip to content

consolidate linux desktop e2e workflows into one parameterized workflow - #18360

Merged
kevinushey merged 4 commits into
mainfrom
developer/consolidate-linux-e2e-workflows
Jul 28, 2026
Merged

kevinushey merged 4 commits into
mainfrom
developer/consolidate-linux-e2e-workflows

Conversation

@kevinushey

@kevinushey kevinushey commented Jul 25, 2026 •

Copy link
Copy Markdown
Collaborator

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 os input. Net: -6,444 / +1,691 lines.

New structure:

  • .github/workflows/os-test-e2e-rstudio-desktop-linux.yml -- the one workflow. A small setup job loads the engine config and republishes it as job outputs, which parameterize runs-on, container.image/options, timeouts, cache keys, DEB vs RPM, and the daily-manifest key. An empty image runs 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:

  • PR orchestrator: linux-desktop now calls the consolidated workflow with os: ubuntu-24-x86_64 (plus paths: filter updates).
  • Scheduled rotation: the eight copy-pasted Linux job blocks become one dynamic-matrix job; pick emits a filtered linux_matrix, and each entry's installer URL is looked up via needs.resolve.outputs[matrix.url_key]. Slates/crons unchanged.
  • The ubuntu-24 scheduled wrapper and cache seed point at the new workflow. The seed's filename, cache keys, and the sentinel's key prefixes are 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:

  1. sccache: every engine now uses the S3-with-GHA-fallback backend. Ubuntu 22 and Rocky 9 were still GHA-only (they predate the S3 migration) and now also receive the AWS_SCCACHE_ROLE_ARN secret from callers.
  2. GWT cache saves are gated to main-scoped runs everywhere. Fedora alone still saved from PR-scoped runs -- the same quota pressure speed up e2e ci builds #18337 eliminated.
  3. The Fedora-only daily-installer cache step is dropped (SHA-256 verification is unchanged; the sibling engines' comments argued the cache was net-negative quota pressure).
  4. Artifact names are engine-suffixed everywhere. This fixes a real bug: in Sunday all-engines runs, ubuntu-24's merge glob 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.

  • Every engine name now ends in its arch (ubuntu-24-x86_64, rocky-10-arm64), and pretty_name matches. Beyond readability this removes a prefix hazard: the merge job globs playwright-blob-report-linux-desktop-<os>-*, so a bare ubuntu-24 would have swept up ubuntu-24-arm64's blobs. Renaming the config files leaves every cache key untouched (they live inside the files), so continuity holds.
  • An arch input on both workflow_dispatch and workflow_call is cross-checked against the config's tools_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.
  • All four callers now state the arch they expect; the scheduled rotation's engine table carries a per-entry arch.
  • New ubuntu-24-arm64 engine, so Ubuntu 24 can be run on both arches. It's the bare-runner shape on ubuntu-24.04-arm, and it shares the arm64 tools/rlibs/GWT cache keys with debian-13-arm64, which already builds bare on that same host with install-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

  • actionlint is clean on all changed workflows (remaining shellcheck notes are the same style classes the untouched macOS/Windows/Server workflows carry).
  • All nine configs share an identical key schema, matching the setup job's outputs 1:1; each filename's arch agrees with its tools_arch and pretty_name; no engine name is a prefix of another; no two engines of different arch share sccache_key_prefix, installer_artifact, pw_label, or e2e_deps_cache_scope (an empty scope means runner.os alone, so arm64 engines must set it); every caller os/arch pair resolves to a config that agrees; hook scripts pass bash -n; the pick matrix mapping was tested locally including the empty-selection case.
  • The setup job enforces the contract the rest of the workflow leans on, and each guard was exercised against a synthetic bad config: engine name must end in -<tools_arch> (the blob-report glob is only collision-free while no engine name prefixes another), arch must be non-empty (required: true alone 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 as key=value job outputs, so a newline could forge output keys).
  • Four runner behaviors want a live confirmation before merge, via workflow_dispatch of the new workflow from this branch (ubuntu-24-x86_64, one container engine, and rocky-10-arm64 would cover the first three):
    1. empty container.image running 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 from setup and use container: ${{ fromJSON(...) }} with null for bare engines.
    2. timeout-minutes from a needs output.
    3. name: ${{ matrix.name }} on uses: jobs.
    4. needs.resolve.outputs[matrix.url_key] in the scheduled rotation -- indexing a needs output 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 a workflow_dispatch with version exercises 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.

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.
@kevinushey kevinushey added this to the 2026.08 (Yellow Yarrow) milestone Jul 25, 2026
@posit-snyk-bot

posit-snyk-bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

RStudio E2E - all platforms

1 test(s) failed

###################- 99% pass rate

Passed Failed Skipped Flaky
250 1 34 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
❌ desktop-linux 248 1 34 1
✅ setup 2 0 0 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 c8423c11d8a0bb7980d569b10ca558fc3483033f - Run #350

@kevinushey
kevinushey merged commit aab0d6a into main Jul 28, 2026
26 of 27 checks passed
@kevinushey
kevinushey deleted the developer/consolidate-linux-e2e-workflows branch July 28, 2026 22:41
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.
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.

2 participants