[client] Surface DNS forwarder upstream failures via Extended DNS Errors#6441
[client] Surface DNS forwarder upstream failures via Extended DNS Errors#6441lixmal wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughAdds two shared helpers ( ChangesEDNS/EDE shared helpers, forwarder attachment, and interceptor propagation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/internal/dnsfwd/forwarder_test.go`:
- Around line 654-697: The test sets up mock expectations on mockResolver with
the On() call for LookupNetIP but never verifies those expectations were
actually met during test execution. After the assertions on the written response
(after the ExtraText checks), add an assertion to verify that the mockResolver
met its expected calls using the standard testify mock assertion method. This
ensures that call-path regressions where the resolver is not called as expected
will be caught by the test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bd6ccc8e-a009-48f2-8564-bb4ed47c29f1
📒 Files selected for processing (7)
client/internal/dns/resutil/resolve.goclient/internal/dns/resutil/resolve_test.goclient/internal/dns/upstream.goclient/internal/dns/upstream_test.goclient/internal/dnsfwd/forwarder.goclient/internal/dnsfwd/forwarder_test.goclient/internal/routemanager/dnsinterceptor/handler.go
💤 Files with no reviewable changes (1)
- client/internal/dns/upstream_test.go
f7f528c to
c4337f4
Compare
Release artifactsBuilt for PR head
GHCR images (amd64)
This comment is updated by the Release workflow. Artifact links expire according to the workflow retention policy. |
|



Describe your changes
When a domain route's DNS forwarder fails to resolve a query, the client only saw a bare SERVFAIL and had to cross-reference the routing peer's logs to learn why. This attaches an Extended DNS Error (RFC 8914) to forwarder failure responses describing the class of failure, and surfaces it on the querying client so the cause is visible in one place.
Issue ticket number and link
Stack
Checklist
Documentation
Select exactly one:
Internal diagnostic surfaced in client trace logs; no user-facing configuration or API change.
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__
Summary by CodeRabbit
New Features
Refactor
Tests