Skip to content

ci(e2e): Run E2E tests without restoring the monorepo's node_modules - #25403

Merged
mydea merged 2 commits into
test/e2e-test-utils-tarballfrom
ci/e2e-without-root-node-modules
Oct 19, 2026
Merged

mydea merged 2 commits into
test/e2e-test-utils-tarballfrom
ci/e2e-without-root-node-modules

Conversation

@mydea

@mydea mydea commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Each E2E job restored the full ~860 MB root dependency cache and the build output (about 33s per job, ~2.5 runner-hours per CI run) only to run a few tsx scripts and to resolve @sentry-internal/test-utils. Since #25402 installs test-utils from a tarball, E2E jobs now only download tarballs.

The E2E scripts are now plain .mjs files without dependencies. They run under each app's pinned Node (down to 20.19), which rules out Node's type stripping. With run.ts converted too, the package no longer needs tsx, dotenv, glob, esbuild or a tsconfig (lint:ts never ran in CI).

Since #25380 the Playwright install reads its version from the app's package.json, so it doesn't need the root node_modules either. Since #25334, install-pnpm takes pnpm from the root node_modules too, so the E2E jobs install the root devDependencies version with pnpm/action-setup instead. Other workflows and local runs keep getting pnpm through yarn.lock. aws-serverless still downloads the build output, since its Lambda stack installs the built package directories.

Stacked on #25402. Replaces #25371, which GitHub closed as merged by accident during a restack. Its review history is still there.

🤖 Generated with Claude Code

@mydea
mydea added this pull request to stack #25405 October 15, 2026 12:55
@mydea
mydea force-pushed the ci/e2e-without-root-node-modules branch from 64925fb to f0bf393 Compare October 15, 2026 14:28
@mydea
mydea force-pushed the ci/e2e-without-root-node-modules branch 2 times, most recently from 0113a54 to c3e497e Compare October 16, 2026 08:52
@mydea
mydea marked this pull request as ready for review October 16, 2026 11:18
@mydea
mydea requested review from JPeer264 and msonnb October 16, 2026 11:58
@mydea
mydea force-pushed the ci/e2e-without-root-node-modules branch from 5225fe3 to b2e5641 Compare October 19, 2026 08:17

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b2e5641. Configure here.

Comment thread .github/workflows/build.yml
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.88 kB - -
@sentry/browser - with treeshaking flags 28.02 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.92 kB - -
@sentry/browser (incl. Tracing) 52.07 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.07 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.02 kB - -
@sentry/browser (incl. Tracing, Replay) 91.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.68 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.55 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.49 kB - -
@sentry/browser (incl. Feedback) 47.4 kB - -
@sentry/browser (incl. sendFeedback) 34.94 kB - -
@sentry/browser (incl. FeedbackAsync) 40.05 kB - -
@sentry/browser (incl. Metrics) 30.9 kB - -
@sentry/browser (incl. Logs) 31.18 kB - -
@sentry/browser (incl. Metrics & Logs) 31.81 kB - -
@sentry/react 31.7 kB - -
@sentry/react (incl. Tracing) 54.39 kB - -
@sentry/vue 38.04 kB - -
@sentry/vue (incl. Tracing) 55.01 kB - -
@sentry/svelte 29.9 kB - -
@sentry/remix (Remix 3 client bundle) 57.08 kB - -
CDN Bundle 31.64 kB - -
CDN Bundle (incl. Tracing) 52.58 kB - -
CDN Bundle (incl. Logs, Metrics) 33.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.52 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.77 kB - -
CDN Bundle (incl. Tracing, Replay) 90.25 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.34 kB - -
CDN Bundle - uncompressed 93.18 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.03 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.99 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.76 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 276.2 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.9 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.84 kB - -
@sentry/nextjs (client) 56.8 kB - -
@sentry/sveltekit (client) 52.45 kB - -
@sentry/core/server 41.12 kB - -
@sentry/core/browser 13.81 kB - -
@sentry/node 154.89 kB +0.01% +8 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 84.06 kB - -
@sentry/node - without tracing 96.7 kB +0.01% +5 B 🔺
@sentry/node - without channel injection 132.91 kB +0.01% +7 B 🔺
@sentry/aws-serverless 104.89 kB +0.01% +5 B 🔺
@sentry/cloudflare (withSentry) - minified 210.78 kB - -
@sentry/cloudflare (withSentry) 522.89 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 228.46 kB - -

View base workflow run

mydea and others added 2 commits October 19, 2026 11:04
E2E jobs restored the ~860 MB root dependency cache and the full build
output only to run a few tsx scripts and to resolve the linked
test-utils package. The scripts are now plain .mjs files without
dependencies, and test-utils is installed from a tarball like the SDK
packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With all scripts as plain .mjs files, the local runner no longer needs
tsx, dotenv or glob. esbuild was unused. Type checking of this package
was never run in CI, so it no longer has a tsconfig; the JSDoc types
are kept for editors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mydea
mydea force-pushed the ci/e2e-without-root-node-modules branch from b2e5641 to 525339c Compare October 19, 2026 09:06
@mydea
mydea merged commit 8a4a95d into develop Oct 19, 2026
376 of 407 checks passed
@mydea
mydea deleted the ci/e2e-without-root-node-modules branch October 19, 2026 09:24
mydea added a commit that referenced this pull request Oct 19, 2026
Removes the `envelopeDumpPath` option of the event proxy, its use in the
Next.js and `cloudflare-think` apps, the CI steps that uploaded the
dumps on failure, and
`scripts/normalize-e2e-test-dump-transaction-events.js`.

Dumps were added in #13998 to compare transaction span trees across
Next.js versions. Nobody uses them: the normalization step has matched
no files since E2E apps started running in a temp directory (#16783),
and nobody noticed. It also only reads `transaction` envelopes, so it
can't handle span streaming, which is now the default.

Stacked on #25403. Replaces #25393, which GitHub closed as merged by
accident during a restack. Its review history is still there.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mydea added a commit that referenced this pull request Oct 19, 2026
)

Since #25403, E2E jobs no longer restore the root `node_modules`. pnpm
then installs all 63 workspace projects before the first `pnpm run
test:prepare`, because `verify-deps-before-run` finds the dependencies
missing. That's about 26s per E2E job, which cancels out most of what
#25403 saved. It also made the background Playwright install flaky: its
`npx` ran from the repo root and could find the hoisted
`node_modules/playwright` before pnpm had linked its binary
(`playwright: not found`). The scripts run with `pnpm run` here are
plain `node` scripts, so disabling the check is enough. It's set per
job, so local runs keep it.

Without the long install, the foreground steps start in quick
succession, which exposes a runner bug. The runner sets up the steps of
a background composite action from the job's shared `github` context
([`CompositeActionHandler.cs`](https://github.com/actions/runner/blob/main/src/Runner.Worker/Handlers/CompositeActionHandler.cs)
→ `GitHubContext.ShallowCopy()`). If a foreground step starts at that
moment, this fails with `Collection was modified; enumeration operation
may not execute`. The background install now starts right before the app
build, so nothing else starts while it sets up. The steps it no longer
overlaps with take well under a second.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants