grpc: Add support for max frame length in gPRC frame decoding#32511
Merged
yanavlasov merged 9 commits intoenvoyproxy:mainfrom Mar 6, 2024
Merged
grpc: Add support for max frame length in gPRC frame decoding#32511yanavlasov merged 9 commits intoenvoyproxy:mainfrom
yanavlasov merged 9 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: tyxia <tyxia@google.com>
Member
Author
|
/assign @htuch PTAL, Thanks! |
Member
Author
|
/assign @yanavlasov Add Yan per offline discussion |
htuch
reviewed
Mar 1, 2024
yanavlasov
approved these changes
Mar 6, 2024
This was referenced Mar 6, 2024
mattjo
added a commit
to mattjo/envoy
that referenced
this pull request
Mar 6, 2024
* origin: (34 commits) update CODEOWNER (envoyproxy#32457) Delete unused runtime flag. (envoyproxy#32739) mobile: Use direct ByteBuffer to pass data between C++ and Java (envoyproxy#32715) quic: support cert selection by SNI, non-PEM formats (envoyproxy#32260) mobile: Replace std::thread with Envoy::Thread::PosixThread (envoyproxy#32610) grpc: Add support for max frame length in gPRC frame decoding (envoyproxy#32511) build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (envoyproxy#32728) build(deps): bump the examples-golang-network group in /examples/golang-network/simple with 1 update (envoyproxy#32732) build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 in /contrib/golang/filters/http/test/test_data/property (envoyproxy#32731) build(deps): bump otel/opentelemetry-collector from `246dfe9` to `71ac13c` in /examples/opentelemetry (envoyproxy#32730) build(deps): bump the examples-grpc-bridge group in /examples/grpc-bridge/server with 2 updates (envoyproxy#32720) build(deps): bump the contrib-golang group in /contrib/golang/router/cluster_specifier/test/test_data/simple with 1 update (envoyproxy#32721) build(deps): bump the contrib-golang group in /contrib/golang/filters/http/test/test_data/echo with 1 update (envoyproxy#32722) build(deps): bump the examples-ext-authz group in /examples/ext_authz/auth/grpc-service with 1 update (envoyproxy#32723) build(deps): bump the contrib-golang group in /contrib/golang/filters/http/test/test_data/routeconfig with 1 update (envoyproxy#32724) build(deps): bump the examples-load-reporting group in /examples/load-reporting-service with 1 update (envoyproxy#32726) build(deps): bump the contrib-golang group in /contrib/golang/filters/http/test/test_data/buffer with 1 update (envoyproxy#32727) build(deps): bump the examples-golang-http group in /examples/golang-http/simple with 1 update (envoyproxy#32729) opentelemetrytracer: Add User-Agent header to OTLP trace exporters (envoyproxy#32659) build: remove incorrect cc_library after tls code move (envoyproxy#32714) ...
htuch
pushed a commit
that referenced
this pull request
Mar 29, 2024
This PR is to improve the error status/code In PR #32511, we introduce a max_frame_length feature (optional) . Now gRPC frame decoding can fail EITHER (1) due to decoding error OR (2) due to over-frame-limit error. To better surface the error message, this PR refactor return type from bool to absl::status , so that the caller site can differentiate the error status. source/common/grpc/async_client_impl.cc in this PR can be an user example Risk level: Low Testing: Unit tests Signed-off-by: tyxia <tyxia@google.com>
alyssawilk
pushed a commit
to alyssawilk/envoy
that referenced
this pull request
Apr 29, 2024
This PR is to improve the error status/code In PR envoyproxy#32511, we introduce a max_frame_length feature (optional) . Now gRPC frame decoding can fail EITHER (1) due to decoding error OR (2) due to over-frame-limit error. To better surface the error message, this PR refactor return type from bool to absl::status , so that the caller site can differentiate the error status. source/common/grpc/async_client_impl.cc in this PR can be an user example Risk level: Low Testing: Unit tests Signed-off-by: tyxia <tyxia@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The workflow:
max_frame_lengthviasetMaxFrameLength()max_frame_lengthis configured and total length exceeds the limit, the future decoding process will be skipped and returnedThe use case/ motivation: Enable
max_receive_message_lengthin Envoy-gRPC (which use gRPC decoder) .Next step:
bool Decoder::decodemethod: Change the return type fromboolto absl:status so that the caller can identify whether it is decoding error or over-limit error.