Skip to content

Add Chrome browser caching to test-and-check-other-node workflow and add timeout to waitForLineOutput call#14106

Merged
dario-piotrowicz merged 4 commits into
mainfrom
dario/fix-gh-actions-chrome-issue
May 29, 2026
Merged

Add Chrome browser caching to test-and-check-other-node workflow and add timeout to waitForLineOutput call#14106
dario-piotrowicz merged 4 commits into
mainfrom
dario/fix-gh-actions-chrome-issue

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented May 29, 2026

Copy link
Copy Markdown
Member

The test-and-check-other-node GitHub workflow is constantly getting stuck (I assume) because of Chrome browser downloads (e.g. https://github.com/cloudflare/workers-sdk/actions/runs/26635076139/job/78493207646?pr=14082), this PR tries to fix such issue.

It also adds a timeout to the waitForLineOutput call that launchBrowser makes (just to make sure that it doesn't get stuck)


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: fixes a CI issue
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix

A picture of a cute animal (not mandatory, but encouraged)


Open in Devin Review

@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e8e2956

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

This PR includes changesets to release 6 packages
Name Type
miniflare Patch
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler Patch
@cloudflare/wrangler-bundler 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

@dario-piotrowicz dario-piotrowicz added the ci:no-changeset-required Skip pull request checks for a valid changeset label May 29, 2026
@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk May 29, 2026
@workers-devprod workers-devprod requested review from a team and NuroDev and removed request for a team May 29, 2026 12:30
@workers-devprod

workers-devprod commented May 29, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Comment thread packages/miniflare/src/plugins/browser-rendering/index.ts Outdated
@ask-bonk

ask-bonk Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

The @puppeteer/browsers waitForLineOutput method's signature is waitForLineOutput(regex: RegExp, timeout?: number): Promise<string>. The second parameter is a timeout in milliseconds, which defaults to 0 (no timeout). Passing 10_000 is correct usage.

Let me also verify the browser-version.ts comment mentions this new workflow file.

Looking at browser-version.ts line 12, it mentions .github/workflows/test-and-check.yml but not the new test-and-check-other-node.yml. Since the PR adds the same hashFiles() cache key pattern to the other-node workflow, the comment in browser-version.ts should be updated to mention both workflows. However, this is a documentation/comment completeness matter, not a logic bug.

Let me also double-check the @puppeteer/browsers install() cacheDir behavior -- it stores under <cacheDir>/chrome/... which matches ~/.cache/.wrangler/chrome.

Let me review the full picture one more time for any logic issues:

  1. Workflow cache step: Correctly placed after Install Dependencies and before test runs. Uses the same cache key pattern as test-and-check.yml. Only caches Linux path since this workflow is ubuntu-only. All correct.

  2. Timeout addition: 10 seconds is reasonable for Chrome to print its WebSocket endpoint URL. The waitForLineOutput API accepts a timeout in ms as the second parameter. This will cause the promise to reject with an error rather than hanging forever. Correct.

  3. The if condition: Matches the other steps, using steps.should_run.outputs.result == 'true'. Correct.

Everything looks sound. The changes are straightforward and match existing patterns in the test-and-check.yml workflow.

LGTM

github run

Comment thread .github/workflows/test-and-check-other-node.yml

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/create-cloudflare@14106

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/deploy-helpers@14106

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/kv-asset-handler@14106

miniflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/miniflare@14106

@cloudflare/pages-shared

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/pages-shared@14106

@cloudflare/unenv-preset

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/unenv-preset@14106

@cloudflare/vite-plugin

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/vite-plugin@14106

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/vitest-pool-workers@14106

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/workers-editor-shared@14106

@cloudflare/workers-utils

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/workers-utils@14106

wrangler

npm i https://pkg.pr.new/cloudflare/workers-sdk/wrangler@14106

@cloudflare/wrangler-bundler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/wrangler-bundler@14106

commit: e8e2956

@github-actions

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@workers-devprod workers-devprod 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.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 29, 2026
@dario-piotrowicz dario-piotrowicz merged commit 7bb5c7a into main May 29, 2026
60 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/fix-gh-actions-chrome-issue branch May 29, 2026 15:05
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants