Skip to content
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] Delete the virtual global workspace #7165

Merged

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented Jul 3, 2024

Description

Delete the virtual global workspace.
When workspace feature flag is enabled and user has not created any workspace, only OSD admin user can see any legacy saved object (not belonging to any workspace) on the home page. Non OSD admin users should not see the legacy saved objects if they can not access any workspace.

Issues Resolved

#7095

Screenshot

Testing the changes

  1. Clone the latest osd code and run yarn osd bootstrap
  2. Modify config/opensearch_dashboards.yml
workspace.enabled: true 
savedObjects.permission.enabled: true
  1. Run yarn start --no-base-path

Changelog

  • feat: [Workspace] Delete the virtual global workspace

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: yubonluo <yubonluo@amazon.com>
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.55%. Comparing base (d0a844f) to head (d7f28ab).

Files Patch % Lines
...d_objects_management/server/routes/scroll_count.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7165   +/-   ##
=======================================
  Coverage   67.54%   67.55%           
=======================================
  Files        3469     3469           
  Lines       68502    68478   -24     
  Branches    11140    11130   -10     
=======================================
- Hits        46273    46263   -10     
+ Misses      19524    19512   -12     
+ Partials     2705     2703    -2     
Flag Coverage Δ
Linux_1 33.13% <100.00%> (-0.02%) ⬇️
Linux_2 55.26% <ø> (+<0.01%) ⬆️
Linux_3 45.30% <ø> (-0.02%) ⬇️
Linux_4 34.71% <50.00%> (-0.01%) ⬇️
Windows_1 33.15% <100.00%> (?)
Windows_2 55.21% <ø> (+<0.01%) ⬆️
Windows_3 45.31% <ø> (-0.01%) ⬇️
Windows_4 34.71% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: yubonluo <yubonluo@amazon.com>
…enSearch-Dashboards into 2.16-delete-global-workspace
Signed-off-by: yubonluo <yubonluo@amazon.com>
…enSearch-Dashboards into 2.16-delete-global-workspace
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
ruanyl
ruanyl previously approved these changes Jul 8, 2024
@ruanyl ruanyl dismissed their stale review July 8, 2024 03:37

Need to double check the changes

Signed-off-by: yubonluo <yubonluo@amazon.com>
…enSearch-Dashboards into 2.16-delete-global-workspace
@ruanyl
Copy link
Member

ruanyl commented Jul 8, 2024

I like these changes, after removing the special "artificial" workspace, the code smells much better 😃

Signed-off-by: yubonluo <yubonluo@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 20cefab into opensearch-project:main Jul 8, 2024
72 of 73 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 8, 2024
* Delete the virtual global workspace

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Changeset file for PR #7165 created/updated

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* delete the useless code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* delete the useless code

Signed-off-by: yubonluo <yubonluo@amazon.com>

---------

Signed-off-by: yubonluo <yubonluo@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 20cefab)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jul 9, 2024
* Delete the virtual global workspace



* Changeset file for PR #7165 created/updated

* optimize the code



* optimize the code



* optimize the code



* optimize the code



* delete the useless code



* delete the useless code



---------



(cherry picked from commit 20cefab)

Signed-off-by: yubonluo <yubonluo@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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants