• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 27371927599
61%

Build:
DEFAULT BRANCH: main
Ran 11 Jun 2026 07:26PM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jun 2026 07:24PM UTC coverage: 61.249% (-0.5%) from 61.719%
27371927599

push

github

rm-hull
fix: resolve cache hit ratio regression when ECS is enabled

The DNS cache hit ratio dropped to zero when EDNS0 Client Subnet (ECS) was enabled because of a key mismatch in the upstream resolution logic.

In resolveUpstream, the dispatcher was using the subnet-aware cache key (which includes the client subnet) to retrieve answers from the local answerMap. However, the answerMap was populated using subnet-neutral keys (domain and type only). This resulted in cache lookups within resolveUpstream always failing, meaning d.cache.Set was never called and no responses were cached.

This commit fixes the issue by:
- Using a subnet-neutral key for lookups in the answerMap within resolveUpstream.
- Continuing to use the subnet-aware key when storing the results in the DNS cache to maintain location-aware caching.
- Adding TestDNSDispatcher_HandleDNSRequest_CacheHit_ECS to internal/forwarder/dispatcher_test.go to prevent this regression.
- Improving mockIPResponseWriter in tests to include the WrittenMsg field for easier assertion of response contents.

4 of 4 new or added lines in 1 file covered. (100.0%)

11 existing lines in 1 file now uncovered.

1383 of 2258 relevant lines covered (61.25%)

780.45 hits per line

Coverage Regressions

Lines Coverage ∆ File
11
58.06
-3.23% internal/app.go
Jobs
ID Job ID Ran Files Coverage
1 27371927599.1 11 Jun 2026 07:26PM UTC 32
61.25
GitHub Action Run
Source Files on build 27371927599
  • Tree
  • List 32
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 90b67c9d on github
  • Prev Build on main (#27327786522)
  • Next Build on main (#27428821560)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc