-
Notifications
You must be signed in to change notification settings - Fork 441
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
always retry on DNS error response from name server #1526
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
- Coverage 83.55% 83.47% -0.08%
==========================================
Files 171 171
Lines 16879 16896 +17
==========================================
Hits 14103 14103
- Misses 2776 2793 +17 |
I'm not aware of anything with
I can't think of a reason why moving RetryDnsHandle into |
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.
This all looks good to me.
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.
Looks pretty good to me, though I still have some suggestions for improvements.
Also, clippy is complaining on the latest commit but it's unrelated to these changes, so maybe that can be resolved in a separate change. |
Ok, after writing an integration test and doing some investigation, it appears that I had some misconceptions about retry behavior. I thought that the "fallback" behavior that I'm trying to modify was performed by So, my changes to
Sorry about the thrash, let me know what you think. |
4412b87
to
fc339bc
Compare
Also, you were right @bluejekyll, only the lower 4 bits of the response code were being set in the header. This wasn't caught for the other errors that use more than 4 bits because when truncated they ended being retryable errors as well; BADMODE ( I've removed all the errors that require EDNS from that test. |
This makes sense to me. 👍 |
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.
This all looks good. I think there are possibly some error codes that we're over-correcting for, like YXRRSET, which I think is only relevant to dynamic DNS if I remember correctly, but since this is the resolver, I think that's fine.
Thanks for catching the area where this change was needed. I haven't looked at this code in depth in a while, so I missed that nuance between the retry_dns_handle and name_server_pool. Nice work!
The cleanliness target failing here should be resolved in #1527 |
4199b3c
to
724ddff
Compare
OK, sounds good. That makes sense.
NP, thanks! |
I've updated a relevant doc comment and the PR you mentioned @bluejekyll did resolve the cleanliness target, so if this looks good it should be ready to merge. (I think maybe the low code coverage stat for the diff is a red herring because the test coverage for the diff is added in a different crate— |
Also, I was wondering: what is the process/cadence/criteria for putting out a new point release? We were hoping in Fuchsia to be able to pull in this change relatively soon, without having to diverge from upstream. Could I file an issue to tag a v0.20.4 release? |
I was planning to cut an alpha release of 0.21.0, I was actually waiting for this PR to land for that. Do you need this to be in a 0.20.0 release? That would require a backport from main to the 0.20 branch at this point (there are some API diffs in main that require a 0.21 version bump. |
Ah gotcha, I didn't realize that. Could you point me to the API changes between v0.20.x and v0.21.0? |
@peterthejohnston, I need to review all the PR's that landed, and add a few more, but this is what I had collected so far: https://github.com/bluejekyll/trust-dns/blob/main/CHANGELOG.md#0210-unreleased |
And thank you for getting this PR in! |
This PR makes the two changes proposed in #1519:
I do have two outstanding questions:
ResponseCode::BADMODE
does not lead to a retry in this this test. Any idea what's going on here, or whetherResponseCode::BADMODE
has some kind of special treatment I'm unaware of?RetryDnsHandle
from the trust-dns-proto crate there.resolves #1519