Repository navigation
test(deno): Run more Node suites on Deno with runtime-aware expectations - #26643
Conversation
size-limit report 📦Compared: a60288c (PR test merge using develop at 3950f4a) Against: 3950f4a (develop) · base run #67492 ✅ Baseline matches: this diff contains only this PR's changes.
|
| import { loggingTransport } from '@sentry-internal/node-integration-tests'; | ||
|
|
||
| // `@sentry/deno` has the same options in `denoHttpIntegration`. | ||
| const httpIntegration = Sentry.httpIntegration ?? Sentry.denoHttpIntegration; |
There was a problem hiding this comment.
maybe for a follow-up, does it make sense to actually export this as httpIntegration from deno too? 🤔 cc @isaacs
There was a problem hiding this comment.
I think it does. @sentry/bun already re-exports httpIntegration under that name, and denoHttpIntegration takes the same options for the cases these scenarios use (ignoreRequestBody, sessionFlushingDelayMS). An httpIntegration alias in @sentry/deno would remove this ?? fallback, and it would probably let more of the 17 Node scenarios that call Sentry.httpIntegration(...) leave NO_SENTRY_DENO_EXPORT, for example tracing/httpIntegration and with-http/maxIncomingRequestBodySize. Not all of them, though: some use Node-only options.
One thing to decide: the integration name is DenoHttp, so an alias would need to keep that name or change it. Either way it's an SDK change, so I've kept it out of this test-only PR.
07dec57 to
c492397
Compare
c492397 to
58f5631
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 58 successful. See the run.
Successful checks
|
6890f53 to
835c50e
Compare
1934573 to
1950fa1
Compare
88e3b31 to
8d07011
Compare
8d07011 to
7411449
Compare
4cd6f3c to
55b47ed
Compare
7411449 to
6e35062
Compare
55b47ed to
5df6777
Compare
6e35062 to
bb45d76
Compare
Un-exclude Node suites that pass on Deno as-is or with test-only changes: a shared loopback address matcher, the SDK name from EXPECTED_SDK_NAME, an import map entry for the @sentry/node/import preload, and denoHttpIntegration where a scenario configures httpIntegration. Tests that hit a Deno require(esm) bug or an SDK difference are gated per test instead of excluding the whole suite. Drop the synthetic orchestrion suites that the real Node suites now cover on Deno. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
Expected failures fail loudly once Deno or the SDK fixes them, so the gate does not outlive the bug. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
The mysql Node suite now runs on Deno and covers it. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
bb45d76 to
615c189
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 615c189. Configure here.
| 'suites/sessions/crashed-session-aggregate/test.ts', | ||
| 'suites/sessions/errored-session-aggregate/test.ts', | ||
| 'suites/sessions/exited-session-aggregate/test.ts', | ||
| 'suites/sessions/server-without-process-session/test.ts', |
There was a problem hiding this comment.
Postgresjs Deno coverage was dropped
Medium Severity
The Deno-only postgresjs channel test was removed as a duplicate of the shared Node suite, but suites/tracing/postgresjs/test.ts and suites/tracing/postgresjs-tracing-channel/test.ts remain in STACK_FRAMES_DIFFER. Deno no longer has any postgresjs span coverage.
Reviewed by Cursor Bugbot for commit 615c189. Configure here.


What
Removes Deno excludes that are out of date, and changes the shared Node scenarios and expectations to fit
@sentry/denowhere its behavior is valid. These are the loopback address, the SDK name,denoHttpIntegration, and the@sentry/node/importpreload. The Deno-only orchestrion duplicates for fastify, graphql, koa, postgresjs and the mysql channel are removed. No SDK code changes.Why
A known Deno gap, like
require()of an ES module, or a real SDK difference, like mysql pool span parenting, now gates only the affected case instead of the whole file. Global handlers and process sessions are SDK differences, so they stay excluded.via @mydea.
--
View Session [Sentry]