grpc: Refactor decode method#32676
Merged
htuch merged 19 commits intoenvoyproxy:mainfrom Mar 29, 2024
Merged
Conversation
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
…codec_client Signed-off-by: tyxia <tyxia@google.com>
Member
Author
|
/assign @yanavlasov @htuch |
yanavlasov
reviewed
Mar 8, 2024
Member
Author
Thank for review! This PR is ready for review. (I just temporarily marked it as draft to prioritize my other outstanding PRs, as this pr is for status code improvement) I will reopen this PR once the other gRPC change is merged |
Signed-off-by: tyxia <tyxia@google.com>
Member
Author
|
/retest |
Member
Author
|
/wait Add release note before submission |
Member
Author
|
/retest |
htuch
reviewed
Mar 12, 2024
htuch
reviewed
Mar 12, 2024
| // inside the decoder. | ||
| std::vector<Grpc::Frame> frames; | ||
| decoder_.decode(data, frames); | ||
| std::ignore = decoder_.decode(data, frames); |
Member
There was a problem hiding this comment.
Should these turn into TODOs or bugs?
Member
Author
htuch
reviewed
Mar 12, 2024
Contributor
|
Waiting for final review from @htuch /wait-any |
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.
This PR is to improve the error status/code
In PR #32511, we introduce a
max_frame_lengthfeature (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
booltoabsl::status, so that the caller site can differentiate the error status.source/common/grpc/async_client_impl.ccin this PR can be an user example