Repository navigation
test(profiling): check eager task samples carry the task's own span - #21743
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
Codeowners resolved asResolved from the full PR diff against |
Dependency direction analysis
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
The expected merge time in
|
There was a problem hiding this comment.
More details
The assertions cover incorrect parent attribution during the eager child’s first step and verify that the child starts an independent trace, distinguishing span-parenting changes from profiler attribution failures.
🤖 Bits Code Review · Commit 465a4c7
Description
JIRA: PROF-16348
Adds a test for an eager task (Python 3.12+) that starts its own trace while its creator's span is still open. Every sample of the child's work must carry the child's span id, local root span id and endpoint, and none may carry the parent's. The test first checks that the child really starts its own trace, so a change in span parenting fails at that check instead of looking like a profiler bug.
This passes on main, where task samples get the thread's latest span. It guards #21653. During an eager step, the sampler also emits the parent task, with the child's frames on top. Once task samples use their own task's span, that copy gets the parent's span.
Testing
The new test passes on main on Python 3.12, 3.13 and 3.14 (Linux aarch64,
scripts/run-tests). With #21653 applied, it fails on 3.12.Risks
None. Test only.
Additional Notes
None.