dym sdk: add network filter sdk for golang/cpp#44678
Conversation
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
|
copilot is used to help develop this feature. Let's me review it carefully first. |
|
/gemini review |
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
… dev-add-network-filter-support-to-go-cpp
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
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:]