dns: add tests for ENODATA states, fix failure on main#64624
Open
davidje13 wants to merge 1 commit into
Open
Conversation
This adds new tests to codify the existing behaviour of throwing ENODATA when there are no matching DNS records. It also updates an existing test which was broken by nodejs#64355 - previously requesting DNS records for a domain which has a CNAME to another domain, neither of which contain the requested type of record, would return an empty array. Since nodejs#64355, it will instead throw ENODATA. Finally, this updates the trigger for the relevant pipeline so that the internet tests will run if the cares_wrap.cc (and various other related files) are changed, which should reduce the chance of similar changes breaking main in the future. Refs: nodejs#64355 Signed-off-by: David Evans <davidje13@users.noreply.github.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64624 +/- ##
==========================================
- Coverage 90.14% 90.12% -0.03%
==========================================
Files 741 741
Lines 242076 242076
Branches 45558 45553 -5
==========================================
- Hits 218216 218160 -56
- Misses 15385 15436 +51
- Partials 8475 8480 +5 🚀 New features to boost your workflow:
|
guybedford
approved these changes
Jul 20, 2026
Ethan-Arrowood
approved these changes
Jul 21, 2026
Ethan-Arrowood
left a comment
Contributor
There was a problem hiding this comment.
Excellent work. I think this is a subtle but important change that we need to get resolved asap.
Contributor
|
The previous PR was just released in 26.6.0 release. |
Member
That is a proposal only and hasn't been released yet. cc @aduh95 |
bjohansebas
approved these changes
Jul 21, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds new tests to codify the existing behaviour of throwing ENODATA when there are no matching DNS records.
It also updates an existing test which was broken by #64355 (see the failing pipeline here: https://github.com/nodejs/node/actions/workflows/test-internet.yml)
Previously requesting DNS records for a domain which has a CNAME to another domain, neither of which contain the requested type of record, would return an empty array. Since #64355, it will instead throw ENODATA. This is a user-facing change which should perhaps be considered semver-major. I've asked for input from the original author/reviewers here.
The new tests in
test-dns.jshave been run against d6cd5c1 (the commit just before the breaking change) to confirm they represent the previous behaviour.Finally, this updates the trigger for the relevant pipeline so that the internet tests will run if the cares_wrap.cc (and various other related files) are changed, which should reduce the chance of similar changes breaking main in the future.