-
Notifications
You must be signed in to change notification settings - Fork 73
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
[Extensions] Migrates Search Detector Info action to extension #875
[Extensions] Migrates Search Detector Info action to extension #875
Conversation
747c0f9
to
f63b170
Compare
d1f5b7e
to
57b8ca4
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## feature/extensions #875 +/- ##
========================================================
- Coverage 35.02% 34.91% -0.11%
+ Complexity 1896 1894 -2
========================================================
Files 300 300
Lines 17896 17915 +19
Branches 1869 1869
========================================================
- Hits 6268 6255 -13
- Misses 11178 11206 +28
- Partials 450 454 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM. One question and looks like a build.gradle conflict needs resolving.
build.gradle
Outdated
'org.opensearch.ad.util.RestHandlerUtils' | ||
'org.opensearch.ad.util.RestHandlerUtils', | ||
'org.opensearch.ad.transport.SearchAnomalyDetectorInfoTransportAction.1', | ||
'org.opensearch.ad.transport.SearchAnomalyDetectorInfoTransportAction.2' |
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.
For my own education, what are these .1 and .2? I don't see classes there. Can/should we use wildcards?
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 went ahead and added wildcards for the rest as well.
5f9b723
to
c02c5a5
Compare
Needs #876 to be merged first for build to pass. |
@owaiskazi19 #876 has been merged. Seems that the build is failing for other instances of the same issue that I covered in that PR :
Simple fix is to convert the |
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.
LGTM other than the failing tests
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.
Thanks @owaiskazi19, changes look good to me!
|
||
public RestSearchAnomalyDetectorInfoAction() {} | ||
public RestSearchAnomalyDetectorInfoAction(ExtensionsRunner extensionsRunner, SDKRestClient client) { |
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.
Not a blocker for this PR: Curious if there is a better way to get information from extensions runner.
We just dont need to pass this across the extension.
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.
That's a good question. @dbwiddis /@joshpalis do you think we can add ExtensionsRunner in createComponent and inject from there?
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.
ExtensionsRunner
is already bound to guice here. I think what we need is to enable injection for rest actions so that we don't need to pass objects around in AD Extension
Signed-off-by: Owais Kazi <[email protected]>
c02c5a5
to
57795f3
Compare
Signed-off-by: Owais Kazi <[email protected]>
9964382
to
811a202
Compare
Signed-off-by: Owais Kazi <[email protected]>
811a202
to
dc993ca
Compare
Description
This PR migrates SearchDetectorInfo to extension for GET request.
Issues Resolved
Closes opensearch-project/opensearch-sdk-java#675
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.