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

[Backport 2.x] Add rule validation in AnomalyDetector constructor #1342

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link

Backport 9cdbcee from #1341.

* Add rule validation in AnomalyDetector constructor

This commit introduces rule validation within the AnomalyDetector constructor. Any validation errors are now propagated and displayed on the frontend to ensure immediate feedback.

Testing:
* Verified that validation errors are properly propagated and shown on the frontend.
* Added UTs to cover the new validation logic.

Signed-off-by: Kaituo Li <[email protected]>

* address Amit's comments

Signed-off-by: Kaituo Li <[email protected]>

---------

Signed-off-by: Kaituo Li <[email protected]>
(cherry picked from commit 9cdbcee)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 94.54545% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.06%. Comparing base (d6758c6) to head (f9964ac).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
.../java/org/opensearch/ad/model/AnomalyDetector.java 95.91% 0 Missing and 2 partials ⚠️
...imeseries/transport/SuggestConfigParamRequest.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #1342      +/-   ##
============================================
+ Coverage     79.89%   80.06%   +0.17%     
- Complexity     5654     5674      +20     
============================================
  Files           533      533              
  Lines         23411    23430      +19     
  Branches       2323     2335      +12     
============================================
+ Hits          18704    18760      +56     
+ Misses         3608     3562      -46     
- Partials       1099     1108       +9     
Flag Coverage Δ
plugin 80.06% <94.54%> (+0.17%) ⬆️

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

Files with missing lines Coverage Δ
...main/java/org/opensearch/ad/ml/ADModelManager.java 79.25% <ø> (+3.15%) ⬆️
...ch/timeseries/ml/MemoryAwareConcurrentHashmap.java 84.61% <ø> (+53.18%) ⬆️
...ensearch/timeseries/model/ValidationIssueType.java 100.00% <100.00%> (ø)
...imeseries/transport/SuggestConfigParamRequest.java 92.59% <75.00%> (+54.13%) ⬆️
.../java/org/opensearch/ad/model/AnomalyDetector.java 88.99% <95.91%> (+2.65%) ⬆️

... and 13 files with indirect coverage changes

@kaituo kaituo merged commit 700b92a into 2.x Oct 18, 2024
29 checks passed
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.

1 participant