-
Notifications
You must be signed in to change notification settings - Fork 0
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
Handle data sources and advanced settings as global object. #313
Handle data sources and advanced settings as global object. #313
Conversation
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## workspace-pr-integr #313 +/- ##
=======================================================
- Coverage 35.17% 32.89% -2.28%
=======================================================
Files 1885 2243 +358
Lines 36421 45522 +9101
Branches 6672 7153 +481
=======================================================
+ Hits 12810 14976 +2166
- Misses 22761 29816 +7055
+ Partials 850 730 -120
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
...ugins/workspace/server/saved_objects/integration_tests/workspace_id_consumer_wrapper.test.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
...ugins/workspace/server/saved_objects/integration_tests/workspace_id_consumer_wrapper.test.ts
Outdated
Show resolved
Hide resolved
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.
Does it sound more logical if we put these changes to the workspace conflict check wrapper?
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.test.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Exactly, I forgot why I wrote the logic into workspace_id_consumer. We should put these logic into conflict wrapper. Done for that. |
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…t. (opensearch-project#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 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>
…t. (opensearch-project#6524) (opensearch-project#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 opensearch-project#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>
Description
Handle data source and config as global objects.
Issues Resolved
Screenshot
Import data source
Copy data source
Create data source in workspace(in normal flow, user won't be able to visit data source management page inside workspace)
Create advanced settings in workspace(in normal flow, user won't be able to visit advanced settings page inside workspace)
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration