Skip to content

test(e2e): Add Bun, Deno and Cloudflare variants to react-router-8-framework - #24598

Draft
JPeer264 wants to merge 3 commits into
jp/react-router-cloudflare-worker-fixesfrom
jp/e2e-runtime-variants-poc
Draft

JPeer264 wants to merge 3 commits into
jp/react-router-cloudflare-worker-fixesfrom
jp/e2e-runtime-variants-poc

Conversation

@JPeer264

@JPeer264 JPeer264 commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

POC for running one framework e2e app on several server runtimes instead of one app per runtime (Linear project P-JS-2537). react-router-8-framework now runs its full Playwright suite on Bun, Deno and Cloudflare (local workerd) as optional variants, next to the Node job.

Each runtime inits its own SDK, the way a user of that runtime would: Node @sentry/react-router, Bun @sentry/bun, Deno @sentry/deno (with --preload=@sentry/deno/import) and Cloudflare @sentry/cloudflare. @sentry/react-router then only provides the framework wrappers, so values from its init() (sdk.name, the runtime tag, the /__manifest filter) are Node-only, and the tests branch on that. Using the runtime SDKs is what makes the Bun variant work: @sentry/node creates no http.server span on Bun, @sentry/bun does.

A variant sets RUNTIME in a named script, read with the new getRuntime() from @sentry-internal/test-utils, and playwright.config.mjs picks the start command from it. Bun and Deno reuse the Node build. Cloudflare builds with its own vite.cloudflare.config.ts (@cloudflare/vite-plugin + sentryCloudflareVitePlugin), and the new runtimeEntryPlugin from @sentry-internal/test-utils/vite swaps in entry.server.cloudflare.tsx, since React Router has no option to pick a server entry. A new runtime matrix key makes CI install Bun or Deno for a variant, so new variants need no build.yml change. The convention is in the e2e README.

Other expected differences: Express is not instrumented under bun run and there is no Express layer on workerd, so there the error transaction stays the request path and the meta tag names the http.server span. Deno is pinned to v2.9.0, because Deno 2.8 loses async context in socket callbacks and drops ioredis spans. The Cloudflare and Bun variants need the @sentry/react-router fixes this PR is based on.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.18 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.53 kB - -
@sentry/browser (incl. Metrics & Logs) 31.2 kB - -
@sentry/react 31.08 kB - -
@sentry/react (incl. Tracing) 53.54 kB - -
@sentry/vue 36.74 kB -0.11% -40 B 🔽
@sentry/vue (incl. Tracing) 53.7 kB -0.07% -36 B 🔽
@sentry/svelte 29.26 kB - -
CDN Bundle 31.05 kB - -
CDN Bundle (incl. Tracing) 51.8 kB - -
CDN Bundle (incl. Logs, Metrics) 33.31 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.77 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.02 kB - -
CDN Bundle (incl. Tracing, Replay) 89.39 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.36 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.53 kB - -
CDN Bundle - uncompressed 91.7 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.08 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.04 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.84 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.81 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.51 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.44 kB - -
@sentry/nextjs (client) 55.78 kB - -
@sentry/sveltekit (client) 51.6 kB - -
@sentry/core/server 39.99 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 142.26 kB -1.23% -1.76 kB 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.88 kB -0.12% -98 B 🔽
@sentry/node - without tracing 91.25 kB -1.78% -1.65 kB 🔽
@sentry/node - without channel injection 120.66 kB -1.42% -1.73 kB 🔽
@sentry/aws-serverless 99.52 kB -1.64% -1.66 kB 🔽
@sentry/cloudflare (withSentry) - minified 206.69 kB - -
@sentry/cloudflare (withSentry) 514.13 kB - -

View base workflow run

@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch from f08b065 to 9297a36 Compare September 23, 2026 05:27
@JPeer264 JPeer264 changed the title test(e2e): Add Bun, Deno and Cloudflare variants to react-router-8-framework test(e2e): Add Deno and Cloudflare variants to react-router-8-framework Sep 23, 2026
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 2 times, most recently from d358a6c to 4dd044c Compare September 23, 2026 09:12
@JPeer264
JPeer264 removed this pull request from stack #24600 September 23, 2026 09:14
@JPeer264 JPeer264 changed the title test(e2e): Add Deno and Cloudflare variants to react-router-8-framework test(e2e): Add Bun, Deno and Cloudflare variants to react-router-8-framework Sep 23, 2026
@JPeer264
JPeer264 changed the base branch from develop to jp/node-suites-bun-build September 23, 2026 09:15
@JPeer264
JPeer264 added this pull request to stack #24613 September 23, 2026 09:15
@JPeer264
JPeer264 removed this pull request from stack #24613 September 23, 2026 09:51
@JPeer264
JPeer264 added this pull request to stack #24633 September 23, 2026 09:51
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 2 times, most recently from adb5cb1 to fb48ca5 Compare September 23, 2026 10:02
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 2 times, most recently from 51e4c78 to b94af9d Compare September 23, 2026 12:21
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch from b94af9d to 6e3b225 Compare September 23, 2026 12:24
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch from 6e3b225 to c2638e4 Compare September 23, 2026 13:23
Comment thread .github/workflows/build.yml
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch from c2638e4 to 90bb70c Compare September 23, 2026 13:31
@JPeer264
JPeer264 removed this pull request from stack #24633 September 23, 2026 16:19
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 3 times, most recently from 2704c9c to 72f6d6c Compare September 28, 2026 08:07
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 3 times, most recently from d0fbc38 to 8aefac0 Compare September 28, 2026 09:38
@JPeer264
JPeer264 force-pushed the jp/e2e-runtime-variants-poc branch 3 times, most recently from b789b78 to 57c28ca Compare September 28, 2026 14:29
JPeer264 and others added 3 commits September 30, 2026 15:49
Runs the same Playwright suite on Deno and Cloudflare (local workerd) as
optional variants of the existing app, instead of one app per runtime. A
variant can set a `runtime` matrix key (`bun` or `deno`), and CI then installs
that runtime for the job. The Cloudflare build uses its own Vite config with
`@cloudflare/vite-plugin` and `sentryCloudflareVitePlugin`, and swaps in a
workerd server entry with the new `runtimeEntryPlugin` from
`@sentry-internal/test-utils/vite`.

The app keeps its Bun scripts, but CI runs no Bun variant yet: Bun never
publishes `http.server.request.start`, so `@sentry/node` creates no
`http.server` span there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…framework

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…framework

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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