Repository navigation
http: unifying grpc local reply logic - #13038
Merged
Merged
Conversation
Signed-off-by: Alyssa Wilk <[email protected]>
Contributor
Author
|
@snowp you up for first pass? This was motivated by that sendLocalReply clean up we both want and can't do for 6 months. |
snowp
previously requested changes
Sep 13, 2020
snowp
left a comment
Contributor
There was a problem hiding this comment.
Thanks this looks right to me. Do we want a HCM/FM test that explicitly tests this or does the transcoder test suffice?
Contributor
Author
|
I'm fine with the transcoder test but LMK if you want a separate unit test. |
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.
Additional Description:
Prior to this PR, if a non-gRPC request came in to Envoy, filter A turned it into a gRPC request, filter B switched it back, the response sent would be a gRPC response if sent from A, and a non-gRPC response if sent from B, and maybe gRPC maybe not if sent by the router or HCM (depending on the current state of the headers).
This seems unnecessarily complex as all response always traverse the full filter chain, so this PR unifies the response based on the original downstream request. If a request comes in as gRPC and is transformed to not-gRPC, sendLocalReply will now always send a gRPC response. If a request comes in as not gRPC and is transformed to gRPC, sendLocalReply will always send a non-gRPC response.
Risk Level: medium (changes to L7 processing)
Testing: gRPC json test reflects plaintext response
Docs Changes: n/a
Release Notes: inline
Runtime guard: envoy.reloadable_features.unify_grpc_handling