Repository navigation
Make dwds more conformant to vm_service protocol - #1370
Merged
Merged
Conversation
added 2 commits
July 28, 2021 17:43
- Throw SentiinelException if the isolate id is unrecognized - Throw RPCError if getStack is called when not paused - Fix race conditions in chrome_proxy_tests Helps: dart-lang#1369 Closes: dart-lang#721
annagrin
marked this pull request as draft
July 29, 2021 15:45
annagrin
pushed a commit
to annagrin/flutter
that referenced
this pull request
Jul 29, 2021
One case of recent CI flakes in web_tool_tests was caused by a race condition between resuming an isolate and waiting for the app to hit a next breakpoint. If resume gets delayed in the vm service, the tests might get a stale "paused" state of the isolate and call `getStack` while running, which causes an exception in dwds, which is limited by chrome dev tools capabilities in that case and cannot get a stack while running. Fix the race condition by waiting for `Resume` event before waiting for `Pause` in `TestDriver._resume`. Following PR changes the null dereference to an RPCError in dwds if `getStack` while the app is running. Related: dart-lang/webdev#1370 Closes: dart-lang/webdev#1369
Merged
8 tasks done
bkonyi
approved these changes
Jul 29, 2021
bkonyi
left a comment
Collaborator
There was a problem hiding this comment.
LGTM with nits. Thanks for the quick fix!
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.
See: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#getstack
Throw
SentinelExceptionif the isolate id is unrecognizedvm service protocol requires all isolate-related API to return
Sentinelif the isolatehad exited, which translates to throwing
SentinelExceptionin the implementation.Make dwds conform to that spec.
Throw
RPCErrorifgetStackis called when not pausedvm service protocol requires getStack to always return a non-null value or a
sentinel, but dwds is limited by chrome devtools API that do not curently give a
way to get the stack while running. Throw RPC error to indicate that something
unexpected has happened.
Helps: #1369
expecton Futures to useexpectLaterinstead.This makes sure the current test is finished before the next one starts, and
reduces possibilities of flakes.
getStackcalled while running.Closes: #721