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

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

Conversation

goyamegh
Copy link
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 <[email protected]>

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

Signed-off-by: Megha Goyal <[email protected]>

* Adding changes for detector index missing

Signed-off-by: Megha Goyal <[email protected]>

* Update log type when detector index is missing

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
Copy link

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
10 of 15 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.

3 participants