-
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
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.15% 73.19% +0.04%
- Complexity 70958 71018 +60
============================================
Files 5736 5737 +1
Lines 324734 324766 +32
Branches 46979 46982 +3
============================================
+ Hits 237548 237710 +162
+ Misses 68031 67921 -110
+ Partials 19155 19135 -20 ☔ 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
Seems related to recent 3.3.1 minor version. |
|
❌ 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? |
|
❌ 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? |
6c7bca0 to
a78b5ec
Compare
|
❌ Gradle check result for a78b5ec: 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 a78b5ec: 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 a78b5ec: 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? |
Still seeing build failures. Up to date with main. |
Leverages the extensible plugin framework enabling plugins to provide `BindableService` implementations which will registered on the grpc-transport. Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
a78b5ec to
dbb963d
Compare
|
❌ Gradle check result for dbb963d: 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? |
Network issue pulling a snapshot? |
Signed-off-by: Finn Carroll <carrofin@amazon.com>
…h-project#19304) Leverages the extensible plugin framework enabling plugins to provide `BindableService` implementations which will registered on the grpc-transport. Signed-off-by: Finn Carroll <carrofin@amazon.com>
Description
Adds a
GrpcServiceFactoryinterface as an extension point for other plugins to implement.GrpcServiceFactoryprovides an interface for wrapping a predefinedio.grpc.BindableServicewhich 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.