Skip to content

test(node): Add integration tests for the Neon serverless driver - #25165

Closed
chargome wants to merge 1 commit into
feat/neon-integrationfrom
test/neon-e2e
Closed

chargome wants to merge 1 commit into
feat/neon-integrationfrom
test/neon-e2e

Conversation

@chargome

@chargome chargome commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Runs both Neon drivers end to end against Neon's own proxy (ghcr.io/timowilhelm/local-neon-http-proxy) in front of a local Postgres, so the HTTP /sql and WebSocket /v2 wire protocols are the real ones rather than mocks. Covers sql.query(), tagged templates, transaction() batches, a failing statement and pool queries, in ESM and CJS under the default span lifecycle.

ws is added because Node 20 has no global WebSocket.

The suite is excluded on Bun like the other database suites, since bun run cannot inject the diagnostics channels. On Deno the pool's connect callback runs outside the segment's async context, so that one query has no parent span and is not expected there.

Stacked on #25164.

Refs #25144

@chargome
chargome added this pull request to stack #25166 October 8, 2026 09:12
@chargome chargome self-assigned this Oct 8, 2026
@chargome

chargome commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

bugbot run

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

Stale Bugbot comment from a previous run.

Comment thread dev-packages/node-integration-tests/suites/tracing/neon/test.ts Outdated
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.73 kB - -
@sentry/browser - with treeshaking flags 27.85 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.76 kB - -
@sentry/browser (incl. Tracing) 51.77 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.79 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.72 kB - -
@sentry/browser (incl. Tracing, Replay) 91.47 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.35 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.18 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.16 kB - -
@sentry/browser (incl. Feedback) 47.25 kB - -
@sentry/browser (incl. sendFeedback) 34.77 kB - -
@sentry/browser (incl. FeedbackAsync) 39.88 kB - -
@sentry/browser (incl. Metrics) 30.75 kB - -
@sentry/browser (incl. Logs) 31.03 kB - -
@sentry/browser (incl. Metrics & Logs) 31.67 kB - -
@sentry/react 31.55 kB - -
@sentry/react (incl. Tracing) 54.1 kB - -
@sentry/vue 37.76 kB - -
@sentry/vue (incl. Tracing) 54.7 kB - -
@sentry/svelte 29.75 kB - -
@sentry/remix (Remix 3 client bundle) 56.76 kB - -
CDN Bundle 31.44 kB - -
CDN Bundle (incl. Tracing) 52.28 kB - -
CDN Bundle (incl. Logs, Metrics) 33.65 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.23 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.55 kB - -
CDN Bundle (incl. Tracing, Replay) 89.92 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.06 kB - -
CDN Bundle - uncompressed 92.73 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.26 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.22 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.23 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.3 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 294.99 kB - -
@sentry/nextjs (client) 56.46 kB - -
@sentry/sveltekit (client) 52.16 kB - -
@sentry/core/server 40.86 kB - -
@sentry/core/browser 13.71 kB - -
@sentry/node 146.51 kB +0.44% +629 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.52 kB +0.23% +190 B 🔺
@sentry/node - without tracing 93.95 kB +0.29% +263 B 🔺
@sentry/node - without channel injection 124.7 kB +0.55% +670 B 🔺
@sentry/aws-serverless 102.1 kB +0.2% +198 B 🔺
@sentry/cloudflare (withSentry) - minified 209.71 kB - -
@sentry/cloudflare (withSentry) 519.94 kB - -

View base workflow run

@chargome

chargome commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@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 9524e95. Configure here.

// query it issues has no parent span and is skipped.
...(RUNTIME === 'deno'
? []
: [expectedDbSpan({ name: 'SELECT "User"', statement: 'SELECT "name" FROM "User"' })]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional assertion in one test

Low Severity

The websocket driver test branches on RUNTIME inside one assertion. This is flagged because the review rules call out conditionals in a single test; Node and Deno expect different pool-query spans.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 9524e95. Configure here.

Run both Neon drivers against Neon's own proxy in front of a local
Postgres, so the HTTP and WebSocket wire protocols are the real ones.
Covers queries, tagged templates, batches, failing statements and pool
queries in ESM and CJS under the default span lifecycle.

ws is needed for the WebSocket driver on Node 20, which has no global
WebSocket.

Refs #25144
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome

chargome commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Folded into #25164 so the integration PR carries its own end-to-end coverage, as the review rules ask. Closing.

@chargome chargome closed this Oct 8, 2026
@chargome
chargome deleted the test/neon-e2e branch October 8, 2026 10:59
@chargome
chargome removed this pull request from stack #25166 October 8, 2026 11:23
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