Skip to content

remove c++ based node internal dns module#6298

Merged
anonrig merged 1 commit intomainfrom
yagiz/remove-cpp-dns-module
Mar 14, 2026
Merged

remove c++ based node internal dns module#6298
anonrig merged 1 commit intomainfrom
yagiz/remove-cpp-dns-module

Conversation

@anonrig
Copy link
Member

@anonrig anonrig commented Mar 11, 2026

rust-backed-dns autogate has been fully rolled out.

Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

I'm Bonk, and I've done a quick review of your PR.

This PR removes the C++ DnsUtil class and its autogate guard, unconditionally using the Rust JSG-native DNS implementation.

Findings (ranked by severity):

  1. [MEDIUM] Stale //src/rust/dns dependency in node-core BUILD targetsrc/workerd/api/node/BUILD.bazel:78 still has //src/rust/dns in implementation_deps, but the only consumer (dns.c++) was deleted. The crate itself (src/rust/dns/lib.rs line 1) says: "This file is a somewhat duplicate of src/rust/api/dns.rs, and will be removed once autogate is unnecessary." That time is now. Remove the dep line and consider deleting src/rust/dns/ entirely.

  2. [LOW] Stale include in node.hsrc/workerd/api/node/node.h:21 still includes <workerd/util/autogate.h> but no longer references any autogate types after this change. Can be removed.

  3. [LOW] Dead autogate entryRUST_BACKED_NODE_DNS in src/workerd/util/autogate.h:32 and src/workerd/util/autogate.c++:28-29 has no remaining callers. Consider removing it in this PR or a follow-up.

This review was generated by an AI assistant and may contain inaccuracies.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 11, 2026

Review posted successfully on PR #6298. Here's a summary of the findings:

  1. [MEDIUM] Stale //src/rust/dns dependency in node-core BUILD target — the only consumer (dns.c++) was deleted, and the crate itself says it's a duplicate pending removal.
  2. [LOW] Stale #include <workerd/util/autogate.h> in node.h — no longer used after removing autogate checks.
  3. [LOW] Dead RUST_BACKED_NODE_DNS autogate entry in autogate.h and autogate.c++ — no remaining callers.

github run

@anonrig anonrig force-pushed the yagiz/remove-cpp-dns-module branch from a88eaff to c1c10ac Compare March 11, 2026 16:23
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.63%. Comparing base (e3e9c1c) to head (c1c10ac).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6298      +/-   ##
==========================================
- Coverage   70.64%   70.63%   -0.02%     
==========================================
  Files         420      418       -2     
  Lines      111649   111564      -85     
  Branches    18368    18368              
==========================================
- Hits        78880    78801      -79     
+ Misses      21800    21794       -6     
  Partials    10969    10969              

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

@anonrig anonrig requested a review from jasnell March 13, 2026 20:03
@anonrig anonrig marked this pull request as ready for review March 14, 2026 00:11
@anonrig anonrig requested review from a team as code owners March 14, 2026 00:11
@fhanau
Copy link
Contributor

fhanau commented Mar 14, 2026

optional, non-blocking: I assume the autogate itself will be removed in a follow-up?

@anonrig
Copy link
Member Author

anonrig commented Mar 14, 2026

optional, non-blocking: I assume the autogate itself will be removed in a follow-up?

Yes!

@anonrig anonrig merged commit 8869be1 into main Mar 14, 2026
35 of 36 checks passed
@anonrig anonrig deleted the yagiz/remove-cpp-dns-module branch March 14, 2026 00:29
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.

3 participants