-
Notifications
You must be signed in to change notification settings - Fork 75
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
Delete detector successfully if workflow is missing #790
Delete detector successfully if workflow is missing #790
Conversation
Signed-off-by: Chase Engelbrecht <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
============================================
+ Coverage 24.66% 24.73% +0.07%
- Complexity 1022 1023 +1
============================================
Files 275 275
Lines 12711 12695 -16
Branches 1399 1400 +1
============================================
+ Hits 3135 3140 +5
+ Misses 9311 9290 -21
Partials 265 265 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Chase Engelbrecht <[email protected]>
The backport to
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.9 2.9
# Navigate to the new working tree
cd .worktrees/backport-2.9
# Create a new branch
git switch --create backport/backport-790-to-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9 Then, create a pull request where the |
The backport to
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.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport/backport-790-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10 Then, create a pull request where the |
The backport to
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.11-with-features 2.11-with-features
# Navigate to the new working tree
cd .worktrees/backport-2.11-with-features
# Create a new branch
git switch --create backport/backport-790-to-2.11-with-features
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.11-with-features
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.11-with-features Then, create a pull request where the |
The backport to
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.9-with-features 2.9-with-features
# Navigate to the new working tree
cd .worktrees/backport-2.9-with-features
# Create a new branch
git switch --create backport/backport-790-to-2.9-with-features
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.9-with-features
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9-with-features Then, create a pull request where the |
The backport to
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.11 2.11
# Navigate to the new working tree
cd .worktrees/backport-2.11
# Create a new branch
git switch --create backport/backport-790-to-2.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.11
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.11 Then, create a pull request where the |
The backport to
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.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-790-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0ad91ccecd846439bb3136390e2defbf59eb9e10
# Push it to GitHub
git push --set-upstream origin backport/backport-790-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]>
Using workflows in detectors was introduced in 2.10 as part of #533, backporting to 2.9 and 2.9-with-features should be unnecessary. Working to resolve the conflicts in the other backport branches |
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
…ct#790) * Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
* Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
* Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
* Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
* Delete detector successfully if workflow is missing Signed-off-by: Chase Engelbrecht <[email protected]> * Refactor to use existing NotFound exception checker Signed-off-by: Chase Engelbrecht <[email protected]> --------- Signed-off-by: Chase Engelbrecht <[email protected]> (cherry picked from commit 0ad91cc)
Description
When workflow usage is enabled, deleting a detector after the workflow has been deleted will fail with a "Workflow not found" exception. This PR adds logic to check for a 404 on workflow deletion and proceed with detector deletion if so.
Issues Resolved
Partially #618
Related PR: opensearch-project/alerting#1346
Check List
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.