Skip to content

feat(server-utils): Instrument Prisma 8 firstOrThrow - #26992

Open
chargome wants to merge 3 commits into
developfrom
feat/prisma-8-first-or-throw
Open

chargome wants to merge 3 commits into
developfrom
feat/prisma-8-first-or-throw

Conversation

@chargome

Copy link
Copy Markdown
Member

Prisma 8 rc.18 added a firstOrThrow terminal to CollectionBase that does
not go through first, so it ran without a prisma:client:operation span.

Move the prisma-orm-v8 suite to rc.25 to cover it, which also needs the
new contractFromJson client option.

Fixes #26983
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Prisma 8 rc.18 added a firstOrThrow terminal to CollectionBase that does
not go through first, so it ran without a prisma:client:operation span.

Move the prisma-orm-v8 suite to rc.25 to cover it, which also needs the
new contractFromJson client option.

Fixes #26983
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: c63ca0a (PR test merge using develop at 27c4733)

Against: 27c4733 (develop) · base run #68355

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.55 kB - -
@sentry/browser - with treeshaking flags 28.74 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.61 kB - -
@sentry/browser (incl. Tracing) 53.69 kB - -
@sentry/browser (incl. Tracing Core) 40.62 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.69 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.58 kB - -
@sentry/browser (incl. Tracing, Replay) 93.61 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.42 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.47 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.42 kB - -
@sentry/browser (incl. Feedback) 48.41 kB - -
@sentry/browser (incl. sendFeedback) 31.12 kB - -
@sentry/browser (incl. FeedbackAsync) 36.18 kB - -
@sentry/browser (incl. Metrics) 31.87 kB - -
@sentry/browser (incl. Logs) 32.15 kB - -
@sentry/browser (incl. Metrics & Logs) 32.81 kB - -
@sentry/react 32.58 kB - -
@sentry/react (incl. Tracing) 56.43 kB - -
@sentry/vue 38.76 kB - -
@sentry/vue (incl. Tracing) 56.7 kB - -
@sentry/svelte 30.58 kB - -
@sentry/effect (client) 42.23 kB - -
@sentry/effect (client, incl. Tracing) 54.97 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.32 kB - -
@sentry/remix (Remix 3 client bundle) 59.43 kB - -
CDN Bundle 32.39 kB - -
CDN Bundle (incl. Tracing) 54.07 kB - -
CDN Bundle (incl. Logs, Metrics) 35.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.53 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.1 kB - -
CDN Bundle (incl. Tracing, Replay) 91.86 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.8 kB - -
CDN Bundle - uncompressed 94.58 kB - -
CDN Bundle (incl. Tracing) - uncompressed 159.89 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.92 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.52 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.32 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.33 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 287.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 299.88 kB - -
@sentry/nextjs (client) 60.24 kB - -
@sentry/sveltekit (client) 55.04 kB - -
@sentry/astro (client) - rolldown, without tracing 39.46 kB -0.01% -1 B 🔽
@sentry/core/server 45.84 kB - -
@sentry/core/browser 14.49 kB - -
@sentry/node 157.73 kB +0.02% +26 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.6 kB +0.02% +9 B 🔺
@sentry/node - without tracing 89.96 kB +0.02% +14 B 🔺
@sentry/node - without channel injection 146.7 kB +0.02% +26 B 🔺
@sentry/aws-serverless 100.61 kB +0.01% +9 B 🔺
@sentry/cloudflare (withSentry) - minified 212.36 kB - -
@sentry/cloudflare (withSentry) 492.5 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 215.31 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 237.58 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 64 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Failing after 4m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E hono-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (bun) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hapi-21 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (deno) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hapi-21 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-4-sourcemaps (Vite server) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps enabled by Sentry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (manual upload) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (cloudflare) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details

… RCs

The range check can't order RC numbers, so RCs before rc.18 get an own
async firstOrThrow that rejects when called, and a custom collection's
own firstOrThrow gets wrapped as async. Say so instead of claiming it
behaves like the missing method.

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

Copy link
Copy Markdown
Member Author

Claude Code reviewed this change at f85f6e7 for the author: 5 findings, none changed in code, 2 now documented.

  • packages/server-utils/src/orchestrion/config/prisma.ts:16: on Prisma 8 rc.15 to rc.17, which have no firstOrThrow, orchestrion's constructor fallback gives every collection an own async firstOrThrow that rejects when called, so feature detection sees a function. Left: the range check can't order RC numbers and the fallback assigns even when the method is missing, so this can't be avoided from the config. We only support the latest RC, and the comment now says what happens instead of claiming it matches the missing method (8d1bb40). Both upstream issues are being raised with the orchestrion and semifies maintainers.
  • packages/server-utils/src/orchestrion/config/prisma.ts:16: on the same RCs, a custom collection that defines its own firstOrThrow gets it wrapped as async. Left for the same reason; covered by the same comment (8d1bb40).
  • packages/server-utils/src/orchestrion/config/prisma.ts:9: the >=8.0.0-rc.15 lower bound doesn't keep earlier RCs out, for the same range-check reason. Left: this was already the case before this change.
  • dev-packages/node-integration-tests/package.json:60: the lockfile moves some language-server packages along with the Prisma bump. Left: the rc.25 Prisma toolchain pins vscode-languageserver 10.1.2 and vscode-languageserver-textdocument 1.0.16, so the shared copies move with it.
  • packages/server-utils/test/integrations/prisma-orchestrion.test.ts:234: the new unit test mostly repeats the existing rejected-promise test with another channel. Left: the integration suite now runs firstOrThrow against rc.25, and the unit test still pins the channel wiring.

@chargome chargome self-assigned this Nov 30, 2026
…t-or-throw

# Conflicts:
#	dev-packages/node-integration-tests/package.json

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.

Prisma 8 firstOrThrow() calls are not instrumented

1 participant