-
Notifications
You must be signed in to change notification settings - Fork 180
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
mark recoverability of DNS errors correctly #1088
Conversation
This changes HTTP client to not retry on certain DNS errors. From the [list of possible DNS errors](https://github.com/JuliaLang/julia/blob/ec8df3da3597d0acd503ff85ac84a5f8f73f625b/stdlib/Sockets/src/addrinfo.jl#L108-L112) only EAI_AGAIN may be recoverable. This also changes the error code comparison to use `UV_EAI_AGAIN`, because that is what a [DNSError instance would contain](https://github.com/JuliaLang/julia/blob/ec8df3da3597d0acd503ff85ac84a5f8f73f625b/stdlib/Sockets/src/addrinfo.jl#L108-L112).
Codecov Report
@@ Coverage Diff @@
## master #1088 +/- ##
==========================================
- Coverage 82.33% 82.32% -0.02%
==========================================
Files 32 32
Lines 3040 3043 +3
==========================================
+ Hits 2503 2505 +2
- Misses 537 538 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
can we add a test please? |
We had faced this in a likely stressed condition in our application. I was testing this with a modified julia binary to artificially throw the DNS error. I found it hard to replicate the error otherwise. I could add a unit test for |
@nickrobinson251 Actually I think I can add some relevant tests. And I also missed out some more changes to |
Thanks!
yeah, i think unit tests would be helpful |
Added some tests for `isrecoverable`, particularly for DNS errors. Added a test for one of the new behaviors, i.e. EAI_NONAME is not retried. ref: #1088
Added some tests for `isrecoverable`, particularly for DNS errors. Added a test for one of the new behaviors, i.e. EAI_NONAME is not retried. If EAI_EAGAIN is thrown requests are retried. ref: #1088
Added some tests for `isrecoverable`, particularly for DNS errors. Added a test for one of the new behaviors, i.e. EAI_NONAME is not retried. If EAI_EAGAIN is thrown requests are retried. ref: #1088
This changes HTTP client to not retry on certain DNS errors. From the list of possible DNS errors only EAI_AGAIN may be recoverable. This also changes the error code comparison to use
UV_EAI_AGAIN
, because that is what a DNSError instance would contain.fixes: #1085