opensearch-project / anomaly-detection

Identify atypical data and receive automatic notifications
https://opensearch.org/docs/latest/monitoring-plugins/ad/index/
Apache License 2.0
67 stars 73 forks source link

Bump RCF Version and Fix Default Rules Bug in AnomalyDetector #1334

Closed kaituo closed 1 month ago

kaituo commented 1 month ago

Description

Testing:

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.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.73%. Comparing base (5704a16) to head (5a2ab92). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334/graphs/tree.svg?width=650&height=150&src=pr&token=ZPONorT0bX&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) ```diff @@ Coverage Diff @@ ## main #1334 +/- ## ============================================ + Coverage 79.57% 79.73% +0.16% - Complexity 5627 5639 +12 ============================================ Files 533 533 Lines 23410 23410 Branches 2323 2323 ============================================ + Hits 18628 18667 +39 + Misses 3680 3639 -41 - Partials 1102 1104 +2 ``` | [Flag](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [plugin](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `79.73% <100.00%> (+0.16%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [.../java/org/opensearch/ad/model/AnomalyDetector.java](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fad%2Fmodel%2FAnomalyDetector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9hZC9tb2RlbC9Bbm9tYWx5RGV0ZWN0b3IuamF2YQ==) | `86.33% <100.00%> (ø)` | | | [...n/java/org/opensearch/timeseries/JobProcessor.java](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Ftimeseries%2FJobProcessor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC90aW1lc2VyaWVzL0pvYlByb2Nlc3Nvci5qYXZh) | `82.78% <ø> (ø)` | | | [...ensearch/timeseries/ratelimit/ColdStartWorker.java](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Ftimeseries%2Fratelimit%2FColdStartWorker.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC90aW1lc2VyaWVzL3JhdGVsaW1pdC9Db2xkU3RhcnRXb3JrZXIuamF2YQ==) | `91.07% <100.00%> (ø)` | | | [...timeseries/rest/handler/IndexJobActionHandler.java](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Ftimeseries%2Frest%2Fhandler%2FIndexJobActionHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC90aW1lc2VyaWVzL3Jlc3QvaGFuZGxlci9JbmRleEpvYkFjdGlvbkhhbmRsZXIuamF2YQ==) | `89.27% <ø> (+1.71%)` | :arrow_up: | | [...s/transport/handler/ResultBulkIndexingHandler.java](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Ftimeseries%2Ftransport%2Fhandler%2FResultBulkIndexingHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC90aW1lc2VyaWVzL3RyYW5zcG9ydC9oYW5kbGVyL1Jlc3VsdEJ1bGtJbmRleGluZ0hhbmRsZXIuamF2YQ==) | `93.05% <100.00%> (+19.44%)` | :arrow_up: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/opensearch-project/anomaly-detection/pull/1334/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)
opensearch-trigger-bot[bot] commented 1 month ago

The backport to 2.17 failed:

The process '/usr/bin/git' failed with exit code 128

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/anomaly-detection/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/anomaly-detection/backport-2.17
# Create a new branch
git switch --create backport/backport-1334-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ab6dc7f034947ef10a3ca0c422ca41a646c511b
# Push it to GitHub
git push --set-upstream origin backport/backport-1334-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/anomaly-detection/backport-2.17

Then, create a pull request where the base branch is 2.17 and the compare/head branch is backport/backport-1334-to-2.17.