-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ext_proc: Pass stream_info to gRPC streams #18190
Conversation
The ext_proc filter was not passing the stream_info structure down to the gRPC stream that it creates. As a result, certain metadata keys could cause the filter to crash when trying to open the stream. Signed-off-by: Gregory Brail <gregbrail@google.com>
/assign-from @envoyproxy/first-pass-reviewers |
@envoyproxy/first-pass-reviewers assignee is @tonya11en |
Signed-off-by: Gregory Brail <gregbrail@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question on how this all fits together, but I think this looks good
// Insert some extra metadata. This ensures that we are actually passing the | ||
// "stream info" from the original HTTP request all the way down to the | ||
// ext_proc stream. | ||
auto* metadata = proto_config_.mutable_grpc_service()->mutable_initial_metadata()->Add(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I understand, how is this related to stream info? I would have expected this to be used when the grpc stream is created by reading the config, not sure how this would be plumbed though via StreamInfo?
I don't know the ins and outs of metadata and our gRPC client, but I think
that "%REQ" syntax means, "pull information from the original request and
add it to the stream." The grpc client seems to do that using the
stream_info, and since I wasn't setting that when opening the gRPC stream
to the external processor, it was crashing while trying to get that
information.
…On Fri, Sep 24, 2021 at 9:47 AM Snow Pettersen ***@***.***> wrote:
***@***.**** commented on this pull request.
Just one question on how this all fits together, but I think this looks
good
------------------------------
In test/extensions/filters/http/ext_proc/streaming_integration_test.cc
<#18190 (comment)>:
> + // Insert some extra metadata. This ensures that we are actually passing the
+ // "stream info" from the original HTTP request all the way down to the
+ // ext_proc stream.
+ auto* metadata = proto_config_.mutable_grpc_service()->mutable_initial_metadata()->Add();
Just so I understand, how is this related to stream info? I would have
expected this to be used when the grpc stream is created by reading the
config, not sure how this would be plumbed though via StreamInfo?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18190 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I26NIP6MS2WERROC75DUDSTTPANCNFSM5EMYGCQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Got it, I didn't realize that the important bit was the REQ query, thanks! Seems like this will need a main merge |
No problem -- I had two in flight at the same time. Let me do that and
you'll see it pop up.
…On Fri, Sep 24, 2021 at 10:53 AM Snow Pettersen ***@***.***> wrote:
Got it, I didn't realize that the important bit was the REQ query, thanks!
Seems like this will need a main merge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18190 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I275CLFUEF6KNPK6WBLUDS3JHANCNFSM5EMYGCQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Signed-off-by: Gregory Brail <gregbrail@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* main: (114 commits) kafka: add header support to mesh-filter (envoyproxy#18248) rbac: add support for upstream ip policy. (envoyproxy#17645) SIPProxy BUGFIX UT failure for fastbuild/debug (envoyproxy#18303) quic: updating goaway code (envoyproxy#18291) various tiny fixes (envoyproxy#18287) dns cache: remove assert at this layer (envoyproxy#18301) [ext_authz]: ext_authz filter unit test that use real threading (envoyproxy#17742) signal action: fully disable sigaltstack on Apple (envoyproxy#18299) Add missing dependencies (envoyproxy#18297) ext_proc: Pass stream_info to gRPC streams (envoyproxy#18190) use clang 12 (envoyproxy#18220) Update PR template to include the "Fixes commit" message when reverting or fixing bad commits (envoyproxy#18298) [test] Fixing integration test to cleanup cleanly (envoyproxy#18293) test: moving grpc bridge tests out of core directory (envoyproxy#18227) runtime: disable deprecated extensions names by default (envoyproxy#18239) quiche: updating deps (envoyproxy#18272) sip_proxy: SIP protocol support in envoy (envoyproxy#18039) http: add core retry policy to route retry policy conversion utility (envoyproxy#17803) build: updating stale visibility (envoyproxy#18278) alternate_protocols_cache: Impose a max size limit on the alternate protocols cache (envoyproxy#18258) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Commit Message: The ext_proc filter was not passing the stream_info structure down to the gRPC stream that it creates. As a result, certain metadata keys could cause the filter to crash when trying to open the stream.
Additional Description:
Risk Level: Low. Makes the filter more resilient.
Testing: New code in integration test failed before this fix was applied and now passes.