Skip to content

fix(build): parse Playwright 1.58+ dry-run output in playwright extension#4300

Closed
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/playwright-dry-run-format
Closed

fix(build): parse Playwright 1.58+ dry-run output in playwright extension#4300
ANSHSINGH050404 wants to merge 1 commit into
triggerdotdev:mainfrom
ANSHSINGH050404:fix/playwright-dry-run-format

Conversation

@ANSHSINGH050404

Copy link
Copy Markdown

Closes #3089

Checklist

  • Followed CONTRIBUTING.md
  • Single issue PR
  • Changeset / server-changes when required

Summary

Playwright 1.58 changed --dry-run lines from browser: chromium to (playwright chromium v…).

Fix

Match either format in the Docker install grep.

Vouch request: #4290

@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0663c5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/python Patch
@internal/dashboard-agent Patch
@trigger.dev/core Patch
@trigger.dev/react-hooks Patch
@trigger.dev/redis-worker Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/rbac Patch
@trigger.dev/sso Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/sdk-compat-tests Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @ANSHSINGH050404, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6a277a99-097f-432a-9452-a0472218ec28

📥 Commits

Reviewing files that changed from the base of the PR and between a7c734c and 0663c5e.

📒 Files selected for processing (2)
  • .changeset/playwright-dry-run-format.md
  • packages/build/src/extensions/playwright.ts

Walkthrough

Updated the Playwright build extension to parse both legacy and newer playwright install --dry-run browser output formats when generating installation metadata. Added a patch changeset for @trigger.dev/build documenting support for Playwright 1.58+ dry-run output.

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

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Open in Devin Review

`RUN grep -A5 -m1 "browser: ${browser}" /tmp/browser-info.txt > /tmp/${browser}-info.txt`,
// Playwright ≤1.57: "browser: chromium version ..."
// Playwright ≥1.58: "Chrome for Testing ... (playwright chromium v...)"
`RUN grep -A5 -m1 -E "browser: ${browser}|playwright ${browser}" /tmp/browser-info.txt > /tmp/${browser}-info.txt`,

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.

🔍 grep pattern playwright chromium can substring-match the headless-shell line

The new extended-regex browser: ${browser}|playwright ${browser} at packages/build/src/extensions/playwright.ts:322 is unanchored, so for browser === "chromium" the alternative playwright chromium is a substring of playwright chromium-headless-shell. In non-headless mode both chromium and chromium-headless-shell are installed, so if Playwright 1.58+ lists the headless-shell entry before the chromium entry in --dry-run output, the -m1 (first match) for the chromium iteration would grab the wrong entry, producing the wrong install directory/download URL. This substring ambiguity is order-dependent and also existed in the old plain-grep pattern (browser: chromium matched browser: chromium-headless-shell), so it is not newly introduced, but the fix does not resolve it. Worth verifying the actual line ordering of Playwright 1.58+ dry-run output.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 324 to 325
`RUN INSTALL_DIR=$(grep "Install location:" /tmp/${browser}-info.txt | cut -d':' -f2- | xargs) && \
DIR_NAME=$(basename "$INSTALL_DIR") && \

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.

🔍 Fix assumes Install location / Download url lines are unchanged in 1.58+

Only the first grep was changed; the downstream parsing at packages/build/src/extensions/playwright.ts:324-338 still relies on Install location: and Download url: lines appearing within the 5 lines following the matched header (-A5). This assumes Playwright 1.58+ retained those exact labels and their relative position under the new (playwright chromium v...) header line. If 1.58+ reformatted or relocated those lines, the build would fail at the explicit Failed to extract... guards. The PR description implies the grep is the only needed change, but this coupling is worth confirming against real 1.58+ output.

(Refers to lines 324-338)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playwright extension breaks with Playwright 1.58+ (--dry-run output format change)

1 participant