Skip to content

Commit 7a0481a

Browse files
committed
catch up the latest Envoy
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
1 parent 43d5198 commit 7a0481a

7 files changed

Lines changed: 31 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ jobs:
5353
FULL_ENVOY_VERSION=${ENVOY_API_VERSION}.0
5454
if [[ $ENVOY_API_VERSION == dev ]]; then
5555
# update this once there are more breaking changes
56-
FULL_ENVOY_VERSION=1.32.1-0.20241112025658-4fd9bb670eeb
57-
# This is the envoy:contrib-dev image pull in 2024-11-12.
56+
FULL_ENVOY_VERSION=1.33.1-0.20250411033243-86ca8d764bbd
57+
# This is the envoy:contrib-dev image pull in 2025-04-11.
5858
# Use docker inspect --format='{{index .RepoDigests 0}}' envoyproxy/envoy:contrib-dev to get the sha256 ID.
5959
# We don't use the envoy:contrib-dev tag directly because it will be rewritten by the latest commit and
6060
# our test suite uses IfPresent policy to pull image.
6161
# We don't use the CI to catch the breaking change from the upstream so far.
62-
export PROXY_IMAGE=envoyproxy/envoy@sha256:0eec2cbd45c2055ea37c2321e8b83f6907a95e98c250492b48ad9dab6a20a8cb
62+
export PROXY_IMAGE=envoyproxy/envoy@sha256:2e1202c7b0bc3694a8d4a4b642888602deab77ec1bf54cb8569184112b5c0ab3
6363
echo PROXY_IMAGE=$PROXY_IMAGE >> $GITHUB_ENV
6464
fi
6565
pushd ..

api/pkg/filtermanager/api/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ type StreamFilterCallbacks interface {
210210
// * ErrSerializationFailure (Currently, fetching attributes in List/Map type are unsupported)
211211
// * ErrValueNotFound
212212
GetProperty(key string) (string, error)
213+
// TODO: add SecretManager
214+
213215
// ClearRouteCache clears the route cache for the current request, and filtermanager will re-fetch the route in the next filter.
214216
// Please be careful to invoke it, since filtermanager will raise an 404 route_not_found response when failed to re-fetch a route.
215217
ClearRouteCache()
@@ -254,6 +256,8 @@ type FilterProcessCallbacks interface {
254256
// For example, turn a headers only request into a request with a body, add more body when processing trailers, and so on.
255257
// The second argument isStreaming supplies if this caller streams data or buffers the full body.
256258
AddData(data []byte, isStreaming bool)
259+
// InjectData inject the content of slice data via Envoy StreamXXFilterCallbacks's injectXXDataToFilterChaininjectData.
260+
InjectData(data []byte)
257261

258262
// hide Continue() method from the user
259263
}

api/pkg/filtermanager/api_impl_129.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func (cb *filterManagerCallbackHandler) AddData([]byte, bool) {
4141
api.LogErrorf("AddData is not implemented: %s", debug.Stack())
4242
}
4343

44+
func (cb *filterManagerCallbackHandler) InjectData([]byte) {
45+
api.LogErrorf("InjectData is not implemented: %s", debug.Stack())
46+
}
47+
4448
func (cb *filterManagerCallbackHandler) DecoderFilterCallbacks() api.DecoderFilterCallbacks {
4549
return cb
4650
}

api/pkg/filtermanager/api_impl_131_132.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,41 @@ func (cb *filterManagerCallbackHandler) RefreshRouteCache() {
2828
api.LogErrorf("RefreshRouteCache is not implemented: %s", debug.Stack())
2929
}
3030

31+
type commonFilterCallbackHandlerWrapper struct {
32+
}
33+
34+
func (w *commonFilterCallbackHandlerWrapper) AddData([]byte, bool) {
35+
api.LogErrorf("AddData is not implemented: %s", debug.Stack())
36+
}
37+
38+
func (w *commonFilterCallbackHandlerWrapper) InjectData([]byte) {
39+
api.LogErrorf("InjectData is not implemented: %s", debug.Stack())
40+
}
41+
3142
type decoderFilterCallbackHandlerWrapper struct {
43+
commonFilterCallbackHandlerWrapper
44+
3245
capi.DecoderFilterCallbacks
3346
}
3447

3548
func NewDecoderFilterCallbackHandlerWrapper(h capi.DecoderFilterCallbacks) api.DecoderFilterCallbacks {
3649
return &decoderFilterCallbackHandlerWrapper{DecoderFilterCallbacks: h}
3750
}
3851

39-
func (w *decoderFilterCallbackHandlerWrapper) AddData([]byte, bool) {
40-
api.LogErrorf("AddData is not implemented: %s", debug.Stack())
41-
}
42-
4352
func (cb *filterManagerCallbackHandler) DecoderFilterCallbacks() api.DecoderFilterCallbacks {
4453
return NewDecoderFilterCallbackHandlerWrapper(cb.FilterCallbackHandler.DecoderFilterCallbacks())
4554
}
4655

4756
type encoderFilterCallbackHandlerWrapper struct {
57+
commonFilterCallbackHandlerWrapper
58+
4859
capi.EncoderFilterCallbacks
4960
}
5061

5162
func NewEncoderFilterCallbackHandlerWrapper(h capi.EncoderFilterCallbacks) api.EncoderFilterCallbacks {
5263
return &encoderFilterCallbackHandlerWrapper{EncoderFilterCallbacks: h}
5364
}
5465

55-
func (w *encoderFilterCallbackHandlerWrapper) AddData([]byte, bool) {
56-
api.LogErrorf("AddData is not implemented: %s", debug.Stack())
57-
}
58-
5966
func (cb *filterManagerCallbackHandler) EncoderFilterCallbacks() api.EncoderFilterCallbacks {
6067
return NewEncoderFilterCallbackHandlerWrapper(cb.FilterCallbackHandler.EncoderFilterCallbacks())
6168
}

api/pkg/plugins/type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ type GoPlugin interface {
177177
Plugin
178178

179179
Factory() api.FilterFactory
180+
// TODO: add Destroy() support
180181
}
181182

182183
type ConsumerPlugin interface {

api/plugins/tests/pkg/envoy/capi.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,9 @@ func (i *filterCallbackHandler) RefreshRouteCache() {
564564
func (i *filterCallbackHandler) AddData([]byte, bool) {
565565
}
566566

567+
func (i *filterCallbackHandler) InjectData([]byte) {
568+
}
569+
567570
func (i *filterCallbackHandler) LookupConsumer(_, _ string) (api.Consumer, bool) {
568571
return nil, false
569572
}

patch/switch-envoy-go-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [[ "$envoy_version" =~ ^1\.32\.[0-9]+$ ]]; then
3535
exit 0
3636
fi
3737

38-
if [[ ! "$envoy_version" =~ ^1\.(29|31|32)\. ]]; then
38+
if [[ ! "$envoy_version" =~ ^1\.(29|31|32|33)\. ]]; then
3939
echo "Unsupported envoy version $envoy_version"
4040
exit 1
4141
fi

0 commit comments

Comments
 (0)