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 |
Signed-off-by: Lu Yu <nluyu@amazon.com>
| auditTrailPromise: Promise<AuditorFactory>, | ||
| authRegistryPromise: Promise<IAuthenticationMethodRegistery> | ||
| authRegistryPromise: Promise<IAuthenticationMethodRegistery>, | ||
| customApiSchemaRegistryPromise: Promise<CustomApiSchemaRegistry> |
There was a problem hiding this comment.
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.xThen, 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:jestyarn test:jest_integration