Skip to content

dns: add tests for ENODATA states, fix failure on main - #64624

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
davidje13:dns-regression-fix
Jul 24, 2026
Merged

dns: add tests for ENODATA states, fix failure on main#64624
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
davidje13:dns-regression-fix

Conversation

@davidje13

Copy link
Copy Markdown
Contributor

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.js have 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.

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>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-botnodejs-github-bot added meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. labels Jul 20, 2026
@codecov

codecovBot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (00917ba) to head (8cd52f8).
⚠️ Report is 49 commits behind head on main.

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 

see 27 files with indirect coverage changes

🚀 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.

@Ethan-ArrowoodEthan-Arrowood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work. I think this is a subtle but important change that we need to get resolved asap.

@Ethan-Arrowood

Copy link
Copy Markdown
Contributor

The previous PR was just released in 26.6.0 release.

@richardlau

Copy link
Copy Markdown
Member

The previous PR was just released in 26.6.0 release.

That is a proposal only and hasn't been released yet. cc @aduh95

@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. labels Jul 21, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 21, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@pimterrypimterry added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 24, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 24, 2026
@nodejs-github-bot
nodejs-github-bot merged commit c558c8e into nodejs:mainJul 24, 2026
96 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in c558c8e

@davidje13
davidje13 deleted the dns-regression-fix branch July 24, 2026 10:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.dont-land-on-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.dont-land-on-v24.xPRs that should not land on the v24.x-staging branch and should not be released in v24.x.dont-land-on-v26.xPRs that should not land on the v26.x-staging branch and should not be released in v26.x.metaIssues and PRs related to the general management of the project.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@davidje13@nodejs-github-bot@Ethan-Arrowood@richardlau@guybedford@pimterry@bjohansebas@aduh95