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: template gRPC client and move it to common folder #38898

Merged
merged 10 commits into from
Mar 31, 2025

Conversation

botengyao
Copy link
Member

@botengyao botengyao commented Mar 25, 2025

This PR will make the gRPC external processor client in l7_ext_proc share with the l4_ext_proc filter.

Commit Message:
Additional Description:
Risk Level: low
Testing:
Docs Changes:
Release Notes:

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
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: #38898 was opened by botengyao.

see: more, trace.

Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
@botengyao
Copy link
Member Author

/retest

Signed-off-by: Boteng Yao <[email protected]>
Copy link

CC @envoyproxy/coverage-shephards: FYI only for changes made to (test/per_file_coverage.sh).
envoyproxy/coverage-shephards assignee is @alyssawilk

🐱

Caused by: #38898 was synchronize by botengyao.

see: more, trace.

Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

coverage LGTM

@yanjunxiang-google
Copy link
Contributor

LGTM in general. Thanks for working on this refactoring!
Left a few nit comments. It's okay if you want to address it in the follow up PR.

Signed-off-by: Boteng Yao <[email protected]>
Copy link
Member Author

@botengyao botengyao left a comment

Choose a reason for hiding this comment

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

thanks for the review, done.

@tyxia
Copy link
Member

tyxia commented Mar 28, 2025

Templates are great to provide flexible interfaces but it also will make interface/code more complicated. As we can see in this PR , template arguments are passed around/specified through the multiple layers in the stack.

Some high level comments:

  1. Do you have the e2e working prototype of using this interface in L4 ext_proc?
  2. Can (or will it be possible that) this gRPC client be generic enough to be shared with clients other than ext_proc?
  3. Have you explored the techniques like CTAD; default template argument etc to reduce template specification?

It seems to be a major change, I don't have strong opinion if 1 above is working

@botengyao
Copy link
Member Author

Templates are great to provide flexible interfaces but it also will make interface/code more complicated. As we can see in this PR , template arguments are passed around/specified through the multiple layers in the stack.

Some high level comments:

  1. Do you have the e2e working prototype of using this interface in L4 ext_proc?

  2. Can (or will it be possible that) this gRPC client be generic enough to be shared with clients other than ext_proc?

  3. Have you explored the techniques like CTAD; default template argument etc to reduce template specification?

It seems to be a major change, I don't have strong opinion if 1 above is working

Thanks Tianyu for the review. yes it will work with the new l4 ext_proc, and I think this can be shared for other cases as well for different message types.

Good to know CTAD, I will explore it, can it be a follow up? Thanks!

Copy link
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

Follow-up actions are fine to me.
it will be great to reduce the code complexity (i.e., have easy to maintain code) while leveraging's template's power of writing generic code.

@botengyao botengyao merged commit ac05cf0 into envoyproxy:main Mar 31, 2025
24 checks passed
@botengyao botengyao deleted the grpc_client_refactor branch March 31, 2025 19:54
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.

None yet

5 participants