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

feat(slo): delete associated rules when deleting an SLO #156307

Merged
merged 2 commits into from
May 2, 2023

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented May 1, 2023

resolves #155007

📝 Summary

When deleting an SLO, we enforce the deletion of any existing rules.

🧪 Manual testing

  1. Create an SLO (using KQL for example)
  2. Create two rules on it
  3. Create another SLO without rules
  4. Delete the first SLO: the corresponding rules should be deleted as well.
  5. Delete the second SLO: no error should be logged in the Kibana console.

@kdelemme kdelemme self-assigned this May 1, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0 backport:prev-minor Backport to the previous minor version (i.e. one version back from main) labels May 1, 2023
@kdelemme kdelemme marked this pull request as ready for review May 1, 2023 21:03
@kdelemme kdelemme requested a review from a team as a code owner May 1, 2023 21:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 402 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 482 +3
total +5

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kdelemme

Copy link
Contributor

@CoenWarmer CoenWarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected! Nice!!

@kdelemme kdelemme merged commit dbedd53 into elastic:main May 2, 2023
@kdelemme kdelemme deleted the feat/delete-cascade-rules-slo branch May 2, 2023 13:42
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 2, 2023
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 2, 2023
… (#156386)

# Backport

This will backport the following commits from `main` to `8.8`:
- [feat(slo): delete associated rules when deleting an SLO
(#156307)](#156307)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2023-05-02T13:42:32Z","message":"feat(slo):
delete associated rules when deleting an SLO
(#156307)","sha":"dbedd53b481439a0c24c99fc11249caa50e78272","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
Actionable
Observability","backport:prev-minor","v8.9.0"],"number":156307,"url":"#156307:
delete associated rules when deleting an SLO
(#156307)","sha":"dbedd53b481439a0c24c99fc11249caa50e78272"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#156307:
delete associated rules when deleting an SLO
(#156307)","sha":"dbedd53b481439a0c24c99fc11249caa50e78272"}}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] When an SLO is deleted, the associated Rules should be deleted too
6 participants