Skip to content

Comments

feat(slo): Bulk delete UI#219634

Merged
kdelemme merged 26 commits intoelastic:mainfrom
kdelemme:slo/bulk-delete-ui
May 1, 2025
Merged

feat(slo): Bulk delete UI#219634
kdelemme merged 26 commits intoelastic:mainfrom
kdelemme:slo/bulk-delete-ui

Conversation

@kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Apr 29, 2025

🍒 Summary

This PR adds a bulk delete button on the SLO management page when the user selects one or more SLOs.
When bulk deleting some SLOs, we store a task in a BulkOperationContext and we keep polling every operation tasks until they are completed.

We currently don't show much information about pending tasks being polled, but we could easily build something around it. One other idea I had was to store the tasks in the local storage, so upon refresh we would still be able to continue the polling and show the status to the user.

Refactoring

This PR also refactors the various SLO actions we can do in different places: dashboards, listing page (all views), details page.
Instead of duplicating the management of the modals everywhere, we abstracted this logic in a context provider.

Testing

Main feature: bulk delete

  • Create some SLOs
  • Go to /slos/management
  • Select some SLOs (or all), and click the Delete {count} SLOs button
  • Open the network tab, and hit confirm on the confirmation modal
  • Notice the polling happens, and when completed, the definitions response is refreshed

Refactoring

Make sure it's still possible to do the following actions in all views of the list page, and the details page and the various dashboard embeddables:

  • Delete an SLO
  • Clone an SLO
  • Disable an SLO
  • Enable an SLO

@kdelemme kdelemme requested a review from a team as a code owner April 29, 2025 20:39
@botelastic botelastic bot added the Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. label Apr 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@kdelemme kdelemme marked this pull request as draft April 29, 2025 20:39
@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Apr 29, 2025
@kdelemme kdelemme force-pushed the slo/bulk-delete-ui branch from 3fb08ef to 8b6cb83 Compare April 30, 2025 12:46
setAction: (action: Action) => void;
}) {
return (
<EuiButtonEmpty
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a bit hard to find

@kdelemme kdelemme force-pushed the slo/bulk-delete-ui branch from 8b6cb83 to 9772fba Compare April 30, 2025 16:35
@kdelemme kdelemme marked this pull request as ready for review April 30, 2025 19:39
@kdelemme
Copy link
Contributor Author

@baileycash-elastic I've updated the PR to refactor the modals management using a context. And change the various places we used to manage modals to use it.

@prodsecmachine
Copy link
Collaborator

prodsecmachine commented Apr 30, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@kdelemme kdelemme force-pushed the slo/bulk-delete-ui branch from 27e1ef9 to 8b2f55e Compare May 1, 2025 12:45
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #6 / integrations Endpoint Exceptions "before all" hook for "should add event.module=endpoint to entry if only wildcard operator is present"
  • [job] [logs] FTR Configs #117 / Stateful Observability - Deployment-agnostic API integration tests SyntheticsAPITests SyntheticsEnablement [PUT] /internal/uptime/service/enablement returns response for an admin with privilege

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
slo 1103 1107 +4

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 205 207 +2

Async chunks

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

id before after diff
slo 906.5KB 908.5KB +1.9KB
Unknown metric groups

API count

id before after diff
@kbn/slo-schema 205 207 +2

History

@kdelemme kdelemme merged commit 5cafb9c into elastic:main May 1, 2025
10 checks passed
@kdelemme kdelemme deleted the slo/bulk-delete-ui branch May 1, 2025 18:49
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/14781377169

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 219634

Questions ?

Please refer to the Backport tool documentation

kapral18 added a commit to kapral18/kibana that referenced this pull request May 4, 2025
…ends-crash

* main: (111 commits)
  [ResponseOps][Rules] Cases action title length too long (elastic#219226)
  [main] Sync bundled packages with Package Storage (elastic#219839)
  Fix ignored dynamic templates (elastic#219875)
  Enforce dependency review by kibana-security workflow (elastic#219262)
  [Security Solution] [Detections] Removes tech preview text from eql seq suppression ui (elastic#219870)
  [Security Solution] Fix alerts table potentially not applying alert assignees (elastic#219460)
  fix(slo): alert deletion (elastic#219876)
  [AI4DSOC] fix styling to address cutoff when screen is narrow (elastic#219306)
  [Security Solution][Endpoint] Response action create and history log API updates in of space awareness (elastic#218674)
  Update publish_oas_docs.sh to deploy Kibana Serverless API docs (elastic#219867)
  feat(slo): lock resource installation (elastic#219747)
  [AI4DSOC] Alert flyout code cleanup (elastic#219810)
  [fleet] fixing `isAgentlessDefault` config usage and readability improvements to `isAgentlessSetupDefault` (elastic#219423)
  feat(slo): Bulk delete UI (elastic#219634)
  m1 demo prep (elastic#219588)
  [Security Solution] Replace sourcerer in EQL tab with dataview picker (elastic#218897)
  [AI4DSOC] Attack discovery widget follow up follow up (elastic#219849)
  [AI Assistant] Fix some OpenAI models not accepting temperature for Inference service (elastic#218887)
  Update dependency msw to ~2.7.5 (main) (elastic#219289)
  Use new client URLs in doc link service (elastic#219600)
  ...
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 5, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 219634 locally
cc: @kdelemme

kdelemme added a commit to kdelemme/kibana that referenced this pull request May 6, 2025
(cherry picked from commit 5cafb9c)

# Conflicts:
#	x-pack/solutions/observability/plugins/slo/public/pages/slo_management/components/slo_management_content.tsx
#	x-pack/solutions/observability/plugins/slo/public/pages/slo_management/components/slo_management_outdated_filter_callout.tsx
#	x-pack/solutions/observability/plugins/slo/public/pages/slo_management/components/slo_management_search_bar.tsx
#	x-pack/solutions/observability/plugins/slo/public/pages/slo_management/components/slo_management_table.tsx
#	x-pack/solutions/observability/plugins/slo/public/pages/slo_management/hooks/use_url_search_state.ts
@kdelemme
Copy link
Contributor Author

kdelemme commented May 6, 2025

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @kdelemme

kdelemme added a commit to kdelemme/kibana that referenced this pull request May 7, 2025
@kdelemme
Copy link
Contributor Author

kdelemme commented May 7, 2025

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

kdelemme added a commit that referenced this pull request May 7, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [feat(slo): Bulk delete UI
(#219634)](#219634)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2025-05-01T18:49:44Z","message":"feat(slo):
Bulk delete UI
(#219634)","sha":"5cafb9c2bfe1b522aaab380c6f82bd8b6c81ca0f","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0"],"title":"feat(slo):
Bulk delete
UI","number":219634,"url":"https://github.com/elastic/kibana/pull/219634","mergeCommit":{"message":"feat(slo):
Bulk delete UI
(#219634)","sha":"5cafb9c2bfe1b522aaab380c6f82bd8b6c81ca0f"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219634","number":219634,"mergeCommit":{"message":"feat(slo):
Bulk delete UI
(#219634)","sha":"5cafb9c2bfe1b522aaab380c6f82bd8b6c81ca0f"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 7, 2025
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants