fix(ci): pre-install chromedriver for Node 24.16 + bump node version#2821
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a ChromeDriver preinstall script and runs it from the WDIO task, patches the wdio VSCode service and registers that patch in pnpm workspace, updates cspell ignore and project dictionary entries, and bumps Node.js from 24.15 to 24.16. ChangesTest Environment & Tooling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request patches the wdio-vscode-service@6.1.4 dependency to avoid failing chromedriver version detection on VS Code patch releases (e.g. 1.122.1), and updates the repo’s Node.js toolchain version to match the latest minor.
Changes:
- Add a
pnpm patchthat normalizes VS Code patch versions (x.y.z→x.y.0) before fetchingcgmanifest.json. - Register the patched dependency in
pnpm-workspace.yamland updatepnpm-lock.yamlwith the patch hash. - Bump Node.js in
.config/mise.tomlfrom24.15to24.16.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pnpm-workspace.yaml |
Registers the wdio-vscode-service@6.1.4 pnpm patch so installs apply the fix. |
pnpm-lock.yaml |
Records the patched dependency hash and updates the resolved snapshot entry accordingly. |
patches/wdio-vscode-service@6.1.4.patch |
Implements the version normalization used to prevent 404s for VS Code patch tags during manifest lookup. |
.config/mise.toml |
Updates the pinned Node.js version used by mise for local dev/CI tooling. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Node.js 24.16's "harden ClientRequest options merge" (nodejs/node#63082) breaks WebdriverIO 8's internal chromedriver download via @puppeteer/browsers. This adds a shell-based pre-install step that fetches chromedriver using curl, placing it where WebdriverIO expects it so the framework skips its broken download path. Also bumps Node from 24.15 to 24.16. Refs: ansible#2812
e2fd75e to
fa72895
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
tools/ensure-chromedriver.sh (2)
10-10: ⚡ Quick winConsider a persistent cache location for CI environments.
The default
/tmpcache is often cleared on reboot, forcing unnecessary re-downloads in CI. Consider defaulting to a project-relative path like.cache/chromedriveror documenting that CI should setCHROMEDRIVER_CACHE_DIRto a persistent cache directory.Suggested improvement
-CACHE_DIR="${CHROMEDRIVER_CACHE_DIR:-/tmp}" +# Use project-relative cache by default for better CI caching +CACHE_DIR="${CHROMEDRIVER_CACHE_DIR:-${PWD}/.cache}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/ensure-chromedriver.sh` at line 10, The script currently sets CACHE_DIR="${CHROMEDRIVER_CACHE_DIR:-/tmp}" which uses /tmp by default and can be wiped in CI; change the default to a project-relative persistent path (e.g., ".cache/chromedriver") or update the script's comments to require CI to set CHROMEDRIVER_CACHE_DIR to a durable cache directory; locate the CACHE_DIR assignment in tools/ensure-chromedriver.sh and replace the fallback "/tmp" with the chosen project-relative path or add documentation/echo guidance about setting CHROMEDRIVER_CACHE_DIR in CI.
72-72: 💤 Low valueAdd newline at end of file.
Shell scripts should end with a newline character per POSIX convention.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/ensure-chromedriver.sh` at line 72, Add a trailing newline to the end of the ensure-chromedriver.sh file so the script ends with a newline character (POSIX convention); simply ensure the last character in the file is a newline and re-save the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tools/ensure-chromedriver.sh`:
- Line 10: The script currently sets CACHE_DIR="${CHROMEDRIVER_CACHE_DIR:-/tmp}"
which uses /tmp by default and can be wiped in CI; change the default to a
project-relative persistent path (e.g., ".cache/chromedriver") or update the
script's comments to require CI to set CHROMEDRIVER_CACHE_DIR to a durable cache
directory; locate the CACHE_DIR assignment in tools/ensure-chromedriver.sh and
replace the fallback "/tmp" with the chosen project-relative path or add
documentation/echo guidance about setting CHROMEDRIVER_CACHE_DIR in CI.
- Line 72: Add a trailing newline to the end of the ensure-chromedriver.sh file
so the script ends with a newline character (POSIX convention); simply ensure
the last character in the file is a newline and re-save the file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6846c4da-838c-4632-8330-94c3931ad4bc
📒 Files selected for processing (3)
.config/mise.tomlTaskfile.ymltools/ensure-chromedriver.sh
VS Code patch releases (e.g. 1.122.1) may not have git tags on GitHub, causing _fetchChromedriverVersion to 404 on cgmanifest.json. This pnpm patch normalizes the version (x.y.z → x.y.0) before the manifest lookup. Upstream fix: webdriverio-community/wdio-vscode-service#158
3c97e49 to
f422ef3
Compare
Node.js 24.16 causes pnpm to corrupt bin permissions when npm pack triggers prepack lifecycle scripts. Since the Taskfile build task already compiles the packages, run the production build explicitly and pass --ignore-scripts to npm pack.
Summary
test (linux-wdio)CI failure caused by Node 24.16 incompatibility with WebdriverIO 8's chromedriver downloadtest (linux)CI failure caused by Node 24.16 corrupting bin permissions duringnpm packlifecyclewdio-vscode-serviceto normalize VS Code version for cgmanifest.json lookup (defensive fix for future patch releases)Supersedes #2812 (Renovate node bump that couldn't merge due to the same wdio failure).
Problem
Chromedriver download failure (Node 24.16):
Node.js 24.16 includes
http: harden ClientRequest options merge(nodejs/node#63082) which breaks WebdriverIO 8's internal chromedriver download via@puppeteer/browsers. The download fails silently, leaving the binary missing:tsup permission denied (Node 24.16):
Node.js 24.16 also causes pnpm to corrupt
node_modules/.bin/permissions whennpm packtriggersprepacklifecycle scripts. This manifests assh: 1: tsup: Permission deniedduring theals:packageandmcp:packagetasks.Version normalization (defensive):
VS Code patch releases (e.g.
1.122.1) may not have git tags on GitHub. Whenwdio-vscode-servicetries to fetchcgmanifest.jsonfrom a non-existent tag, it crashes with a JSON parse error. This is tracked upstream as wdio-vscode-service#157 with fix at wdio-vscode-service#158.Solution
tools/ensure-chromedriver.sh— Downloads chromedriver usingcurl+unzip, bypassing Node's HTTP stack entirely. Runs as part of thewdioTaskfile target. The script resolves versions dynamically via the Chrome for Testing API.pnpm patch for
wdio-vscode-service@6.1.4— Normalizes VS Code version (x.y.z→x.y.0) before constructing the cgmanifest.json URL. The Chromium version is identical across patch releases.--ignore-scriptsonnpm pack— Skips theprepacklifecycle during packaging. The Taskfilebuilddependency already compiles the packages, and we run the production build explicitly before packing.Test plan
test (linux-wdio)CI job passes with Node 24.16test (macos)passeslintpassestest (linux)passes (tsup fix)test (wsl)passesCloses #2812