Skip to content
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

Merged
merged 3 commits into from
Sep 28, 2021
Merged

Conversation

gbrail
Copy link
Contributor

@gbrail gbrail commented Sep 20, 2021

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.

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>
@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #18190 was opened by gbrail.

see: more, trace.

@gbrail gbrail marked this pull request as ready for review September 21, 2021 16:24
@gbrail gbrail requested a review from snowp as a code owner September 21, 2021 16:24
@alyssawilk
Copy link
Contributor

/assign-from @envoyproxy/first-pass-reviewers

@repokitteh-read-only
Copy link

@envoyproxy/first-pass-reviewers assignee is @tonya11en

🐱

Caused by: a #18190 (comment) was created by @alyssawilk.

see: more, trace.

Signed-off-by: Gregory Brail <gregbrail@google.com>
Copy link
Contributor

@snowp snowp left a 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

Comment on lines +72 to +75
// 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();
Copy link
Contributor

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?

@gbrail
Copy link
Contributor Author

gbrail commented Sep 24, 2021 via email

@snowp
Copy link
Contributor

snowp commented Sep 24, 2021

Got it, I didn't realize that the important bit was the REQ query, thanks!

Seems like this will need a main merge

@gbrail
Copy link
Contributor Author

gbrail commented Sep 24, 2021 via email

Signed-off-by: Gregory Brail <gregbrail@google.com>
Copy link
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snowp snowp merged commit 2d90ccb into envoyproxy:main Sep 28, 2021
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 29, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants