-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix retrying of SocketTimeoutExceptions in HttpConnector #9008
Fix retrying of SocketTimeoutExceptions in HttpConnector #9008
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.
LGTM. Thanks.
As part of investigation of #8974 I found that recent change 982e0b8 broke retries of `SocketTimeoutException` in `HttpConnector`, intention of that change was good but lack of tests resulted in broken logic. IntelliJ highlights the problem ? branch with `instanceof SocketTimeoutException` would have never been executed: <img width="764" alt="Screen Shot 2019-07-29 at 3 26 11 PM" src="https://user-images.githubusercontent.com/967132/62089179-d7bfa400-b21c-11e9-882a-1c1fe1fcb683.png"> --- This PR adds missing tests and fixes the logic to still present `SocketTimeoutException` as `IOException` for upstream consumers while handling it properly internally in the `HttpConnector`. Closes #9008. PiperOrigin-RevId: 261675244
As part of investigation of #8974 I found that recent change 982e0b8 broke retries of `SocketTimeoutException` in `HttpConnector`, intention of that change was good but lack of tests resulted in broken logic. IntelliJ highlights the problem ? branch with `instanceof SocketTimeoutException` would have never been executed: <img width="764" alt="Screen Shot 2019-07-29 at 3 26 11 PM" src="https://user-images.githubusercontent.com/967132/62089179-d7bfa400-b21c-11e9-882a-1c1fe1fcb683.png"> --- This PR adds missing tests and fixes the logic to still present `SocketTimeoutException` as `IOException` for upstream consumers while handling it properly internally in the `HttpConnector`. Closes #9008. PiperOrigin-RevId: 261675244
As part of investigation of #8974 I found that recent change 982e0b8 broke retries of `SocketTimeoutException` in `HttpConnector`, intention of that change was good but lack of tests resulted in broken logic. IntelliJ highlights the problem ? branch with `instanceof SocketTimeoutException` would have never been executed: <img width="764" alt="Screen Shot 2019-07-29 at 3 26 11 PM" src="https://user-images.githubusercontent.com/967132/62089179-d7bfa400-b21c-11e9-882a-1c1fe1fcb683.png"> --- This PR adds missing tests and fixes the logic to still present `SocketTimeoutException` as `IOException` for upstream consumers while handling it properly internally in the `HttpConnector`. Closes #9008. PiperOrigin-RevId: 261675244
the test you added in this PR seems to be flaky at time, for example see here: https://buildkite.com/bazel/bazel-bazel/builds/9795#175f3020-00fd-4163-bfc6-716f7eb94662 You can find the logs for the failed test in the "Artifacts" tab. The log always looks like this and it only seems to happen on Windows:
Do you have an idea what could cause this? I will deactivate the test temporarily while we're figuring this out. |
As part of investigation of #8974 I found that recent change 982e0b8 broke retries of
SocketTimeoutException
inHttpConnector
, intention of that change was good but lack of tests resulted in broken logic.IntelliJ highlights the problem — branch with
instanceof SocketTimeoutException
would have never been executed:This PR adds missing tests and fixes the logic to still present
SocketTimeoutException
asIOException
for upstream consumers while handling it properly internally in theHttpConnector
.