Skip to content

Fix E2E test timeout by caching Puppeteer binaries#1158

Open
rishigupta-3 wants to merge 1 commit into
mainfrom
fix-puppeteer-timeout
Open

Fix E2E test timeout by caching Puppeteer binaries#1158
rishigupta-3 wants to merge 1 commit into
mainfrom
fix-puppeteer-timeout

Conversation

@rishigupta-3
Copy link
Copy Markdown
Collaborator

Summary

Fixes intermittent E2E nightly test failures caused by Puppeteer Chrome binary download timing out during npm ci.

Changes

  • Add Puppeteer binary caching: Cache ~/.cache/puppeteer directory between workflow runs
  • Increase timeout: Bump npm ci timeout from 10m to 15m for Linux and macOS
  • Smart cache invalidation: Cache key based on package-lock.json hash

Problem

The E2E nightly tests were failing intermittently on macOS (and occasionally Linux) with:

npm error signal SIGTERM
npm error command sh -c node install.mjs

The gtimeout 10m npm ci command was killing the process after 10 minutes while Puppeteer was downloading Chrome binaries (~200MB).

Solution

By caching the Puppeteer binaries, subsequent runs will skip the download entirely (cache hit) or only download if dependencies change. Combined with the increased timeout, this should eliminate the intermittent failures.

Test Plan

  • Changes tested locally
  • Wait for next scheduled E2E run to verify cache behavior
  • Monitor success rate over next few days

🤖 Generated with Claude Code

- Add Puppeteer binary cache to avoid re-downloading Chrome on every run
- Increase npm ci timeout from 10m to 15m for Linux and macOS
- Cache key based on package-lock.json hash for proper invalidation

This fixes intermittent E2E test failures caused by Puppeteer Chrome
download timing out during npm ci installation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (65a3b1b) to head (5995fdf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1158      +/-   ##
==========================================
+ Coverage   89.69%   89.70%   +0.01%     
==========================================
  Files         146      146              
  Lines       14482    14482              
  Branches      983      984       +1     
==========================================
+ Hits        12989    12990       +1     
+ Misses       1472     1471       -1     
  Partials       21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant