Skip to content

fix(ci): pre-install chromedriver for Node 24.16 + bump node version#2821

Merged
ssbarnea merged 6 commits into
ansible:mainfrom
cidrblock:fix/wdio-chromedriver-patch-version
Jun 1, 2026
Merged

fix(ci): pre-install chromedriver for Node 24.16 + bump node version#2821
ssbarnea merged 6 commits into
ansible:mainfrom
cidrblock:fix/wdio-chromedriver-patch-version

Conversation

@cidrblock

@cidrblock cidrblock commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bumps Node.js from 24.15 to 24.16
  • Fixes test (linux-wdio) CI failure caused by Node 24.16 incompatibility with WebdriverIO 8's chromedriver download
  • Fixes test (linux) CI failure caused by Node 24.16 corrupting bin permissions during npm pack lifecycle
  • Patches wdio-vscode-service to 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:

Error: spawn /tmp/chromedriver/linux-142.0.7444.175/chromedriver-linux64/chromedriver ENOENT

tsup permission denied (Node 24.16):
Node.js 24.16 also causes pnpm to corrupt node_modules/.bin/ permissions when npm pack triggers prepack lifecycle scripts. This manifests as sh: 1: tsup: Permission denied during the als:package and mcp:package tasks.

Version normalization (defensive):
VS Code patch releases (e.g. 1.122.1) may not have git tags on GitHub. When wdio-vscode-service tries to fetch cgmanifest.json from 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

  1. tools/ensure-chromedriver.sh — Downloads chromedriver using curl + unzip, bypassing Node's HTTP stack entirely. Runs as part of the wdio Taskfile target. The script resolves versions dynamically via the Chrome for Testing API.

  2. pnpm patch for wdio-vscode-service@6.1.4 — Normalizes VS Code version (x.y.zx.y.0) before constructing the cgmanifest.json URL. The Chromium version is identical across patch releases.

  3. --ignore-scripts on npm pack — Skips the prepack lifecycle during packaging. The Taskfile build dependency already compiles the packages, and we run the production build explicitly before packing.

Cleanup note: Remove tools/ensure-chromedriver.sh, the Taskfile reference, and the pnpm patch when the project migrates to WebdriverIO 9.

Test plan

  • test (linux-wdio) CI job passes with Node 24.16
  • test (macos) passes
  • lint passes
  • test (linux) passes (tsup fix)
  • test (wsl) passes

Closes #2812

Copilot AI review requested due to automatic review settings May 29, 2026 16:49
@cidrblock cidrblock requested review from a team as code owners May 29, 2026 16:49
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds 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.

Changes

Test Environment & Tooling

Layer / File(s) Summary
ChromeDriver resolution, install, and WDIO integration
tools/ensure-chromedriver.sh, Taskfile.yml, patches/wdio-vscode-service@6.1.4.patch, pnpm-workspace.yaml, cspell.config.yaml, .config/dictionary.txt
Adds tools/ensure-chromedriver.sh to resolve Chromium major from VS Code metadata, map platform, download/cache the matching ChromeDriver zip from Google Cloud Storage, and make it executable. The wdio Taskfile task runs this script first. A patch for wdio-vscode-service@6.1.4 normalizes VS Code manifest version resolution and pnpm-workspace.yaml registers the patch. cspell.config.yaml ignores patches/ and the project dictionary is updated with new terms.
Node.js tool version bump
.config/mise.toml
Bumps Node.js tool version in [tools] from 24.15 to 24.16.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

chore

Poem

A rabbit hops to fetch the gear,
Downloads drivers with a cheer,
Patches set and tests align,
Node bumped up — all works fine! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: fixing chromedriver installation for Node 24.16 and bumping Node version to 24.16.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from #2812: Node version bumped from 24.15 to 24.16, chromedriver pre-installation script added to resolve CI failures, and pnpm patch applied to support version normalization.
Out of Scope Changes check ✅ Passed All changes are within scope of Node version upgrade and chromedriver compatibility fix. Dictionary and config updates support the primary objectives without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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 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 patch that normalizes VS Code patch versions (x.y.zx.y.0) before fetching cgmanifest.json.
  • Register the patched dependency in pnpm-workspace.yaml and update pnpm-lock.yaml with the patch hash.
  • Bump Node.js in .config/mise.toml from 24.15 to 24.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.

@cidrblock cidrblock added the fix label May 29, 2026
@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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
@cidrblock cidrblock force-pushed the fix/wdio-chromedriver-patch-version branch from e2fd75e to fa72895 Compare May 29, 2026 22:22
@cidrblock cidrblock changed the title fix(ci): patch wdio-vscode-service chromedriver version lookup fix(ci): pre-install chromedriver for Node 24.16 + bump node version May 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
tools/ensure-chromedriver.sh (2)

10-10: ⚡ Quick win

Consider a persistent cache location for CI environments.

The default /tmp cache is often cleared on reboot, forcing unnecessary re-downloads in CI. Consider defaulting to a project-relative path like .cache/chromedriver or documenting that CI should set CHROMEDRIVER_CACHE_DIR to 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 value

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between e2fd75e and fa72895.

📒 Files selected for processing (3)
  • .config/mise.toml
  • Taskfile.yml
  • tools/ensure-chromedriver.sh

cidrblock added 3 commits May 29, 2026 15:30
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
@cidrblock cidrblock force-pushed the fix/wdio-chromedriver-patch-version branch from 3c97e49 to f422ef3 Compare May 30, 2026 15:21
cidrblock and others added 2 commits May 30, 2026 08:37
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.
@ssbarnea ssbarnea merged commit bd84b3a into ansible:main Jun 1, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in 🧰 devtools project board Jun 1, 2026
@ssbarnea ssbarnea added chore and removed fix labels Jun 9, 2026
@github-actions github-actions Bot added the fix label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants