-
Notifications
You must be signed in to change notification settings - Fork 88
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
Integrate MDS client to ISM #711
base: 2.x
Are you sure you want to change the base?
Integrate MDS client to ISM #711
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #711 +/- ##
==========================================
- Coverage 63.37% 63.16% -0.21%
==========================================
Files 341 345 +4
Lines 11545 11591 +46
Branches 2108 2111 +3
==========================================
+ Hits 7317 7322 +5
- Misses 3654 3695 +41
Partials 574 574 |
}, | ||
}, | ||
method: "POST", | ||
extendClient({ |
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.
I saw the logic is moved to clusters/extend_client.ts, there is no much logic left in the ismPlugin.ts file, what's the benefit of break it to two files?
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.
We need to extend the legacyClient and OpenSearchClient(in MDS case) but the context is different when constructing so we have to move all the ism.xxx = ca(xxx)
code into a separate function to reuse the extend logic.
|
||
export const getClientSupportMDS = (props: IGetClientProps) => { | ||
const originalAsScoped = props.client.asScoped; | ||
const handler: IContextProvider<RequestHandler<unknown, unknown, unknown>, "core"> = ( |
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.
what're the three unknowns?
server/plugin.ts
Outdated
core, | ||
client: legacyClient, | ||
getDataSourceId() { | ||
return "3e2ff6a0-de64-11ed-b697-57f5dd34beb6"; |
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.
Recommendation: Use a request level params to get data source id, make it stateless.
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
92302f8
to
f93a406
Compare
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: suzhou <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
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.