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 index not exists for detector search and delete #396

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Apr 12, 2023

Description

Detector search api throws 404 when detector config index doesn't exist. this PR fixes that scenario to return a 0 hits search response.

Detector deletion API returns message that index is not found when index doesnt exist. Fixed it to return "detector not found" message.

Issues Resolved

#206 #370

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.

@eirsep eirsep requested a review from a team April 12, 2023 18:09
@eirsep eirsep merged commit e50c70a into opensearch-project:main Apr 12, 2023
@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-396-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e50c70ab8bdbd55337598cc4b3f5c68b7fb9525d
# Push it to GitHub
git push --set-upstream origin backport/backport-396-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-396-to-2.5.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2023
Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit e50c70a)
eirsep added a commit that referenced this pull request Apr 12, 2023
Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit e50c70a)

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
…oject#396) (opensearch-project#397)

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

Co-authored-by: Surya Sashank Nistala <[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
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.

3 participants