CI dry run: isolate inherited hubs under :fiber#1
Closed
SeanLF wants to merge 2 commits into
Closed
Conversation
Fiber storage is inherited by child fibers and by threads started from them, handing over the same Hub object rather than a copy. Under hub_isolation_level = :fiber that left sibling request fibers and worker threads sharing one hub, and one unsynchronized scope stack, so concurrent requests and jobs read each other's tags. The `|| clone` fallback never fired because the inherited value was not nil. Tag each stored entry with its owning fiber so a context that inherited one takes its own copy. The copy keeps the live span: Scope#dup deep-copies it, and spans recorded on a detached transaction copy are never sent, which would break the Async fan-out this mode exists for. Reported by @trevorturk in getsentry#3018. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The fiber-storage gem polyfills Fiber[] on Ruby < 3.2 and on JRuby, so :fiber is active there too, but the polyfill does not inherit into Thread.new. A thread started from a fiber therefore begins from the main hub and cannot stay on the parent's trace, which the thread half of this expectation assumed it could. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
|
CI dry run complete: 148 checks pass on the full matrix. Superseded by getsentry#3036. |
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.
Internal CI verification before opening upstream. Do not merge.