-
Notifications
You must be signed in to change notification settings - Fork 920
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
[Workspace] Unassign data source before deleteByWorkspace #7279
Conversation
Signed-off-by: tygao <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7279 +/- ##
==========================================
+ Coverage 67.30% 67.33% +0.02%
==========================================
Files 3500 3500
Lines 69219 69225 +6
Branches 11275 11276 +1
==========================================
+ Hits 46591 46613 +22
+ Misses 19903 19885 -18
- Partials 2725 2727 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for fixing this 👍
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7279-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d67d6ba1c82153c4a1ea7874ac05f142f41f4eac
# Push it to GitHub
git push --set-upstream origin backport/backport-7279-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
* unassign data source before deleteByWorkspace Signed-off-by: tygao <[email protected]> * Changeset file for PR #7279 created/updated --------- Signed-off-by: tygao <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit d67d6ba) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
) * unassign data source before deleteByWorkspace * Changeset file for PR #7279 created/updated --------- (cherry picked from commit d67d6ba) Signed-off-by: tygao <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
In current implementation, we call
deleteByWorkspace
to delete related saved objects when deleting a workspace. This will cause selected data source deleted when it is only assigned to this workspace. So we will unassign this data source before callingdeleteByWorkspace
.Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration