fix(abort): do not lose in-flight AbortSignal under tracing#41658
Open
yury-s wants to merge 1 commit into
Open
fix(abort): do not lose in-flight AbortSignal under tracing#41658yury-s wants to merge 1 commit into
yury-s wants to merge 1 commit into
Conversation
When an action is aborted via an AbortSignal, the client sends an `__abort__` message that aborts the server-side ProgressController for the call. With tracing enabled, `onBeforeCall` records a "before" snapshot, which delayed registering the progress controller until after the snapshot completed. The `__abort__` message could arrive during that window, find no registered controller, and be silently dropped — leaving the action to run until the test timed out. Register the progress controller before running instrumentation, and let ProgressController buffer an abort that arrives before run() starts so it is applied as soon as the command begins.
pavelfeldman
approved these changes
Jul 7, 2026
Member
|
Check out #41643, it might be a bit better. Let alone earlier! |
Contributor
Test results for "MCP"1 failed 7642 passed, 1132 skipped Merge workflow run. |
Contributor
Test results for "tests 1"5 flaky49493 passed, 1164 skipped Merge workflow run. |
Contributor
Test results for "tests 2"3 failed 36 flaky105904 passed, 4476 skipped, 3 did not run Merge workflow run. |
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.
Summary
AbortSignalcould be silently dropped when tracing is enabled, causing the action to hang until the test timed out (surfaced as flaky failures in theTracingCI config, e.g.page-click.spec.ts"should throw an Error when aborted in-flight with a string reason").__abort__message aborts the server-sideProgressController, but the controller was only registered afteronBeforeCallrecorded the "before" trace snapshot. The abort raced into that window, found no controller, and was dropped.ProgressControllerbuffer an abort that arrives beforerun()starts so it is applied as soon as the command begins.Failing test: https://github.com/microsoft/playwright/actions/runs/28827888598/job/85495105077?pr=41653