ext_proc: template gRPC client and move it to common folder#38898
ext_proc: template gRPC client and move it to common folder#38898botengyao merged 10 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Boteng Yao <boteng@google.com>
Signed-off-by: Boteng Yao <boteng@google.com>
|
/retest |
Signed-off-by: Boteng Yao <boteng@google.com>
Signed-off-by: Boteng Yao <boteng@google.com>
|
CC @envoyproxy/coverage-shephards: FYI only for changes made to |
|
LGTM in general. Thanks for working on this refactoring! |
Signed-off-by: Boteng Yao <boteng@google.com>
botengyao
left a comment
There was a problem hiding this comment.
thanks for the review, done.
|
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:
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! |
Signed-off-by: Boteng Yao <boteng@google.com>
Signed-off-by: Boteng Yao <boteng@google.com>
tyxia
left a comment
There was a problem hiding this comment.
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.
…xy#38898) 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: --------- Signed-off-by: Boteng Yao <boteng@google.com>
In envoyproxy#38898 @botengyao added an exception for the ext_proc tests for coverage. That's because clang source based coverage reported missing coverage for the comments (the desirable behavior here is that comments are not counted in the coverage reports). Digging through it, what I realized is that for only some tests report counters for the comments. And all the tests that report thos bogus counters don't actually exercise the affected code. I still don't fully understand what triggers the issue here, but that observation suggests a workaround that this PR implements. I basically remove dependency on the grpc_client_impl.h from the tests that don't need it. I started a thread on LLVM discussions, but given that I couldn't come up with a small enough reproducer, I don't think that we can resolve it quickly. That being said, removing unnecessary includes and moving functions from headers to cc files is in general a good strategy as it reduces depndencies between translation units and reduces the amount of work compiler has to do, so I think we can still push this workaround upstream, even though I don't have a root cause for the problem. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
Commit Message: In #38898 @botengyao added an exception for the ext_proc tests for coverage. That's because clang source based coverage reported missing coverage for the comments (the desirable behavior here is that comments are not counted in the coverage reports). Digging through it, what I realized is that for only some tests report counters for the comments. And all the tests that report thos bogus counters don't actually exercise the affected code. I still don't fully understand what triggers the issue here, but that observation suggests a workaround that this PR implements. I basically remove dependency on the grpc_client_impl.h from the tests that don't need it. I started a thread on LLVM discussions (https://discourse.llvm.org/t/llvm-source-based-coverage-sometimes-generates-counter-for-comments/85730), but given that I couldn't come up with a small enough reproducer, I don't think that we can resolve it quickly. That being said, removing unnecessary includes and moving functions from headers to cc files is in general a good strategy as it reduces depndencies between translation units and reduces the amount of work compiler has to do, so I think we can still push this workaround upstream, even though I don't have a root cause for the problem. Additional Description: It was reported in #37911, but other than that I don't think it's relevant. Risk Level: n/a Testing: regular CI tests, but with coverage targets changed to remove the exception for the ext_proc. Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a --------- Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
…xy#38898) 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: --------- Signed-off-by: Boteng Yao <boteng@google.com>
Added the basic ext_proc gRPC callout functions without the data loss that was addressed in #38778. gRPC client was shared with HTTP ext_proc that was templated by #38898 Pending: * COUNTER will be in the followup RPs. * filter_metadata handling is pending. * log info is pending. * timeout setting is pending * flow control is pending Commit Message: Additional Description: Risk Level: low Testing: #38721 --------- Signed-off-by: Boteng Yao <boteng@google.com>
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: