-
Notifications
You must be signed in to change notification settings - Fork 906
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][Bug] Check if workspaces exists when creating saved objects #8739
[Workspace][Bug] Check if workspaces exists when creating saved objects #8739
Conversation
Signed-off-by: yubonluo <[email protected]>
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8739 +/- ##
=======================================
Coverage 60.88% 60.88%
=======================================
Files 3802 3802
Lines 91083 91087 +4
Branches 14382 14382
=======================================
+ Hits 55456 55461 +5
Misses 32086 32086
+ Partials 3541 3540 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Show resolved
Hide resolved
I think we also need to fix the tests. Then I could help to approve. |
Signed-off-by: yubonluo <[email protected]>
…yubonluo/OpenSearch-Dashboards into 2.18/fix-create-saved-objects-api-issue
Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
invalidWorkspaces = [workspaces[0]]; | ||
} | ||
} else { | ||
const workspaceList = await this.workspaceClient.list( |
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.
I'm good with the current implementation, but perhaps we should introduce a new workspaceClient.bulkGet
API, can we add a TODO item if it makes sense? @yubonluo @SuZhou-Joe
…ts (#8739) * Check if workspaces exists when creating saved objects Signed-off-by: yubonluo <[email protected]> * Changeset file for PR #8739 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test error Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test errors Signed-off-by: yubonluo <[email protected]> * add integration tests Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 340326f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ts (opensearch-project#8739) * Check if workspaces exists when creating saved objects Signed-off-by: yubonluo <[email protected]> * Changeset file for PR opensearch-project#8739 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test error Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test errors Signed-off-by: yubonluo <[email protected]> * add integration tests Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…ts (opensearch-project#8739) * Check if workspaces exists when creating saved objects Signed-off-by: yubonluo <[email protected]> * Changeset file for PR opensearch-project#8739 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test error Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test errors Signed-off-by: yubonluo <[email protected]> * add integration tests Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…ts (opensearch-project#8739) * Check if workspaces exists when creating saved objects Signed-off-by: yubonluo <[email protected]> * Changeset file for PR opensearch-project#8739 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test error Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * fix test errors Signed-off-by: yubonluo <[email protected]> * add integration tests Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Signed-off-by: Federico Silva <[email protected]>
Description
When calling create/bulkCreate save object with API, it needs to check if the passed workspaces exist.
Issues Resolved
Screenshot
No ui change
Testing the changes
Create a saved object
bulk create saved objects
option 1
option 2
Changelog
Check List
yarn test:jest
yarn test:jest_integration