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

[browserperfdash-benchmark] Fix error logging from server after 251530@main #1989

Merged
merged 1 commit into from Jul 1, 2022

Conversation

clopez
Copy link
Contributor

@clopez clopez commented Jul 1, 2022

c0299cc

[browserperfdash-benchmark] Fix error logging from server after 251530@main
https://bugs.webkit.org/show_bug.cgi?id=242242

Reviewed by Adrian Perez de Castro.

After porting to Python3 on 251530@main (r295525) the script not longer logs
in stderr the reply from the server when this replies with an error. It only
logs a generic exception.

This is caused because urllib.request.urlopen on Python3 always raises an
exception when the http server reply is different from 200.
This patch wraps the call to return the HTTPError object instead of raising
the exception. This HTTPError object can be used later as an HTTPResponse one,
so we can read the reply from the server and log it.

* Tools/Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:
(BrowserPerfDashRunner):
(BrowserPerfDashRunner._send_post_request_data):
(BrowserPerfDashRunner._upload_result):

Canonical link: https://commits.webkit.org/252040@main

@clopez clopez requested a review from JonWBedard as a code owner July 1, 2022 12:02
@clopez clopez self-assigned this Jul 1, 2022
@clopez clopez added Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases WebKit Nightly Build labels Jul 1, 2022
@clopez clopez requested a review from aperezdc July 1, 2022 12:03
Copy link
Contributor

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

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

@clopez r=me with nits for a couple of types in the comments; please take a look at them before landing.

@clopez clopez force-pushed the bug-242242 branch 2 times, most recently from c08c026 to a9b5941 Compare July 1, 2022 14:30
@clopez
Copy link
Contributor Author

clopez commented Jul 1, 2022

Thanks!

@clopez clopez added the merge-queue Applied to send a pull request to merge-queue label Jul 1, 2022
…0@main

https://bugs.webkit.org/show_bug.cgi?id=242242

Reviewed by Adrian Perez de Castro.

After porting to Python3 on 251530@main (r295525) the script not longer logs
in stderr the reply from the server when this replies with an error. It only
logs a generic exception.

This is caused because urllib.request.urlopen on Python3 always raises an
exception when the http server reply is different from 200.
This patch wraps the call to return the HTTPError object instead of raising
the exception. This HTTPError object can be used later as an HTTPResponse one,
so we can read the reply from the server and log it.

* Tools/Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:
(BrowserPerfDashRunner):
(BrowserPerfDashRunner._send_post_request_data):
(BrowserPerfDashRunner._upload_result):

Canonical link: https://commits.webkit.org/252040@main
@webkit-commit-queue
Copy link
Collaborator

Committed 252040@main (c0299cc): https://commits.webkit.org/252040@main

Reviewed commits have been landed. Closing PR #1989 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit c0299cc into WebKit:main Jul 1, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
4 participants