[GRPC] Make transport-grpc extensible to other plugins
Description
This PR refactors the GRPC transport module to provide extension points for plugins. The goal is to make it possible for third-party and internal plugins to register custom GRPC services, enhancing the flexibility and extensibility of the transport layer.
Test plan
- New and old unit tests still passing per
./gradlew :plugins:transport-grpc:test - Existing GRPC query types still working. Example for MatchAll:
grpcurl -import-path ~/OpenSearch -d '{"size": 10000, "request_body":{"query":{"match_all":{}}}}' -proto ~/OpenSearch/protos/services/search_service.proto -plaintext localhost:9400 org.opensearch.protobufs.services.SearchService/Search
{
"responseBody": {
"took": "15",
"timedOut": false,
"shards": {},
"hits": {
"total": {
"totalHits": {
"relation": "TOTAL_HITS_RELATION_EQ"
}
},
"maxScore": {
"floatValue": 0
}
}
}
}
- (WIP) Implementations of this interface (e.g. from the KNN plugin) are working. Tested on a test cluster in tandem with this PR in the KNN repo
Related Issues
https://github.com/opensearch-project/OpenSearch/issues/18513
Check List
- [ ] Functionality includes testing.
- [ ] API changes companion pull request created, if applicable.
- [ ] Public documentation issue/PR created, if applicable.
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.
:white_check_mark: Gradle check result for 968cc2fb1a30a5aeeb06ae6a88ab2a73f8149d3c: SUCCESS
Codecov Report
:x: Patch coverage is 77.77778% with 34 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 72.76%. Comparing base (3b7603e) to head (69e2eef).
:warning: Report is 5 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #18516 +/- ##
============================================
+ Coverage 72.67% 72.76% +0.08%
- Complexity 68610 68683 +73
============================================
Files 5577 5582 +5
Lines 315375 315510 +135
Branches 45772 45789 +17
============================================
+ Hits 229209 229568 +359
+ Misses 67613 67357 -256
- Partials 18553 18585 +32
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
:x: Gradle check result for f5a22431b9a3fd9c3eb8277acf8121f842331195: 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?
:white_check_mark: Gradle check result for f5a22431b9a3fd9c3eb8277acf8121f842331195: SUCCESS
:white_check_mark: Gradle check result for 3d3b570022272e3e8fb06b9c97bd4b7f6f4899a0: SUCCESS
:white_check_mark: Gradle check result for b15e64052f637debea842cf0b04414f20bf7ad20: SUCCESS
:white_check_mark: Gradle check result for 380ef217362a613df1e6e1efe0796c4f65684cef: SUCCESS
:x: Gradle check result for 57322363714bba3e5e1bb8fb09d75d2e3b7ca026: 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?
:x: Gradle check result for f959e3e8e3c5fd2ba5897b406fa967096cb52c1f: 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?
:grey_exclamation: Gradle check result for 69e2eef45847b4ac5492064323daed845443f03e: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.