Skip to content

dns: add a new RUST-based DNS resolver extension#44090

Open
agrawroh wants to merge 1 commit intoenvoyproxy:mainfrom
agrawroh:feat-hick-dns
Open

dns: add a new RUST-based DNS resolver extension#44090
agrawroh wants to merge 1 commit intoenvoyproxy:mainfrom
agrawroh:feat-hick-dns

Conversation

@agrawroh
Copy link
Member

@agrawroh agrawroh commented Mar 23, 2026

Description

This PR adds a new RUST-based DNS resolver extension to Envoy.


Commit Message: dns: add a new RUST-based DNS resolver extension
Additional Description: Added a new RUST-based DNS resolver extension to Envoy.
Risk Level: Low
Testing: Added Tests
Docs Changes: Added
Release Notes: Added

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #44090 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the feat-hick-dns branch 3 times, most recently from e720a35 to fd827fd Compare March 23, 2026 17:58
@agrawroh agrawroh marked this pull request as ready for review March 23, 2026 20:43
@repokitteh-read-only repokitteh-read-only bot added api deps Approval required for changes to Envoy's external dependencies labels Mar 23, 2026
@agrawroh
Copy link
Member Author

/gemini review

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @moderation

🐱

Caused by: #44090 was ready_for_review by agrawroh.

see: more, trace.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Rust-based DNS resolver extension, Hickory, which is a great addition. The implementation is comprehensive, including the core logic in Rust, the C++ shell, ABI definitions, build system changes, documentation, and tests.

My review has identified two main issues:

  1. A large, unrelated Tracer ABI definition has been included in source/extensions/dynamic_modules/abi/abi.h. This should be removed.
  2. There's a bug in the DNS-over-HTTPS configuration logic in the Rust implementation that prevents using hostnames in DoH URLs.

Apart from these points, the changes look solid. The C++ shell and Rust SDK are well-designed for thread safety and proper resource management.

@agrawroh
Copy link
Member Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Rust-based DNS resolver extension, Hickory, to Envoy. This is a substantial and well-executed feature, including a new dynamic module ABI for DNS resolvers, a Rust SDK for this ABI, the C++ shell for the extension, and the Rust implementation of the resolver logic. The code is well-structured, documented, and comes with comprehensive unit and integration tests. My review identified a critical issue in the new Rust SDK module where FFI functions are not panic-safe. Panics from user code could unwind across the FFI boundary, leading to undefined behavior and process crashes. I have provided comments with code suggestions to wrap the FFI calls with catch_unwind to ensure safety, consistent with other parts of the dynamic module SDK.

@agrawroh agrawroh force-pushed the feat-hick-dns branch 2 times, most recently from b5cc9d9 to 377e75f Compare March 24, 2026 06:25
@agrawroh
Copy link
Member Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Rust-based DNS resolver, Hickory, as a dynamic module. This is a significant and well-executed addition, providing modern DNS features like DNS-over-TLS, DNS-over-HTTPS, and DNSSEC. The implementation is thoughtfully split between a C++ shell and a Rust module, communicating via a new, well-documented DNS resolver ABI. The changes are extensive, touching API definitions, build systems, documentation, and adding new implementation and test files. The C++/Rust interaction, particularly the threading and shutdown logic, appears robust. The tests are comprehensive, covering both unit and integration scenarios. I have one suggestion to enhance configuration validation in the Rust module.

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api deps Approval required for changes to Envoy's external dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants