From 59e4e3a13dc0d5f4eaab360d131318461ec6fcf3 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Tue, 2 Jun 2026 22:41:22 -0700 Subject: [PATCH 1/5] ci(browser-test): cache Playwright browsers + retry install Cache Playwright browser binaries between runs, keyed on the browser-test lockfile so a resolved Playwright version bump invalidates the cache. Wrap the browser install in a 3-attempt retry to ride out transient Chromium-CDN download timeouts after a version bump. --- .github/workflows/browser-test.yml | 33 ++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index 24717f28ae..d72d5f89f6 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -50,9 +50,38 @@ jobs: - name: Install browser test dependencies working-directory: browser-test run: npm ci --ignore-scripts + # Cache Playwright's browser binaries between runs. The cache key + # is keyed on `browser-test/package-lock.json`, which moves when + # the resolved `@playwright/test` version changes, so a Playwright + # version bump invalidates the cache on the commit that lands it. + # + # The install step below runs unconditionally rather than guarded + # by `cache-hit`: `--with-deps` also installs apt system packages, + # which the cache does not cover, and the browser-binary download + # itself is a no-op on cache hit. Keeping the step unconditional + # avoids a second always-run apt step and keeps the workflow + # readable. + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ hashFiles('browser-test/package-lock.json') }} + restore-keys: | + playwright-${{ runner.os }}- + # Wrap the install in a retry: the recurring failure mode is a + # timeout downloading Chromium from the Playwright CDN shortly + # after a Chromium version bump, before the CDN has seeded the + # new binary widely. Three attempts with a 10-minute per-attempt + # ceiling matches the pattern used in + # `.github/workflows/ocapn-guile-interop.yml` for transient + # network failures. - name: Install Playwright Browsers - working-directory: browser-test - run: npx playwright install --with-deps + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd browser-test && npx playwright install --with-deps - name: Run Playwright tests working-directory: browser-test run: npx playwright test From 511c9e0a9498ca02e6e98201a1ce57757b9cb44f Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Wed, 3 Jun 2026 13:55:05 -0700 Subject: [PATCH 2/5] ci(browser-test): bump job timeout to 60m + retry per-attempt to 15m --- .github/workflows/browser-test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index d72d5f89f6..f0e6d014d1 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -17,7 +17,7 @@ concurrency: jobs: browser-tests: - timeout-minutes: 30 + timeout-minutes: 60 runs-on: ubuntu-latest # This Chrome nightly image can no longer install browsers in Github CI for # lack of some system dependencies: @@ -72,14 +72,17 @@ jobs: # Wrap the install in a retry: the recurring failure mode is a # timeout downloading Chromium from the Playwright CDN shortly # after a Chromium version bump, before the CDN has seeded the - # new binary widely. Three attempts with a 10-minute per-attempt - # ceiling matches the pattern used in - # `.github/workflows/ocapn-guile-interop.yml` for transient - # network failures. + # new binary widely. Three attempts with a 15-minute per-attempt + # ceiling: a cold-cache install (browser-binary download plus + # the `--with-deps` apt step) can take 8+ minutes on a slow CDN, + # so 10 minutes was too tight to absorb a single slow run. Worst + # case 3 x 15 = 45 minutes fits inside the job's 60-minute + # `timeout-minutes`, leaving headroom for setup, build, and the + # tests themselves. - name: Install Playwright Browsers uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 with: - timeout_minutes: 10 + timeout_minutes: 15 max_attempts: 3 command: cd browser-test && npx playwright install --with-deps - name: Run Playwright tests From 8516443994cec272f783cd83a00b75e1b4a2fc7d Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Wed, 3 Jun 2026 17:37:18 -0700 Subject: [PATCH 3/5] ci(browser-test): pin Playwright to 1.58.2 for reliable install --- browser-test/package-lock.json | 24 ++++++++++++------------ browser-test/package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/browser-test/package-lock.json b/browser-test/package-lock.json index 0e0fb29c54..4b6393802c 100644 --- a/browser-test/package-lock.json +++ b/browser-test/package-lock.json @@ -8,18 +8,18 @@ "name": "browser-test", "license": "Apache-2.0", "devDependencies": { - "@playwright/test": "^1.49.1", + "@playwright/test": "1.58.2", "@types/node": "^20.11.16" } }, "node_modules/@playwright/test": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.1.tgz", - "integrity": "sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz", + "integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.49.1" + "playwright": "1.58.2" }, "bin": { "playwright": "cli.js" @@ -53,13 +53,13 @@ } }, "node_modules/playwright": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", - "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.49.1" + "playwright-core": "1.58.2" }, "bin": { "playwright": "cli.js" @@ -72,9 +72,9 @@ } }, "node_modules/playwright-core": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", - "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/browser-test/package.json b/browser-test/package.json index acecdfe6a5..379af8d679 100644 --- a/browser-test/package.json +++ b/browser-test/package.json @@ -7,7 +7,7 @@ "test": "playwright test" }, "devDependencies": { - "@playwright/test": "^1.49.1", + "@playwright/test": "1.58.2", "@types/node": "^20.11.16" }, "eslintConfig": { From 688784d10119979efb6823462029b9c7e43f4c4b Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Wed, 3 Jun 2026 20:48:06 -0700 Subject: [PATCH 4/5] ci(browser-test): add DEBUG=pw:install + drop vestigial chrome rename --- .github/workflows/browser-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index f0e6d014d1..c34fd03c7e 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -33,8 +33,6 @@ jobs: # env: # HOME: /root # Firefox complains otherwise steps: - - name: Put unstable chrome where playwright would look for it - run: mv /opt/google/chrome /opt/google/chrome-unstable - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -81,6 +79,12 @@ jobs: # tests themselves. - name: Install Playwright Browsers uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 + env: + # Surface the hanging step in the install path. The Chrome-for- + # Testing migration in Playwright >= 1.50 introduced a silent + # post-download hang on this CI; pw:install logs the probe and + # extract steps so the next run shows where the time is going. + DEBUG: pw:install with: timeout_minutes: 15 max_attempts: 3 From 7eec2e64c039f73321e922dbf8e82cd201835f18 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Wed, 3 Jun 2026 21:42:18 -0700 Subject: [PATCH 5/5] ci(browser-test): extend retry per-attempt timeout to observe real Playwright install time --- .github/workflows/browser-test.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index c34fd03c7e..76c7545c1b 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -17,7 +17,7 @@ concurrency: jobs: browser-tests: - timeout-minutes: 60 + timeout-minutes: 120 runs-on: ubuntu-latest # This Chrome nightly image can no longer install browsers in Github CI for # lack of some system dependencies: @@ -70,13 +70,17 @@ jobs: # Wrap the install in a retry: the recurring failure mode is a # timeout downloading Chromium from the Playwright CDN shortly # after a Chromium version bump, before the CDN has seeded the - # new binary widely. Three attempts with a 15-minute per-attempt - # ceiling: a cold-cache install (browser-binary download plus - # the `--with-deps` apt step) can take 8+ minutes on a slow CDN, - # so 10 minutes was too tight to absorb a single slow run. Worst - # case 3 x 15 = 45 minutes fits inside the job's 60-minute - # `timeout-minutes`, leaving headroom for setup, build, and the - # tests themselves. + # new binary widely. Three attempts with a 30-minute per-attempt + # ceiling: the observed failure mode is an attempt still making + # progress (slow CDN download or apt step) when the prior + # 15-minute ceiling killed it mid-progress and the retry started + # from scratch. The bump to 30 minutes gives one attempt enough + # headroom to complete; the 3-attempt safety net is retained for + # genuine transient failures. Worst case 3 x 30 = 90 minutes fits + # inside the job's 120-minute `timeout-minutes`, leaving headroom + # for setup, build, and the tests themselves. The bumped ceiling + # is provisional: once a real install time is observed, both the + # per-attempt and outer ceilings should come back down. - name: Install Playwright Browsers uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 env: @@ -86,7 +90,7 @@ jobs: # extract steps so the next run shows where the time is going. DEBUG: pw:install with: - timeout_minutes: 15 + timeout_minutes: 30 max_attempts: 3 command: cd browser-test && npx playwright install --with-deps - name: Run Playwright tests