Skip to content

Allow deletion of custom log type if custom rule index is missing (#767)#780

Merged
jowg-amazon merged 1 commit intoopensearch-project:2.11-with-featuresfrom
goyamegh:2.11-with-features-goyamegh
Dec 8, 2023
Merged

Allow deletion of custom log type if custom rule index is missing (#767)#780
jowg-amazon merged 1 commit intoopensearch-project:2.11-with-featuresfrom
goyamegh:2.11-with-features-goyamegh

Conversation

@goyamegh
Copy link
Copy Markdown
Collaborator

@goyamegh goyamegh commented Dec 8, 2023

Description

In the case when the custom rule index is missing, we want to allow the update/deletion of custom log types to be successful instead of throwing an error. The detector index may not be present, and the custom log types will still get updated/deleted respectively.

Backport #767

Issues Resolved

#700

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

…ensearch-project#767)

* Allow deletion of custom log type if custom rule index is missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Allow custom log type name to be updated when custom rule index is missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Adding changes for detector index missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

* Update log type when detector index is missing

Signed-off-by: Megha Goyal <goyamegh@amazon.com>

---------

Signed-off-by: Megha Goyal <goyamegh@amazon.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 101 lines in your changes are missing coverage. Please review.

Comparison is base (454ee19) 24.58% compared to head (90035b5) 24.61%.

Files Patch % Lines
...s/transport/TransportIndexCustomLogTypeAction.java 0.00% 54 Missing ⚠️
.../transport/TransportDeleteCustomLogTypeAction.java 0.00% 34 Missing ⚠️
...opensearch/securityanalytics/util/RuleIndices.java 0.00% 12 Missing ⚠️
...analytics/transport/TransportDeleteRuleAction.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##             2.11-with-features     #780      +/-   ##
========================================================
+ Coverage                 24.58%   24.61%   +0.03%     
+ Complexity                  948      945       -3     
========================================================
  Files                       255      255              
  Lines                     11422    11395      -27     
  Branches                   1289     1290       +1     
========================================================
- Hits                       2808     2805       -3     
+ Misses                     8366     8341      -25     
- Partials                    248      249       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jowg-amazon jowg-amazon merged commit 1161d9c into opensearch-project:2.11-with-features Dec 8, 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.

3 participants