-
Notifications
You must be signed in to change notification settings - Fork 76
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
Renaming RestAPIs while supporting backwards compatibility. #35
Conversation
Signed-off-by: Sarat Vemulapalli <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #35 +/- ##
============================================
+ Coverage 79.21% 79.34% +0.12%
- Complexity 2681 2694 +13
============================================
Files 242 242
Lines 11025 11065 +40
Branches 1010 1012 +2
============================================
+ Hits 8734 8780 +46
+ Misses 1878 1873 -5
+ Partials 413 412 -1
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.
This works, but I think it's a bit too much copy-paste. I suggest modifying/wrapping/extending Route
to either allow multiple paths in the constructor, or extending Route
with a static method that takes a method, and a list of paths, to return a list of routes.
src/main/java/com/amazon/opendistroforelasticsearch/ad/AnomalyDetectorPlugin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/amazon/opendistroforelasticsearch/ad/rest/AbstractSearchAction.java
Outdated
Show resolved
Hide resolved
src/main/java/com/amazon/opendistroforelasticsearch/ad/rest/RestIndexAnomalyDetectorAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sarat Vemulapalli <[email protected]>
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 think "replaced" is not a great name, maybe "deprecated"? Otherwise looks ok.
src/main/java/com/amazon/opendistroforelasticsearch/ad/rest/AbstractSearchAction.java
Outdated
Show resolved
Hide resolved
...main/java/com/amazon/opendistroforelasticsearch/ad/rest/RestDeleteAnomalyDetectorAction.java
Show resolved
Hide resolved
Signed-off-by: Sarat Vemulapalli <[email protected]>
src/main/java/com/amazon/opendistroforelasticsearch/ad/rest/AbstractSearchAction.java
Show resolved
Hide resolved
I wrote this when I didn't know there was support for this already in OpenSearch. |
LGTM, but would wait for @ylwu-amzn to re-review |
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. Thanks for the change.
Signed-off-by: Sarat Vemulapalli [email protected]
Description
Renaming RestAPIs from
_opendistro
to_plugins
._opendistro
to_plugins
.Example:
_opendistro/_anomaly_detection/*
->_plugins/_anomaly_detection/*
_opendistro
and_plugins
. Added integration tests to verify.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.