Skip to content

fix(slo): rollback when errors happen during the update use case - #168142

Merged
kdelemme merged 4 commits into
elastic:mainfrom
kdelemme:slo/update-rollback
Oct 6, 2023
Merged

kdelemme merged 4 commits into
elastic:mainfrom
kdelemme:slo/update-rollback

Conversation

@kdelemme

@kdelemme kdelemme commented Oct 5, 2023 •

Copy link
Copy Markdown
Contributor

Resolves #167938
Resolves #168051

Summary

This PR changes the update SLO use case to make it more resilient to errors happening at any step of the flow.
We moved the deletion of the original SLO data (rollup and summary) at the very end of the flow, and we handle errors at every step, and always restore the original SLO.

Step Rollback steps in case of error during the step
Saving the updated SLO in the repository Nothing
Transform installation Store (restore) the original SLO in the repository
Transform preview or start Uninstall the new transform, store the original SLO in the repository
Original transform stop or uninstallation Nothing

@kdelemme kdelemme self-assigned this Oct 5, 2023
@ghost

ghost commented Oct 5, 2023

Copy link
Copy Markdown

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless 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" Feature:SLO v8.12.0 backport:prev-minor labels Oct 5, 2023
@kibana-ci

Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

cc @kdelemme

@simianhacker simianhacker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kdelemme
kdelemme marked this pull request as ready for review October 6, 2023 13:26
@kdelemme
kdelemme requested a review from a team October 6, 2023 13:26
@elasticmachine

Copy link
Copy Markdown
Contributor

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

@kdelemme
kdelemme merged commit 377a3e4 into elastic:main Oct 6, 2023
@kdelemme
kdelemme deleted the slo/update-rollback branch October 6, 2023 13:28
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 6, 2023
@kibanamachine

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 8.11

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 Oct 6, 2023
…se (#168142) (#168221)

# Backport

This will backport the following commits from `main` to `8.11`:
- [fix(slo): rollback when errors happen during the update use case
(#168142)](#168142)

<!--- 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-10-06T13:28:41Z","message":"fix(slo):
rollback when errors happen during the update use case
(#168142)","sha":"377a3e499c72dac6415a36e20e3846c1bf36a354","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
Actionable
Observability","backport:prev-minor","Feature:SLO","v8.12.0"],"number":168142,"url":"https://github.com/elastic/kibana/pull/168142","mergeCommit":{"message":"fix(slo):
rollback when errors happen during the update use case
(#168142)","sha":"377a3e499c72dac6415a36e20e3846c1bf36a354"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168142","number":168142,"mergeCommit":{"message":"fix(slo):
rollback when errors happen during the update use case
(#168142)","sha":"377a3e499c72dac6415a36e20e3846c1bf36a354"}}]}]
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

Feature:SLO 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.11.0 v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SLO] Editing an SLO without view_index_metadata on source leaves the SLO in a broken state. [SLO] Handle rollback when update fails

5 participants