-
Notifications
You must be signed in to change notification settings - Fork 885
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] Handle data sources and advanced settings as global object. #6524
Merged
BionIT
merged 5 commits into
opensearch-project:main
from
SuZhou-Joe:disallowed-objects-in-workspace
Apr 19, 2024
Merged
[Workspace] Handle data sources and advanced settings as global object. #6524
BionIT
merged 5 commits into
opensearch-project:main
from
SuZhou-Joe:disallowed-objects-in-workspace
Apr 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ch-project#313) * feat: POC implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add some comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: revert dependency Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address one TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: some special logic on specific operation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as empty array for advanced settings Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: unified workspaces parameters when parsing from router Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: improve code coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use unified types Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address comments Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use request app to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use app state to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove workspaces when listing data sources Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless code change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: throw error if the type is not allowed Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change the implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add error message Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add test case and add restrict on create method Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change type Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * refactor: move logic to conflict check wrapper Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe
requested review from
ananzh,
kavilla,
AMoo-Miki,
ashwin-pc,
joshuarrrr,
abbyhu2000,
zengyan-amazon,
zhongnansu,
manasvinibs,
ZilongX,
Flyingliuhub,
curq,
bandinib-amzn,
ruanyl,
BionIT and
xinruiba
as code owners
April 18, 2024 02:59
BionIT
reviewed
Apr 18, 2024
...plugins/workspace/server/saved_objects/saved_objects_wrapper_for_check_workspace_conflict.ts
Outdated
Show resolved
Hide resolved
...plugins/workspace/server/saved_objects/saved_objects_wrapper_for_check_workspace_conflict.ts
Show resolved
Hide resolved
...plugins/workspace/server/saved_objects/saved_objects_wrapper_for_check_workspace_conflict.ts
Outdated
Show resolved
Hide resolved
...plugins/workspace/server/saved_objects/saved_objects_wrapper_for_check_workspace_conflict.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Lu Yu <nluyu@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
ruanyl
previously approved these changes
Apr 18, 2024
...plugins/workspace/server/saved_objects/saved_objects_wrapper_for_check_workspace_conflict.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
ruanyl
approved these changes
Apr 18, 2024
BionIT
approved these changes
Apr 19, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Apr 23, 2024
…t. (#6524) * Handle data sources and advanced settings as global object. (#313) * feat: POC implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add some comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: revert dependency Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address one TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: some special logic on specific operation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as empty array for advanced settings Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: unified workspaces parameters when parsing from router Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: improve code coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use unified types Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address comments Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use request app to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use app state to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove workspaces when listing data sources Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless code change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: throw error if the type is not allowed Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change the implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add error message Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add test case and add restrict on create method Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change type Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * refactor: move logic to conflict check wrapper Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #6524 created/updated * Apply suggestions from code review Co-authored-by: Lu Yu <nluyu@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize based on comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless default value Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Lu Yu <nluyu@amazon.com> (cherry picked from commit da88296) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe
pushed a commit
that referenced
this pull request
Apr 23, 2024
…t. (#6524) (#6611) * Handle data sources and advanced settings as global object. (#313) * feat: POC implementation * feat: add some comment * feat: revert dependency * feat: update comment * feat: address one TODO * feat: address TODO * feat: add unit test * feat: some special logic on specific operation * feat: add integration test * feat: declare workspaces as empty array for advanced settings * feat: unified workspaces parameters when parsing from router * feat: improve code coverage * feat: declare workspaces as null * feat: use unified types * feat: update comment * feat: remove null * feat: address comments * feat: use request app to store request workspace id * feat: use app state to store request workspace id * feat: remove workspaces when listing data sources * feat: remove useless code change * feat: throw error if the type is not allowed * feat: add unit test * feat: add integration test * feat: change the implementation * feat: remove useless change * feat: remove useless change * feat: add integration test * fix: unit test * feat: add error message * fix: integration test * fix: integration test * feat: remove useless change * feat: add test case and add restrict on create method * feat: change type * feat: change comment * feat: optimize test * refactor: move logic to conflict check wrapper * feat: remove useless change * fix: unit test * fix: unit test --------- * Changeset file for PR #6524 created/updated * Apply suggestions from code review * feat: optimize based on comment * feat: remove useless default value --------- (cherry picked from commit da88296) Signed-off-by: SuZhou-Joe <suzhou@amazon.com> 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> Co-authored-by: Lu Yu <nluyu@amazon.com>
LDrago27
pushed a commit
to LDrago27/OpenSearch-Dashboards
that referenced
this pull request
Jun 3, 2024
…t. (opensearch-project#6524) * Handle data sources and advanced settings as global object. (opensearch-project#313) * feat: POC implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add some comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: revert dependency Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address one TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address TODO Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: some special logic on specific operation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as empty array for advanced settings Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: unified workspaces parameters when parsing from router Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: improve code coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: declare workspaces as null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use unified types Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove null Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: address comments Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use request app to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: use app state to store request workspace id Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove workspaces when listing data sources Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless code change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: throw error if the type is not allowed Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change the implementation Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add error message Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: integration test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add test case and add restrict on create method Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change type Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: change comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * refactor: move logic to conflict check wrapper Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR opensearch-project#6524 created/updated * Apply suggestions from code review Co-authored-by: Lu Yu <nluyu@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize based on comment Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: remove useless default value Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Lu Yu <nluyu@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR handles data sources and advanced settings specially to make
global objects
will be correctly handled inside workspace.For 2.14:
For the long future:
For the visualizations and dashboards that rely on the data sources, when importing, the reference id won't be regenerated per https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/server/saved_objects/import/regenerate_ids.ts#L41. So if users import visualizations along with data sources into a workspace, only the visualizations will be imported and it will try to reference a should-existing global data source.
Issues Resolved
closes #6523
Screenshot
Import data source
Testing the changes
yml
file to enable workspace and data sources.Changelog
Check List
yarn test:jest
yarn test:jest_integration