Open
Conversation
Contributor
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20643
Reasoning by Cursor:
Cause
The from forked process case was different from the stable ANR scenarios (basic.mjs, etc.):
forked.js used a hard-coded ingest DSN instead of process.env.SENTRY_DSN.
The test did not call .withMockSentryServer(), so the runner never started the local mock ingest server or injected SENTRY_DSN.
So the runner depended on the ANR worker’s debug stdout ([ANR Worker] … + JSON envelope) being forwarded through fork() + stdio: 'inherit'. That path is sensitive to timing, buffering, and CI load—the kind of setup that shows up as intermittent failures (issue #20643).
Fix
forked.js — initialize with dsn: process.env.SENTRY_DSN, matching basic.mjs so the forked child uses the same DSN the runner configures when the mock server is enabled.
test.ts — chain .withMockSentryServer() on the forker.js runner so events are delivered over HTTP to the mock server (same mechanism as the other ANR tests), instead of relying on debug lines on stdout.
Not 100% sure if this will fix the flakiness but it def. seems like an overall good change to me anyhow!