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

Handle monitor or monitor index not found during detector deletion #384

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Apr 3, 2023

Description

Handle monitor or monitor index(.opendistro-alerting-config) not found during detector deletion to proceed with detector deletion.
But if there are other errors thrown from monitor deletion then we log it and fail the request

Issues Resolved

#378

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.

@eirsep eirsep requested a review from a team April 3, 2023 23:22
@eirsep eirsep force-pushed the delete_fix branch 2 times, most recently from a25107d to 5eec283 Compare April 3, 2023 23:32
sbcd90
sbcd90 previously approved these changes Apr 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2023

Codecov Report

Merging #384 (2f4d975) into main (12e4a56) will decrease coverage by 0.87%.
The diff coverage is 2.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main     #384      +/-   ##
============================================
- Coverage     36.53%   35.66%   -0.87%     
  Complexity      887      887              
============================================
  Files           185      186       +1     
  Lines          7098     7285     +187     
  Branches        860      885      +25     
============================================
+ Hits           2593     2598       +5     
- Misses         4268     4450     +182     
  Partials        237      237              
Impacted Files Coverage Δ
...rch/securityanalytics/SecurityAnalyticsPlugin.java 0.00% <0.00%> (ø)
...rch/securityanalytics/action/AckAlertsRequest.java 75.00% <ø> (ø)
...ch/securityanalytics/action/AckAlertsResponse.java 77.27% <ø> (ø)
.../opensearch/securityanalytics/action/AlertDto.java 50.45% <ø> (ø)
...tyanalytics/action/CreateIndexMappingsRequest.java 46.93% <ø> (ø)
...curityanalytics/action/DeleteDetectorResponse.java 0.00% <ø> (ø)
...h/securityanalytics/action/DeleteRuleResponse.java 0.00% <ø> (ø)
...pensearch/securityanalytics/action/FindingDto.java 37.20% <ø> (ø)
...ch/securityanalytics/action/GetAlertsResponse.java 35.29% <ø> (ø)
...analytics/action/GetAllRuleCategoriesResponse.java 0.00% <ø> (ø)
... and 55 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.5 failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-384-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6271399c381a33364927e8147b6d6e3bc3f583cc
# Push it to GitHub
git push --set-upstream origin backport/backport-384-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5

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

opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2023
…384)

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 6271399)
eirsep added a commit that referenced this pull request Apr 12, 2023
…384) (#398)

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 6271399)

Co-authored-by: Surya Sashank Nistala <[email protected]>
petardz pushed a commit to petardz/security-analytics that referenced this pull request May 2, 2023
AWSHurneyt pushed a commit to AWSHurneyt/security-analytics that referenced this pull request Jun 9, 2023
…pensearch-project#384) (opensearch-project#398)

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 6271399)

Co-authored-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
AWSHurneyt added a commit that referenced this pull request Jun 9, 2023
* handle index not exists for detector search and delete (#396) (#397)

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit e50c70a)

Co-authored-by: Surya Sashank Nistala <[email protected]>

* Handle monitor or monitor index not exists during detector deletion (#384) (#398)

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 6271399)

Co-authored-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Surya Sashank Nistala <[email protected]>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Feb 20, 2024
* [FEATURE] Detector must have at least one alert set opensearch-project#288

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [BUG] The detector details shouldn't have a wrapper around the whole page opensearch-project#384

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants