Skip to content

dym sdk: add network filter sdk for golang/cpp#44678

Merged
wbpcode merged 6 commits into
envoyproxy:mainfrom
wbpcode:dev-add-network-filter-support-to-go-cpp
Apr 29, 2026
Merged

dym sdk: add network filter sdk for golang/cpp#44678
wbpcode merged 6 commits into
envoyproxy:mainfrom
wbpcode:dev-add-network-filter-support-to-go-cpp

Conversation

@wbpcode
Copy link
Copy Markdown
Member

@wbpcode wbpcode commented Apr 27, 2026

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
@wbpcode wbpcode marked this pull request as draft April 27, 2026 15:10
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Apr 27, 2026

copilot is used to help develop this feature. Let's me review it carefully first.

@wbpcode wbpcode requested a review from Copilot April 28, 2026 01:03
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Apr 28, 2026

/gemini review

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Copy link
Copy Markdown
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 the Network Filter SDK for dynamic modules, providing support for both C++ and Go. It includes the necessary ABI implementations, interfaces for network buffers and filter handles, and a shared scheduler component. Integration tests have been updated to verify the SDK across C++, Go, and Rust. Feedback focuses on improving the robustness of the Go SetMetadata implementation by logging unsupported types and addressing a potential use-after-free risk in the C++ SDK by using std::shared_ptr for HTTP callout callbacks.

Comment thread source/extensions/dynamic_modules/sdk/go/abi/network.go
Comment thread source/extensions/dynamic_modules/sdk/cpp/sdk_internal_network.cc
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds dynamic-modules network filter SDK support for Go and C++, plus new multi-language integration test modules to validate core network-handle operations (read-disable, connection state, half-close, buffer limits).

Changes:

  • Introduces Go network filter shared APIs + Go ABI bridge for network filter callbacks.
  • Introduces C++ network SDK headers/impl plus C++ ABI bridge for network filters (and shared scheduler refactor).
  • Extends dynamic-modules network integration tests and adds Go/C++ test modules to the test data set.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/extensions/dynamic_modules/test_data/go/network_integration_test/network_integration_test.go New Go dynamic module implementing network-filter assertions for integration coverage.
test/extensions/dynamic_modules/test_data/go/BUILD Adds the new Go test module build target.
test/extensions/dynamic_modules/test_data/cpp/network_integration_test.cc New C++ dynamic module implementing network-filter assertions for integration coverage.
test/extensions/dynamic_modules/test_data/cpp/BUILD Adds the new C++ test module build target.
test/extensions/dynamic_modules/network/integration_test.cc Refactors test base + adds SDK-language parameterized network integration tests.
test/extensions/dynamic_modules/network/BUILD Wires new Go/C++ test modules into the network integration test.
source/extensions/dynamic_modules/sdk/go/shared/network_base.go Adds Go shared network handle/buffer/status types and interfaces.
source/extensions/dynamic_modules/sdk/go/shared/network_api.go Adds Go network filter/factory/config-factory interfaces + empty implementations.
source/extensions/dynamic_modules/sdk/go/sdk.go Adds Go registry and factory creation for network filters.
source/extensions/dynamic_modules/sdk/go/abi/network.go Implements Go ABI exports and host-callback wrappers for network filters.
source/extensions/dynamic_modules/sdk/cpp/sdk_network.h Adds C++ network filter SDK API surface and registry.
source/extensions/dynamic_modules/sdk/cpp/sdk_network.cc Implements C++ network filter registry plumbing.
source/extensions/dynamic_modules/sdk/cpp/sdk_internal_network.cc Implements C++ ABI exports/host-callback wrappers for network filters.
source/extensions/dynamic_modules/sdk/cpp/sdk_internal_common.h Shared templated scheduler implementation for SDK ABIs.
source/extensions/dynamic_modules/sdk/cpp/sdk_internal.cc Refactors HTTP scheduler impl to use shared template.
source/extensions/dynamic_modules/sdk/cpp/BUILD Updates SDK build targets to include network SDK and ABI sources.
source/extensions/dynamic_modules/BUILD Wires new Go shared/ABI sources into Bazel go_library targets.

Comment thread source/extensions/dynamic_modules/sdk/cpp/BUILD Outdated
Comment thread source/extensions/dynamic_modules/sdk/cpp/BUILD Outdated
Comment thread source/extensions/dynamic_modules/sdk/go/sdk.go Outdated
Comment thread source/extensions/dynamic_modules/sdk/go/abi/network.go Outdated
Comment thread test/extensions/dynamic_modules/network/BUILD
Comment thread test/extensions/dynamic_modules/network/integration_test.cc
wbpcode and others added 4 commits April 29, 2026 03:07
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: code <wbphub@gmail.com>
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
…github.com:443/wbpcode/envoy into dev-add-network-filter-support-to-go-cpp
@wbpcode wbpcode merged commit 2d83726 into envoyproxy:main Apr 29, 2026
29 checks passed
@wbpcode wbpcode deleted the dev-add-network-filter-support-to-go-cpp branch April 29, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants