Skip to content

Minor fixes to the dns server for the pool.#563

Open
davidv1992 wants to merge 1 commit into
mainfrom
fixup-dns-server
Open

Minor fixes to the dns server for the pool.#563
davidv1992 wants to merge 1 commit into
mainfrom
fixup-dns-server

Conversation

@davidv1992
Copy link
Copy Markdown
Member

Ensures the global region is always present, that we only include suitable servers, and that we properly present the servers at the _ntske._tcp subdomain.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 28.81356% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.97%. Comparing base (35d7279) to head (46fa333).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
nts-pool-dns/src/geo_handler.rs 28.81% 42 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   70.15%   69.97%   -0.18%     
==========================================
  Files          69       69              
  Lines       14856    14912      +56     
==========================================
+ Hits        10422    10435      +13     
- Misses       4434     4477      +43     
Flag Coverage Δ
beta 70.21% <28.81%> (-0.14%) ⬇️
fuzz 59.79% <ø> (ø)
fuzz-client_request 34.70% <ø> (ø)
fuzz-key_exchange_response 41.00% <ø> (+0.45%) ⬆️
fuzz-record 35.28% <ø> (ø)
fuzz-server_information_response 24.97% <ø> (ø)
msrv 69.86% <28.81%> (-0.21%) ⬇️
stable 70.21% <28.81%> (-0.18%) ⬇️
test 69.92% <28.81%> (-0.18%) ⬇️
x86_64-unknown-linux-gnu 69.92% <28.81%> (-0.18%) ⬇️
x86_64-unknown-linux-musl 70.18% <28.81%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidv1992 davidv1992 linked an issue May 19, 2026 that may be closed by this pull request
Ensures the global region is always present, that we only include
suitable servers, and that we properly present the servers at the
_ntske._tcp subdomain.
let mut regions = HashMap::new();

for server in &servers {
if !(server.ipv4_capable.unwrap_or(true) || server.ipv6_capable.unwrap_or(true))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer this to read

Suggested change
if !(server.ipv4_capable.unwrap_or(true) || server.ipv6_capable.unwrap_or(true))
if !server.ipv4_capable.unwrap_or(true) && !server.ipv6_capable.unwrap_or(true)

The DeMorganization that needs to happen to understand the original formula in combination with 'unwrap_or(true)' gives a kind of double-negation shortcircuit in my brain.

Or perhaps even more clear, this could read:

            if server.ipv4_capable == Some(false) && server.ipv6_capable == Some(false)

@squell
Copy link
Copy Markdown
Member

squell commented May 21, 2026

Note: also needs a cargo fmt run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serve SRV records under the proper service name.

2 participants