OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[Enhancement] combine list API call after workspace deleted
Description
What this PR does:
- Add a
batchDeletemethod to delete multiple workspaces, avoiding unncessaryworkspaces/_listAPI call. - Change workspace deletion from parallel to serial to avoid operation conflicts on the same data source, which could lead to deletion failures.
- Show notification after all deletion done. Change the notification when workspace deletion failed, showing how many deletions failed and succeeded.
Issues Resolved
N/A
Screenshot
N/A
Testing the changes
Delete multiple workspaces with the same data source.
Changelog
- feat: Add batch delete method, fix deletion error
Check List
- [ ] All tests pass
- [ ]
yarn test:jest - [ ]
yarn test:jest_integration - [ ] New functionality includes testing.
- [ ] New functionality has been documented.
- [ ] Update CHANGELOG.md
- [x] Commits are signed per the DCO using --signoff
Codecov Report
:x: Patch coverage is 75.43860% with 14 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 62.06%. Comparing base (160d839) to head (ed1683b).
:warning: Report is 13 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #9781 +/- ##
=======================================
Coverage 62.05% 62.06%
=======================================
Files 4288 4289 +1
Lines 109625 109668 +43
Branches 18032 18041 +9
=======================================
+ Hits 68032 68066 +34
- Misses 36968 36977 +9
Partials 4625 4625
| Flag | Coverage Δ | |
|---|---|---|
| Linux_1 | 27.64% <75.43%> (+0.02%) |
:arrow_up: |
| Linux_2 | 41.47% <ø> (ø) |
|
| Linux_3 | 39.46% <ø> (ø) |
|
| Linux_4 | 33.56% <ø> (ø) |
|
| Windows_1 | 27.66% <75.43%> (+0.02%) |
:arrow_up: |
| Windows_2 | 41.44% <ø> (ø) |
|
| Windows_3 | 39.47% <ø> (+<0.01%) |
:arrow_up: |
| Windows_4 | 33.56% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hi @s-zx , thanks for raising PR to fix this issue. Could you fix these unit tests first?
Hi @s-zx , thanks for raise PR to fix this issue. Could you fix these unit tests first?
Thanks for letting me know, I will fix these.
We should add batchDelete function to IWorkspaceClient interface in src/core/public/workspace/types.ts
We should add
batchDeletefunction toIWorkspaceClientinterface insrc/core/public/workspace/types.ts
Got it. Thanks for your reminder!
Could you please add a video for this enhancement?
Could you please add a video for this enhancement?
Sure, I will add this later.
I remember workspace detail page src/plugins/workspace/public/components/workspace_detail/workspace_detail.tsx also call the DeleteWorkspaceModal, could you check if it is compatible?
I remember workspace detail page
src/plugins/workspace/public/components/workspace_detail/workspace_detail.tsxalso call theDeleteWorkspaceModal, could you check if it is compatible?
I remember workspace detail page
src/plugins/workspace/public/components/workspace_detail/workspace_detail.tsxalso call theDeleteWorkspaceModal, could you check if it is compatible?
OK, I will check it.
I remember workspace detail page
src/plugins/workspace/public/components/workspace_detail/workspace_detail.tsxalso call theDeleteWorkspaceModal, could you check if it is compatible?
I tested it and It works as expected.
LGTM! Thanks for fixing this issue.
