Skip to content
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

[Feature/extensions] Migrates Get Detector action to extension #810

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Feb 14, 2023

Description

Migrates the GetAnomalyDetectorTransportAction, their Rest Handlers, and other supporting classes from plugin to extension.

This PR also brings back the original index name for ANOMALY_DETECTORS_INDEX from
opendistro-anomaly-detectors -> .opendistro-anomaly-detectors

Removed unused files: RestGetDetectorAction, RestCreateDetectorAction and RestValidateDetectorAction

Issues Resolved

Fixes opensearch-project/opensearch-sdk-java#373

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.

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Copy link
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing an initial pass

owaiskazi19 and others added 3 commits February 15, 2023 15:48
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
* Reformatting the imports

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Reformatting imports and rebasing with SDK

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Reformatting imports and rebasing with SDK

Signed-off-by: Varun Jain <varunudr@amazon.com>

---------

Signed-off-by: Varun Jain <varunudr@amazon.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #810 (cb707d2) into feature/extensions (71010ca) will decrease coverage by 4.16%.
The diff coverage is 15.20%.

❗ Current head cb707d2 differs from pull request most recent head a64f199. Consider uploading reports for the commit a64f199 to get more accurate results

📣 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

Impacted file tree graph

@@                   Coverage Diff                    @@
##             feature/extensions     #810      +/-   ##
========================================================
- Coverage                 53.33%   49.17%   -4.16%     
+ Complexity                 2658     2631      -27     
========================================================
  Files                       291      297       +6     
  Lines                     16061    17113    +1052     
  Branches                   1686     1843     +157     
========================================================
- Hits                       8566     8416     -150     
- Misses                     6877     8088    +1211     
+ Partials                    618      609       -9     
Flag Coverage Δ
plugin 49.17% <15.20%> (-4.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...va/org/opensearch/ad/AnomalyDetectorExtension.java 0.00% <0.00%> (ø)
...va/org/opensearch/ad/AnomalyDetectorJobRunner.java 0.00% <0.00%> (ø)
.../java/org/opensearch/ad/AnomalyDetectorPlugin.java 86.56% <ø> (-0.20%) ⬇️
.../java/org/opensearch/ad/model/AnomalyDetector.java 90.00% <ø> (ø)
...nsearch/ad/rest/AbstractAnomalyDetectorAction.java 0.00% <0.00%> (-100.00%) ⬇️
...ensearch/ad/rest/RestGetAnomalyDetectorAction.java 0.00% <0.00%> (ø)
...search/ad/rest/RestIndexAnomalyDetectorAction.java 0.00% <0.00%> (-25.72%) ⬇️
...rch/ad/rest/RestValidateAnomalyDetectorAction.java 0.00% <0.00%> (ø)
...est/handler/IndexAnomalyDetectorActionHandler.java 100.00% <ø> (ø)
.../ad/rest/handler/ModelValidationActionHandler.java 0.00% <ø> (ø)
... and 41 more

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but for ease of review would really like separate commits when uncommenting the entire file and then making changes to it. I had to do the diff manually.

@joshpalis joshpalis merged commit ce6b955 into opensearch-project:feature/extensions Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants