-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Thrift: Payload to metadata filter #23409
Conversation
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: kuochunghsu <[email protected]>
baa1495
to
34b0105
Compare
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
I address everything on top of my head except allowing multiple rules in a payload node. Will address this and do more testing on next biz days |
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
/retest |
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
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.
LGTM, thanks!
Over to @zuercher for merging (after you've merged main).
/retest |
Retrying Azure Pipelines: |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
/assign-from @envoyproxy/api-shepherds |
@envoyproxy/api-shepherds assignee is @lizan |
...nsions/filters/network/thrift_proxy/filters/payload_to_metadata/v3/payload_to_metadata.proto
Outdated
Show resolved
Hide resolved
...sions/filters/network/thrift_proxy/filters/payload_to_metadata/payload_to_metadata_filter.cc
Outdated
Show resolved
Hide resolved
...sions/filters/network/thrift_proxy/filters/payload_to_metadata/payload_to_metadata_filter.cc
Show resolved
Hide resolved
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
Signed-off-by: kuochunghsu <[email protected]>
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.
I’ll leave the discussion about the google.protobuf.Int32 vs int32 for the api shepherds.
Signed-off-by: kuochunghsu <[email protected]>
@lizan do you mind to take a look at api part again? Thanks. |
Commit Message:
Add a thrift filter to support adding dynamic metadata by payload
Additional Description:
This filter is configured with request_rules that will be matched against requests. A field_selector of a rule represents the head of a linked list, each node of the linked list has a name for logging and an id for matching. The field_selector is tied to a payload field when the linked list corresponds to a downward path which rooted in the top-level of the request message structure. on_present is triggered when corresponding the payload is present. Otherwise, on_missing is triggered.
This filter is designed to support payload passthrough. By performing payload to metadata filter can do deserialization once, and pass the metadata to other filters. This means that load balancing decisions, consumed from log and routing could all use payload information with a single parse. Also notably performing the parsing in payload passthrough buffer will mean deserialization once and not re-serializing, which is the most performant outcome.
Risk Level: low
Testing: unit
Docs Changes: multiple rst
[Optional Fixes #Issue] #23322