Skip to content

Commit f9939fc

Browse files
authored
improvement(ci): avoid redundant browser dependency updates (#9680)
* improvement(ci): avoid redundant browser dependency updates * fix(ci): retain historical benchmark provisioning and docs triggers
1 parent 3d5b37f commit f9939fc

4 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎.github/CI.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Memory-heavy builds and browser jobs retain appropriately sized Blacksmith runne
3838

3939
WebKit acceptance on Blacksmith uses the matching, digest-pinned Playwright browser image for mobile and docs navigation. The app, database fixtures, native modules, and harness stay on the host and retain loopback URLs. Chromium and GitHub fallback keep native browser installation and launch. Update both workspace Playwright dependencies, the image index digest, and the expected client version/revision checks together; verify the installed release's native launch timeout and real WebKit acceptance before changing the pin.
4040

41+
HTTP and docs browser installation first asks the pinned Playwright driver to simulate its OS dependency installation. When the simulation requires no package changes, the runner avoids an apt update; missing dependencies, proposed upgrades, or an unsuccessful simulation use the normal dependency installer. Browser selection and downloads still use the pinned driver, including full native Chromium for extension acceptance.
42+
4143
Every HTTP and browser group consumes the same production build in an isolated job/database. Electron also uses that build and skips its development-route warm-up. Local HTTP and Electron development runs retain their dev-server behavior. Build inputs exclude test-only files so a harness edit can reuse an unchanged production build.
4244

4345
Desktop inbox protocol, assistant actions UI, and organization search UI run as three parallel HTTP jobs with isolated databases, apps, and reports. Each harness owns its acceptance task, so an edit selects its own job. The inbox protocol task depends on server and realtime code; the browser tasks also depend on workspace UI. Desktop inbox needs no browser. The UI jobs and browser extension install Chromium while their app starts, waiting for both before executing assertions; browser-install failures still fail the job and preserve the install log. No acceptance assertions are removed by the split.

‎.github/scripts/http-e2e.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ start_browser_install() {
7575
local name=$1
7676
shift
7777
browsers_log="$report_dir/$name-playwright-install.log"
78-
setsid --wait bunx --no-install playwright install --with-deps "$@" > "$browsers_log" 2>&1 &
78+
setsid --wait bash "$GITHUB_WORKSPACE/.github/scripts/install-playwright.sh" "$@" > "$browsers_log" 2>&1 &
7979
browsers_pid=$!
8080
}
8181

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# The dependency dry run uses the pinned driver's package list without updating apt.
3+
set -euo pipefail
4+
5+
browsers=()
6+
for argument in "$@"; do
7+
case "$argument" in
8+
--only-shell|--no-shell) ;;
9+
*) browsers+=("$argument") ;;
10+
esac
11+
done
12+
13+
if ! bunx --no-install playwright install-deps --dry-run "${browsers[@]}"; then
14+
bunx --no-install playwright install-deps "${browsers[@]}"
15+
fi
16+
exec bunx --no-install playwright install "$@"

‎.github/workflows/docs-negotiation.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
- '.github/actions/setup/**'
2121
- '.github/scripts/stop-session.sh'
2222
- '.github/scripts/playwright-server.sh'
23+
- '.github/scripts/install-playwright.sh'
2324
push:
2425
branches: [staging]
2526
paths:
@@ -40,6 +41,7 @@ on:
4041
- '.github/actions/setup/**'
4142
- '.github/scripts/stop-session.sh'
4243
- '.github/scripts/playwright-server.sh'
44+
- '.github/scripts/install-playwright.sh'
4345
workflow_dispatch:
4446
inputs:
4547
benchmark:
@@ -375,7 +377,7 @@ jobs:
375377
if: matrix.group == 'chromium' || (matrix.group == 'webkit' && vars.CI_PROVIDER != '' && vars.CI_PROVIDER != 'blacksmith')
376378
env:
377379
BROWSER: ${{ matrix.group }}
378-
run: bunx --no-install playwright install --with-deps --only-shell "$BROWSER"
380+
run: bash .github/scripts/install-playwright.sh --only-shell "$BROWSER"
379381
- name: Verify production documentation
380382
id: acceptance
381383
env:

0 commit comments

Comments
 (0)