Skip to content

fix(playwright): sync from cdn.playwright.dev instead of deprecated azureedge#1099

Merged
fengmk2 merged 1 commit into
masterfrom
fix/playwright-cdn-download-host
Jul 2, 2026
Merged

fix(playwright): sync from cdn.playwright.dev instead of deprecated azureedge#1099
fengmk2 merged 1 commit into
masterfrom
fix/playwright-cdn-download-host

Conversation

@elrrrrrrr

Copy link
Copy Markdown
Member

问题

playwright >= 1.58 的 chromium 从镜像下载会 404:binaries/playwright/builds/cft/{browserVersion}/... 目录为空,从未被同步落盘。

根因

PlaywrightBinary 的上游 DOWNLOAD_HOST 用的是已废弃的 playwright.azureedge.net。实测(跟随 307 重定向):

上游路径 azureedge cdn.playwright.dev
builds/chromium/1200/...(老,≤1.57) 200 200
builds/cft/145.0.7632.6/mac-arm64/...(新,1.58.1+) 400 200

azureedge 只认老的 builds/*不认 playwright 1.58.1 起启用的 builds/cft/* 新命名空间。所以同步 worker 抓 CFT 产物时拿到 400,chromium 二进制永远进不了镜像。

补充确认:playwright 从 1.58 起不再发布老结构 builds/chromium/{rev}cdn.playwright.dev/builds/chromium/1208 也 404),1.58+ 的 chromium 只存在于 CFT 路径,没有旧目录可回退——所以必须把 CFT 同步跑通。

改动

DOWNLOAD_HOSThttps://playwright.azureedge.net/ 换成 https://cdn.playwright.dev/,并同步更新测试断言。

已验证 cdn.playwright.dev 对 driver / firefox / webkit / ffmpeg / 老 chromium / 新 cft chromium 全部 200,是 azureedge 的安全超集,不影响已有同步。

合并后需触发一次 playwright binary 重新同步,builds/cft/ 产物才会落盘。

配套修复:cnpm/binary-mirror-config#71(把 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 从错误的 chrome-for-testing 指向移除,修复 ≤1.57 的回归)。

🤖 Generated with Claude Code

…zureedge

`playwright.azureedge.net` is deprecated and returns HTTP 400 for the new
`builds/cft/*` namespace that playwright 1.58.1+ uses for chromium. As a
result the CFT chromium binaries never get mirrored and users on
playwright >= 1.58 get 404 from `binaries/playwright/builds/cft/...`.

`cdn.playwright.dev` serves both the legacy `builds/*` paths and the new
`builds/cft/*` paths (verified 200 for driver / firefox / webkit / ffmpeg /
old chromium / cft chromium), so it is a safe superset. Switch DOWNLOAD_HOST
and update the test assertions accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 11:49
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac68f900-155c-4b13-86d7-75bbb281d10f

📥 Commits

Reviewing files that changed from the base of the PR and between ddef97e and b48bc97.

📒 Files selected for processing (2)
  • app/common/adapter/binary/PlaywrightBinary.ts
  • test/common/adapter/binary/PlaywrightBinary.test.ts
👮 Files not reviewed due to content moderation or server errors (2)
  • test/common/adapter/binary/PlaywrightBinary.test.ts
  • app/common/adapter/binary/PlaywrightBinary.ts

📝 Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/playwright-cdn-download-host

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Playwright binary download host from the deprecated playwright.azureedge.net to cdn.playwright.dev in both the implementation and associated tests. This change resolves issues with the new builds/cft/* namespace returning 400 errors. I have no feedback to provide as the changes are correct and well-tested.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Playwright binary mirroring for Playwright >= 1.58 by switching the upstream download host from the deprecated playwright.azureedge.net to cdn.playwright.dev, which serves both legacy builds/* artifacts and the newer builds/cft/* Chromium namespace required by modern Playwright releases.

Changes:

  • Update PlaywrightBinary DOWNLOAD_HOST to https://cdn.playwright.dev/ (supports both legacy and CFT paths).
  • Update test assertions to expect cdn.playwright.dev URLs for CFT, driver, and legacy Chromium paths.
  • Refresh inline comments/examples to reflect the new host.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/common/adapter/binary/PlaywrightBinary.ts Switches Playwright upstream download host to cdn.playwright.dev and updates related inline documentation.
test/common/adapter/binary/PlaywrightBinary.test.ts Updates URL assertions to match the new download host across CFT + legacy paths.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.22%. Comparing base (76507a5) to head (b48bc97).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1099      +/-   ##
==========================================
- Coverage   94.33%   94.22%   -0.12%     
==========================================
  Files         211      213       +2     
  Lines        8684     8933     +249     
  Branches     1697     1765      +68     
==========================================
+ Hits         8192     8417     +225     
- Misses        492      516      +24     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fengmk2 fengmk2 merged commit 13b8f4e into master Jul 2, 2026
17 of 18 checks passed
@fengmk2 fengmk2 deleted the fix/playwright-cdn-download-host branch July 2, 2026 12:01
fengmk2 pushed a commit that referenced this pull request Jul 2, 2026
[skip ci]

## <small>4.34.1 (2026-07-02)</small>

* fix(playwright): sync from cdn.playwright.dev instead of deprecated azureedge (#1099) ([13b8f4e](13b8f4e)), closes [#1099](#1099)
* docs: add snapshot npm regression guide (#1096) ([ddef97e](ddef97e)), closes [#1096](#1096)
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.34.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants