-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry when safaridriver fails #48791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for doing this!
/// "Operation not permitted" error, kill the `safaridriver` process and try | ||
/// again with a different port. Wait [_waitBetweenRetryInSeconds] seconds | ||
/// between retries. Try up to [_maxRetryCount] times. | ||
Future<void> _startDriverProcess() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this isn't just the implementation of spawnDriverProcess
rather than overriding prepare
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, mostly just to mimic the prepare
function in webdriver_browser.dart. Like picking the port and starting the stderr/stdout listeners happens in prepare
rather than the spawnDriverProcess
. I suppose I could have just used the prepare
function rather that _startDriverProcess
. What would you suggest?
^^ I read the question wrong.
Yes, in webdriver_browser.dart prepare
, it sets the _driverProcess
to the result of spawnDriverProcess
, but we want to call spawnDriverProcess
and update _driverProcess
multiple times depending on the stderr from _driverProcess
. We could move the _startDriverProcess
to webdriver_browser.dart's prepare
, but I wasn't sure how other implementations of WebDriverBrowserEnvironment
are used so I thought it safer to make the logic exclusive to SafariMacOsEnvironment
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks for the clarification!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks again!
/// "Operation not permitted" error, kill the `safaridriver` process and try | ||
/// again with a different port. Wait [_waitBetweenRetryInSeconds] seconds | ||
/// between retries. Try up to [_maxRetryCount] times. | ||
Future<void> _startDriverProcess() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks for the clarification!
…139768) flutter/engine@82de334...6d9b2fb 2023-12-07 jason-simmons@users.noreply.github.com Revert Dart SDK back to be8a95b6717d (flutter/engine#48799) 2023-12-07 15619084+vashworth@users.noreply.github.com Retry when safaridriver fails (flutter/engine#48791) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from f49ec3e6c1b1 to b541f668f531 (2 revisions) (flutter/engine#48796) 2023-12-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Update clang revision from 00396e6a1a0b7 to b3a9e8f7c0afb00." (flutter/engine#48802) 2023-12-07 chinmaygarde@google.com Update clang revision from 00396e6a1a0b7 to b3a9e8f7c0afb00. (flutter/engine#48705) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from c68e050e9198 to f49ec3e6c1b1 (1 revision) (flutter/engine#48790) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from af998f66ae73 to c68e050e9198 (1 revision) (flutter/engine#48788) 2023-12-07 jason-simmons@users.noreply.github.com Reland "Replace use of Fontmgr::RefDefault with explicit creation calls" (flutter/engine#48764) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from 308f3d9bef2c to af998f66ae73 (1 revision) (flutter/engine#48784) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from 2b33ff5642c3 to 308f3d9bef2c (1 revision) (flutter/engine#48777) 2023-12-07 skia-flutter-autoroll@skia.org Roll Dart SDK from 4b22e6430c20 to b6d5e010d2c5 (1 revision) (flutter/engine#48776) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from 0753f680c573 to 2b33ff5642c3 (1 revision) (flutter/engine#48772) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from 0f1822e9137a to 0753f680c573 (1 revision) (flutter/engine#48771) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from dbcf508d1dce to 0f1822e9137a (1 revision) (flutter/engine#48769) 2023-12-07 skia-flutter-autoroll@skia.org Roll Dart SDK from be8a95b6717d to 4b22e6430c20 (1 revision) (flutter/engine#48768) 2023-12-07 skia-flutter-autoroll@skia.org Roll Skia from 8ebf43ba1c09 to dbcf508d1dce (1 revision) (flutter/engine#48766) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Starting `safaridriver` is flakey sometimes on macOS 13. It will occasionally error with "Operation not permitted". As a workaround, if it fails with that message, retry starting `safaridriver`. Fixes flutter/flutter#136972. Example of fix on macOS 13 bot: https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/564967/overview Note: The test is still failing due to flutter/flutter#136279, but you can see it first has error "Operation not permitted" and retries and connects on second attempt. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Starting
safaridriver
is flakey sometimes on macOS 13. It will occasionally error with "Operation not permitted". As a workaround, if it fails with that message, retry startingsafaridriver
.Fixes flutter/flutter#136972.
Example of fix on macOS 13 bot: https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/564967/overview
Note: The test is still failing due to flutter/flutter#136279, but you can see it first has error "Operation not permitted" and retries and connects on second attempt.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.