From 62173fc92f0838ff49e14ac8fc9c4e7db093c820 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 24 Jun 2025 11:51:11 +0900 Subject: [PATCH] Updates Envoy to the latest Signed-off-by: Takeshi Yoneda --- Dockerfile | 2 +- ENVOY_VERSION | 2 +- README.md | 4 ++-- go/gosdk/abi.go | 28 +++++++++++++++++++++++++--- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9aaee8..1e01cfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ RUN CC="zig cc -target aarch64-linux-gnu" CXX="zig c++ -target aarch64-linux-gnu RUN CC="zig cc -target x86_64-linux-gnu" CXX="zig c++ -target x86_64-linux-gnu" CGO_ENABLED=1 GOARCH=amd64 go build -buildmode=c-shared -o /build/amd64_libgo_module.so . ##### Build the final image ##### -FROM envoyproxy/envoy-dev:5b88f941da971de57f29286103c20770811ec67f AS envoy +FROM envoyproxy/envoy-dev:73fe00fc139fd5053f4c4a5d66569cc254449896 AS envoy ARG TARGETARCH ENV ENVOY_DYNAMIC_MODULES_SEARCH_PATH=/usr/local/lib COPY --from=rust_builder /build/${TARGETARCH}_librust_module.so /usr/local/lib/librust_module.so diff --git a/ENVOY_VERSION b/ENVOY_VERSION index 72767ab..1fd1531 100644 --- a/ENVOY_VERSION +++ b/ENVOY_VERSION @@ -1 +1 @@ -5b88f941da971de57f29286103c20770811ec67f \ No newline at end of file +73fe00fc139fd5053f4c4a5d66569cc254449896 \ No newline at end of file diff --git a/README.md b/README.md index 6890019..3530ea0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dynamic Modules Examples -> Envoy Version: [5b88f941da971de57f29286103c20770811ec67f] v1.34 +> Envoy Version: [73fe00fc139fd5053f4c4a5d66569cc254449896] v1.35-dev > > Since dynamic modules are tied with a specific Envoy version, this repository is based on the specific commit of Envoy. > For examples for a specific Envoy version, please check out `release/v` branch, e.g. [`release/v1.34`](https://github.com/envoyproxy/dynamic-modules-examples/tree/release/v1.34). @@ -87,6 +87,6 @@ If you want to explicitly specify the docker image, use `ENVOY_IMAGE` environmen ENVOY_IMAGE=foo-bar-image:latest go test . -v -count=1 ``` -[5b88f941da971de57f29286103c20770811ec67f]: https://github.com/envoyproxy/envoy/tree/5b88f941da971de57f29286103c20770811ec67f +[73fe00fc139fd5053f4c4a5d66569cc254449896]: https://github.com/envoyproxy/envoy/tree/73fe00fc139fd5053f4c4a5d66569cc254449896 [Envoy]: https://github.com/envoyproxy/envoy [High Level Doc]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/dynamic_modules diff --git a/go/gosdk/abi.go b/go/gosdk/abi.go index 3eee6ae..75c2063 100644 --- a/go/gosdk/abi.go +++ b/go/gosdk/abi.go @@ -3,7 +3,7 @@ package gosdk // Following is a distillation of the Envoy ABI for dynamic modules: -// https://github.com/envoyproxy/envoy/blob/5b88f941da971de57f29286103c20770811ec67f/source/extensions/dynamic_modules/abi.h +// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi.h // // Why not using the header file directly? That is because Go runtime complains // about passing pointers to C code on the boundary. In the following code, we replace @@ -136,8 +136,8 @@ import ( "unsafe" ) -// https://github.com/envoyproxy/envoy/blob/5b88f941da971de57f29286103c20770811ec67f/source/extensions/dynamic_modules/abi_version.h -var version = append([]byte("0874b1e9587ef1dbd355ffde32f3caf424cb819df552de4833b2ed5b8996c18b"), 0) +// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi_version.h +var version = append([]byte("cb17cd829c177bc6b75a920283a3347b90d5aaa4d5e723eaa33bad31c8c5b9a9"), 0) //export envoy_dynamic_module_on_program_init func envoy_dynamic_module_on_program_init() uintptr { @@ -255,6 +255,28 @@ func envoy_dynamic_module_on_http_filter_response_trailers(uintptr, uintptr) uin func envoy_dynamic_module_on_http_filter_stream_complete(uintptr, uintptr) { } +//export envoy_dynamic_module_on_http_filter_http_callout_done +func envoy_dynamic_module_on_http_filter_http_callout_done( + filterEnvoyPtr uintptr, + filterModulePtr uintptr, + calloutID C.uint32_t, + result C.uint32_t, + headersPtr uintptr, + headersSize C.size_t, + bodyVectorPtr uintptr, + bodyVectorSize C.size_t, +) { + panic("TODO") +} + +//export envoy_dynamic_module_on_http_filter_scheduled +func envoy_dynamic_module_on_http_filter_scheduled( + filterEnvoyPtr uintptr, + filterModulePtr uintptr, + eventID C.uint64_t) { + panic("TODO") +} + // GetRequestHeader implements [EnvoyHttpFilter]. func (e envoyFilter) GetRequestHeader(key string) (string, bool) { keyPtr := uintptr(unsafe.Pointer(unsafe.StringData(key))) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d24f535..286513a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -90,7 +90,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "envoy-proxy-dynamic-modules-rust-sdk" version = "0.1.0" -source = "git+https://github.com/envoyproxy/envoy?rev=5b88f941da971de57f29286103c20770811ec67f#5b88f941da971de57f29286103c20770811ec67f" +source = "git+https://github.com/envoyproxy/envoy?rev=73fe00fc139fd5053f4c4a5d66569cc254449896#73fe00fc139fd5053f4c4a5d66569cc254449896" dependencies = [ "bindgen", "mockall", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 54e37b2..1f75961 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/envoyproxy/dynamic-modules-example" [dependencies] # The SDK version must match the Envoy version due to the strict compatibility requirements. -envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "5b88f941da971de57f29286103c20770811ec67f" } +envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "73fe00fc139fd5053f4c4a5d66569cc254449896" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" rand = "0.9.0"