-
Notifications
You must be signed in to change notification settings - Fork 98
feat(mirror): add chromium-headless-shell #748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new binary entry for 'chromium-headless-shell' has been added into the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User/System
participant PB as PlaywrightBinary
participant DP as DOWNLOAD_PATHS
U->>PB: Request download for 'chromium-headless-shell'
PB->>DP: Look up download URL based on platform
DP-->>PB: Return URL
PB->>U: Initiate download using the retrieved URL
Assessment against linked issues
Possibly related PRs
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/common/adapter/binary/PlaywrightBinary.ts (1)
269-284: Enhance error handling and documentation for chromium-headless-shell fallback.The fallback logic for creating chromium-headless-shell from chromium data could be improved:
- Add error logging if chromium is not found
- Document why chromium properties are compatible with headless-shell
Consider this improvement:
// if chromium-headless-shell not exists on browsers, copy chromium to chromium-headless-shell +// Note: chromium-headless-shell uses the same build revision and version as chromium +// as it's derived from the same Chromium codebase if (!browsers.find(browser => browser.name === 'chromium-headless-shell')) { const chromium = browsers.find(browser => browser.name === 'chromium'); - // { - // "name": "chromium", - // "revision": "1155", - // "installByDefault": true, - // "browserVersion": "133.0.6943.16" - // } if (chromium) { browsers.push({ ...chromium, name: 'chromium-headless-shell', }); + } else { + this.logger.warn('[PlaywrightBinary.fetch:warn] Cannot create chromium-headless-shell entry: chromium browser not found'); } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/common/adapter/binary/PlaywrightBinary.ts(2 hunks)test/common/adapter/binary/PlaywrightBinary.test.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: test-postgresql-fs-nfs (22, ubuntu-latest)
- GitHub Check: test-mysql57-fs-nfs (18, ubuntu-latest)
- GitHub Check: test-mysql57-fs-nfs (18.20.0, ubuntu-latest)
🔇 Additional comments (1)
test/common/adapter/binary/PlaywrightBinary.test.ts (1)
54-54: LGTM! Test coverage looks good.The test changes appropriately verify the addition of chromium-headless-shell:
- Updated array length check
- Added assertion for the new browser entry
- Included in the list of names for detailed testing
Also applies to: 62-62, 67-67
| 'chromium-headless-shell': { | ||
| '<unknown>': undefined, | ||
| 'ubuntu18.04-x64': undefined, | ||
| 'ubuntu20.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip', | ||
| 'ubuntu22.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip', | ||
| 'ubuntu24.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip', | ||
| 'ubuntu18.04-arm64': undefined, | ||
| 'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip', | ||
| 'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip', | ||
| 'ubuntu24.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip', | ||
| 'debian11-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip', | ||
| 'debian11-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip', | ||
| 'debian12-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip', | ||
| 'debian12-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip', | ||
| 'mac10.13': undefined, | ||
| 'mac10.14': undefined, | ||
| 'mac10.15': undefined, | ||
| 'mac11': 'builds/chromium/%s/chromium-headless-shell-mac.zip', | ||
| 'mac11-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip', | ||
| 'mac12': 'builds/chromium/%s/chromium-headless-shell-mac.zip', | ||
| 'mac12-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip', | ||
| 'mac13': 'builds/chromium/%s/chromium-headless-shell-mac.zip', | ||
| 'mac13-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip', | ||
| 'mac14': 'builds/chromium/%s/chromium-headless-shell-mac.zip', | ||
| 'mac14-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip', | ||
| 'mac15': 'builds/chromium/%s/chromium-headless-shell-mac.zip', | ||
| 'mac15-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip', | ||
| 'win64': 'builds/chromium/%s/chromium-headless-shell-win64.zip', | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Consider standardizing platform support across browser types.
The chromium-headless-shell entry introduces support for platforms not present in other browser configurations:
- Ubuntu 24.04 (lines 194, 198)
- macOS 15 (lines 214-215)
This inconsistency might lead to maintenance challenges.
Would you like me to generate a script to verify if these platforms are supported in the upstream Playwright repository?
🏁 Script executed:
#!/bin/bash
# Description: Check if Ubuntu 24.04 and macOS 15 are supported in upstream Playwright
# Clone the Playwright repository
git clone --depth 1 https://github.com/microsoft/playwright.git
cd playwright
# Check for Ubuntu 24.04 and macOS 15 support in the codebase
echo "Checking for Ubuntu 24.04 support:"
rg -i "ubuntu.*24.04|ubuntu.*24\.04"
echo "Checking for macOS 15 support:"
rg -i "mac.*15|macos.*15"Length of output: 106961
Inconsistency Detected: mac15 Support Appears Unsupported in Upstream
- The upstream Playwright repository clearly registers support for Ubuntu 24.04 (with consistent entries in registry files and documentation).
- However, the shell script search did not reveal any references for "mac15" support—in contrast to multiple mentions of macOS 10.15 (including deprecation notices) and support for mac11–mac14. This suggests that while other browser binaries follow a similar pattern, the addition of mac15 (and mac15-arm64) in the chromium-headless-shell entry is unique.
- This discrepancy could introduce maintenance challenges. It’s advisable to verify whether mac15 support is intentionally added or if it should be standardized with the upstream configurations.
在内部也遇到了,感觉直接加就行,可以试试看看 @fengmk2
close #742
Summary by CodeRabbit
New Features
Bug Fixes