-
Notifications
You must be signed in to change notification settings - Fork 885
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
Add api registry and allow it to be added into client config in data source plugin #5895
Conversation
Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5895 +/- ##
=======================================
Coverage 66.98% 66.98%
=======================================
Files 3304 3305 +1
Lines 63569 63574 +5
Branches 10153 10153
=======================================
+ Hits 42580 42585 +5
Misses 18521 18521
Partials 2468 2468
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@BionIT would you take a look https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/docs/multi-datasource/client_management_design.md and update doc accordingly if necessary. we could share the latest design doc to plugin team as reference. |
Signed-off-by: Lu Yu <nluyu@amazon.com>
Sure, just commit change to update the document |
src/plugins/data_source/server/schema_registry/custom_api_schema_registry.ts
Show resolved
Hide resolved
Signed-off-by: Lu Yu <nluyu@amazon.com>
@@ -155,7 +165,8 @@ export class DataSourcePlugin implements Plugin<DataSourcePluginSetup, DataSourc | |||
cryptography: CryptographyServiceSetup, | |||
logger: Logger, | |||
auditTrailPromise: Promise<AuditorFactory>, | |||
authRegistryPromise: Promise<IAuthenticationMethodRegistery> | |||
authRegistryPromise: Promise<IAuthenticationMethodRegistery>, | |||
customApiSchemaRegistryPromise: Promise<CustomApiSchemaRegistry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Overall LGTM approved, Thanks for this change~
If not complex, do we also want to create a ICustomApiSchemaRegistry
type similar to IAuthenticationMethodRegistery to only expose register()
also make the code format here consistent?
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-5895-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eff7cb5536a552692c43fedd60fb8a9f87f1e801
# Push it to GitHub
git push --set-upstream origin backport/backport-5895-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
…source plugin (opensearch-project#5895) * add api registry and allow it to be added into client config Signed-off-by: Lu Yu <nluyu@amazon.com> * add changelog Signed-off-by: Lu Yu <nluyu@amazon.com> * add documentation for multi data source plugin api registry Signed-off-by: Lu Yu <nluyu@amazon.com> * change to resolve promise before calling getQueryClient Signed-off-by: Lu Yu <nluyu@amazon.com> --------- Signed-off-by: Lu Yu <nluyu@amazon.com>
Manual Backport #5906 |
Description
This change allows consumers of data source plugin to register the API schema to be used in OpenSearch client and legacy client.
Issues Resolved
Fixes #5854
Screenshot
5854.mp4
Testing the changes
Here are the steps which was performed in the screenshot
Check List
yarn test:jest
yarn test:jest_integration