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): manage slo state #149546

Merged
merged 5 commits into from
Jan 30, 2023
Merged

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Jan 25, 2023

📝 Summary

Resolves #148148

This PR adds two new routes for managing SLOs state: enable and disable.
When enabling an SLO, we set the enabled flag to true and start the related transform.
When disabling an SLO, we set the enabled flag to false and stop the related transform.

Nothing is done if the slo is already in the requested state.

🥼 Manual testing

  1. Create an SLO
  2. Disable it twice
  3. Enable it twice
enable slo
curl --request POST \
  --url http://localhost:5601/kibana/api/observability/slos/f342de10-9cdb-11ed-b784-37f76896fdb8/enable \
  --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
  --header 'kbn-xsrf: oui'
enable slo
curl --request POST \
  --url http://localhost:5601/kibana/api/observability/slos/f342de10-9cdb-11ed-b784-37f76896fdb8/disable \
  --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
  --header 'kbn-xsrf: oui'

@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.7.0 labels Jan 25, 2023
@kdelemme kdelemme self-assigned this Jan 25, 2023
@kdelemme kdelemme force-pushed the feat/enable-disable-slo branch 2 times, most recently from dd2e54c to 9532c1b Compare January 25, 2023 20:20
@kdelemme kdelemme marked this pull request as ready for review January 26, 2023 13:41
@kdelemme kdelemme requested a review from a team as a code owner January 26, 2023 13:41
@elasticmachine
Copy link
Contributor

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

@kdelemme kdelemme force-pushed the feat/enable-disable-slo branch 2 times, most recently from a177f04 to 42d6870 Compare January 26, 2023 19:00
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.

Changes LGTM!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/slo-schema 73 75 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 572.7KB 572.7KB +10.0B
Unknown metric groups

API count

id before after diff
@kbn/slo-schema 73 75 +2

History

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

cc @kdelemme

@kdelemme kdelemme merged commit 894b195 into elastic:main Jan 30, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 30, 2023
@kdelemme kdelemme deleted the feat/enable-disable-slo branch January 30, 2023 16:02
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this pull request Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting 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.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] Add support for enabling/disabling an SLO
5 participants