-
-
Notifications
You must be signed in to change notification settings - Fork 628
Open
Description
Problem
The Boulder bdns
package currently uses the net.Error.Temporary()
method to determine if DNS query failures should be retried. However, according to golang/go#45729, the Temporary()
method is deprecated because its meaning is poorly defined, mostly redundant with Timeout()
, and its exceptions are surprising or not useful. Go recommends not using Temporary()
for retry logic.
Affected Code
- The main retry logic in
bdns/dns.go
(see insideexchangeOne
) relies onTemporary()
to decide if a DNS or DoH query should be retried with another resolver. - Several tests in
bdns/dns_test.go
and test mocks implement theTemporary()
method for error types, which should be updated to reflect the deprecation and changed logic.
Proposed Solution
- Refactor
bdns/dns.go
to remove the usage ofTemporary()
. - Switch retry logic to rely on
Timeout()
and/or explicit error types that are well understood and documented. - Update all affected test cases and mocks to use the new error handling approach.
References
Metadata
Metadata
Assignees
Labels
No labels