Conversation
size-limit report 📦
|
f544fac to
d5222d1
Compare
9099fef to
34ea3db
Compare
34ea3db to
0a3ba84
Compare
0a3ba84 to
460db99
Compare
460db99 to
5df282e
Compare
1feee30 to
278df2a
Compare
isaacs
left a comment
There was a problem hiding this comment.
One minor-ish confusing thing I think probably should be fixed (if I'm understanding accurately what's going on), but otherwise this is fine.
2f6d13a to
da4d406
Compare
c4ddeec to
e986b27
Compare
The Bun package now selects every Node suite and excludes the ones that fail on Bun, grouped by cause: Node-only features, no `http.server` span because Bun does not publish `http.server.request.start`, no `fetch` instrumentation because Bun's `fetch` does not publish undici channels, no outgoing `node:http` instrumentation on Bun 1.3.14 (JS-3507), and no auto-instrumentation under `bun run` (JS-3508). Excluded files do not run, so the job stays fast. The list is based on Bun 1.3.14, the version CI pins. The suites that assert the SDK name use `EXPECTED_SDK_NAME`, so they also pass with `@sentry/bun`, and `bun-runtime-metrics` runs on Bun instead of Node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e986b27 to
d72d702
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isaacs
left a comment
There was a problem hiding this comment.
This is great! Love to see our tests come together like this, it's so validating of the overall architectural work we've been doing the last few months.
Approved because the only really blocking concern (the prisma failure) is being caught by CI anyway, so fix that and we're good 👍
The other relevant concern is that some tests actually are being dropped that were run before. I thought at first it'd be a tiny couple-line patch to pull them back in, but it's a bit more involved. If you wanna do that as a followup, that's fine, but it could also just go in here, I think.
| 'suites/tracing/postgresjs/test.ts', | ||
| 'suites/tracing/prisma-orm-v5/test.ts', | ||
| 'suites/tracing/prisma-orm-v6/test.ts', | ||
| 'suites/tracing/prisma-orm-v7/test.ts', |
There was a problem hiding this comment.
This is why the CI is failing, because a new test was added on develop, but not here.
Obviously, once this lands, it'll be less of an issue. But, in addition to adding it to the set right now, I think we can help prevent the footgun that exposes.
I'd recommend:
- Add a line in dev-packages/node-integration-tests/README.md, like "When adding a test to this suite, also consider whether that test can run properly on Bun. If not, create an exclusion in
dev-packages/bun-integration-tests/node-suites/excludes.ts." - This could also maybe be added to our skills which mention node-integration-tests (maybe just tell them to be sure to check the readme?)
- .claude/skills/add-ai-integration/SKILL.md
- .claude/skills/vendor-otel/SKILL.md
- .claude/skills/write-tests/SKILL.md
| 'suites/tracing/prisma-orm-v7/test.ts', | |
| 'suites/tracing/prisma-orm-v7/test.ts', | |
| 'suites/tracing/prisma-orm-v8/test.ts', |
| max?: number; | ||
| }): typeof describe | typeof describe.skip { | ||
| // Vitest always runs on Node, so its Node version says nothing about Bun or Deno running the | ||
| // scenario. Those runtimes list the suites they cannot run in their own exclude lists. |
There was a problem hiding this comment.
Might also want to add a line here to say that a file with a complementary min/max gate will not work properly on Bun, and must be excluded in dev-packages/bun-integration-tests/node-suites/excludes.ts.
|
|
||
| // `@sentry/node` instruments `fetch` through undici's diagnostics channels, which Bun's `fetch` | ||
| // does not publish. `@sentry/bun` has its own `fetchIntegration` for this. | ||
| const NO_FETCH_INSTRUMENTATION = [ |
There was a problem hiding this comment.
The way this is structured right now, bun's fetchIntegration tests don't actually run.
It's a little complicated to explain in ye olde englishe, so I wrote up a patch that would bring the lost coverage. It's a little complicated, there might be an opportunity to simplify it down a bit, or if you think it's cleaner, we could do as a followup. But I think it's important to not lose test coverage in the end, if possible.
https://gist.github.com/isaacs/06a374f207bca343b51d9ad831485b7b
There was a problem hiding this comment.
(Same for http.server tests. Updated gist.)
|
|
||
| describe('bunRuntimeMetricsIntegration', () => { | ||
| // The integration measures the Bun process, so the suite runs on Bun only. | ||
| describe.skipIf(RUNTIME !== 'bun')('bunRuntimeMetricsIntegration', () => { |
There was a problem hiding this comment.
Can we move this test to dev-packages/bun-integration-tests, and then remove this skipIf condition?
Bun now runs every Node suite except an explicit exclude list, grouped by cause, so a new Node test runs on Bun by default and a gap shows up as a failing test rather than as missing coverage. Excluded files do not run, which keeps the job fast even though most exclusions would otherwise wait for a timeout.
The exclude groups document what
@sentry/nodecurrently cannot do on Bun: nohttp.serverspan (Bun does not publishhttp.server.request.start), nofetchspans (Bun'sfetchdoes not use undici), no outgoingnode:httpinstrumentation on Bun 1.3.14 (#23881), and no auto-instrumentation underbun run(#23882). The list is based on Bun 1.3.14, the version CI pins; several suites already pass on newer Bun.The suites that assert the SDK name use
EXPECTED_SDK_NAME, so they also pass in the@sentry/bunproject.FWIW in a later PR more tests will be enabled as Bun will then run
Bun.buildbefore - see #24612Part of #23889.
🤖 Generated with Claude Code