Skip to content
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

[wptrunner] Report crash when WebDriver browser is not alive #45833

Merged

Conversation

jonathan-j-lee
Copy link
Contributor

@jonathan-j-lee jonathan-j-lee commented Apr 22, 2024

This aligns with how the base class TimedRunner differentiates CRASH from other failure modes.

An InvalidSessionIdException after a browser death when executing a testdriver action is now coerced to CRASH, not the generic INTERNAL-ERROR for harness exceptions.

Fixes #39617 and https://crbug.com/41485463.

This aligns with how the base class `TimedRunner` differentiates
`CRASH` from other failure modes [0].

An `InvalidSessionIdException` after a browser death (e.g., [1]) is now
coerced to `CRASH`, not the generic `INTERNAL-ERROR` for harness
exceptions.

Fixes web-platform-tests#39617 and https://crbug.com/41485463.

[0]: https://github.com/web-platform-tests/wpt/blob/c338ceff/tools/wptrunner/wptrunner/executors/base.py#L216-L231
[1]: https://github.com/web-platform-tests/wpt/blob/c338ceff/tools/wptrunner/wptrunner/executors/base.py#L773
@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review April 22, 2024 20:57
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Apr 22, 2024
Copy link
Contributor

@WeizhongX WeizhongX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@jonathan-j-lee jonathan-j-lee merged commit a883c77 into web-platform-tests:master Apr 22, 2024
33 checks passed
@jonathan-j-lee jonathan-j-lee deleted the wptrunner/cd-crash branch April 22, 2024 21:18
jonathan-j-lee added a commit to jonathan-j-lee/wpt that referenced this pull request Jun 4, 2024
This is a follow-up improvement to web-platform-tests#45833. `Protocol.is_alive()` should
handle a browser that's unable to even establish the low-level
transport. `OSError` is a sufficiently broad base exception, which
encompasses `socket.timeout`, `IOError`, and the `Connection*Error`
family.
KyleJu pushed a commit that referenced this pull request Jun 5, 2024
* [wptrunner] Mark WebDriver protocol as not alive if `OSError` raised

This is a follow-up improvement to #45833. `Protocol.is_alive()` should
handle a browser that's unable to even establish the low-level
transport. `OSError` is a sufficiently broad base exception, which
encompasses `socket.timeout`, `IOError`, and the `Connection*Error`
family.

* Coerce all `WebDriverException`s to not alive

* Update safari infrastructure expectation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WPT test harness crashes if test receives "unknown error" from WebDriver
4 participants