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

Add variable binding support #15338

Closed
wants to merge 1 commit into from

Conversation

jhance
Copy link

@jhance jhance commented Mar 5, 2021

Commit Message: Add unknown variable binding support to grpc transcoder
Additional Description: In some cases the names of the variable bindings may not be known ahead of time and downstream needs to receive an arbitrary mapping. This implements support for such a mapping.
Risk Level: Low
Testing: As this is mostly for demonstration purposes testing deferred until after further discussion.
Docs Changes:
Release Notes:
When allowing missing variable bindings, missing bindings are added to a HttpBody extension as a map of strings.
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] #14710
[Optional Deprecated:]
[Optional API Considerations:]

@jhance jhance requested a review from lizan as a code owner March 5, 2021 23:00
@repokitteh-read-only
Copy link

Hi @jhance, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #15338 was opened by jhance.

see: more, trace.

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #15338 was opened by jhance.

see: more, trace.

@qiwzhang
Copy link
Contributor

qiwzhang commented Mar 9, 2021

Thanks for this draft pr. Per my reading, the upstream gRPC server takes google.api.HttpBody. You want envoy grpc_transcoder to pack all unknown variable bindings as map<string, string> proto field as one of HttpBody extensions. is that correct?

If so, the code seems pretty simple. It will not add too much complexity to the envoy filter code. I am ok with it.

It will be clearer if the issue title or pr title can be something like: "pack unknown parameters into HttpBody extension."

@lizan lizan requested a review from qiwzhang March 10, 2021 09:54
Comment on lines +237 to +239
message UnknownVariableBindings {
map<string, string> bindings = 1;
}
Copy link
Member

Choose a reason for hiding this comment

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

add comment for the message and fields.

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 9, 2021
@github-actions
Copy link

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Apr 16, 2021
alyssawilk pushed a commit that referenced this pull request Jul 9, 2024
… extension (#34999)

Commit Message: [grpc-transcoder] Add option to pack unknown parameters
into HttpBody extension
Additional Description: We've been using this behavior for years, with
PR #15338 as a patch. Finally getting around to trying to upstream the
behavior to make it available for others, and to make it so I don't have
to keep repositioning the patch. Unlike #15338 I'm also adding a
configuration option so that no behavior change will occur without a
corresponding configuration change.
Risk Level: Very low, guarded by a new config field.
Testing: Added positive unit tests, added conditions to other tests for
the negative case.
Docs Changes: Autogen
Fixes #14710

---------

Signed-off-by: Raven Black <ravenblack@dropbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants