-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Allow gRPC service registration through extensible plugins #19304
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
base: main
Are you sure you want to change the base?
Allow gRPC service registration through extensible plugins #19304
Conversation
b7707fe
to
0649da6
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19304 +/- ##
============================================
+ Coverage 73.00% 73.06% +0.06%
- Complexity 70534 70605 +71
============================================
Files 5719 5720 +1
Lines 323260 323292 +32
Branches 46816 46819 +3
============================================
+ Hits 235993 236226 +233
+ Misses 68224 68004 -220
- Partials 19043 19062 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/GrpcServiceFactory.java
Outdated
Show resolved
Hide resolved
modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/GrpcServiceFactory.java
Outdated
Show resolved
Hide resolved
modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/GrpcPlugin.java
Show resolved
Hide resolved
modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/GrpcServiceFactory.java
Outdated
Show resolved
Hide resolved
813ede2
to
280fd95
Compare
❌ Gradle check result for 280fd95: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for bf90052: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@finnegancarroll I see you created a second SPI. Isn't |
Hi @andrross, the main reason to separate this SPI was the guava runtime dependency. Guava is runtime only in the main module as well and plugins such as KNN which only want the protobuf definitions run into version and subsequent runtime issues within the plugin test infrastructure. Here is the workaround for the original KNN PR: |
@finnegancarroll Does the new SPI really need a Guava runtime dependency? I guess I was thinking this new code would only require adding the |
Hi @andrross , doing some experimenting and guava can be excluded here and listed under One other consideration I think is extending this SPI to include other What do you think? Is it preferable to stick with the single SPI implementation and exclude guava or list it explicitly in a separate SPI? |
❌ Gradle check result for 28b757b: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Per offline convo with @andrross the second SPI is not needed as guava which is a transitive runtime dependency of |
❌ Gradle check result for 28b757b: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
28b757b
to
17594d9
Compare
❌ Gradle check result for 17594d9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
4cf118e
to
f56a7c9
Compare
2ecf895
to
f2d4101
Compare
bd4e04f
to
723b5f6
Compare
69f480b
to
c177d49
Compare
Leverages the extensible plugin framework enabling plugins to provide `BindableService` implementations which will registered on the grpc-transport. Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
c177d49
to
6c7bca0
Compare
❌ Gradle check result for 6c7bca0: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Seems related to recent 3.3.1 minor version. |
Description
Adds a
GrpcServiceFactory
interface as an extension point for other plugins to implement.GrpcServiceFactory
provides an interface for wrapping a predefinedio.grpc.BindableService
which can be registered on the gRPC transport. Enabling plugins to provide their own service definitions opens the door for supporting pre-defined service schemas within the gRPC transport (such as Flight or OTEL) proto types, as well as custom hand rolled services which do not mirror the REST API and are not tracked by the API spec.Related Issues
Resolves #19025
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.