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

Feature: create management / public workspaces when calling list api #236

Conversation

SuZhou-Joe
Copy link
Collaborator

@SuZhou-Joe SuZhou-Joe commented Oct 19, 2023

Description

Issues Resolved

Screenshot

Testing the changes

Check List

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

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

Merging #236 (90d9a25) into workspace-pr-integr (c271e74) will decrease coverage by 0.01%.
Report is 1 commits behind head on workspace-pr-integr.
The diff coverage is 100.00%.

@@                   Coverage Diff                   @@
##           workspace-pr-integr     #236      +/-   ##
=======================================================
- Coverage                66.55%   66.55%   -0.01%     
=======================================================
  Files                     3419     3420       +1     
  Lines                    65439    65458      +19     
  Branches                 10507    10508       +1     
=======================================================
+ Hits                     43555    43563       +8     
- Misses                   19270    19281      +11     
  Partials                  2614     2614              
Flag Coverage Δ
Linux_ 66.13% <100.00%> (-0.01%) ⬇️
_1 35.01% <100.00%> (+<0.01%) ⬆️
_2 55.56% <100.00%> (-0.02%) ⬇️
_3 44.46% <100.00%> (-0.02%) ⬇️
_4 34.85% <100.00%> (-0.01%) ⬇️

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

Files Coverage Δ
src/core/server/index.ts 100.00% <ø> (ø)
src/core/utils/constants.ts 100.00% <100.00%> (ø)
src/plugins/workspace/common/constants.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ruanyl
Copy link
Owner

ruanyl commented Oct 19, 2023

Approved, actually myself still not fully convinced by the current implementation, but I believe this is the best we can do at the moment.

Having the default workspace(management, public, personal) initialization logic in the list API makes the list API a bit overwhelming. But it's no easy to choose the perfect point to do the initialization.

I'm thinking if we can overcome this by fine-tuning the UX? For example, we could have a workspace onboarding page which let the user to choose if they want to enabled public management or personal workspace. So instead of implicitly initialize the workspaces automatically, we let the user to make the choice explicitly. Could discuss this later with UX. cc @kgcreative

@SuZhou-Joe
Copy link
Collaborator Author

Approved, actually myself still not fully convinced by the current implementation, but I believe this is the best we can do at the moment.

Having the default workspace(management, public, personal) initialization logic in the list API makes the list API a bit overwhelming. But it's no easy to choose the perfect point to do the initialization.

I'm thinking if we can overcome this by fine-tuning the UX? For example, we could have a workspace onboarding page which let the user to choose if they want to enabled public management or personal workspace. So instead of implicitly initialize the workspaces automatically, we let the user to make the choice explicitly. Could discuss this later with UX. cc @kgcreative

Totally agreed.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 8ff9e88 into ruanyl:workspace-pr-integr Oct 23, 2023
34 checks passed
@opensearch-workspace-development

The backport to workspace failed:

The process '/usr/bin/git' failed with exit code 128

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-workspace workspace
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-workspace
# Create a new branch
git switch --create backport/backport-236-to-workspace
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8ff9e8839813b701057b4c76269f35943944fdab
# Push it to GitHub
git push --set-upstream origin backport/backport-236-to-workspace
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-workspace

Then, create a pull request where the base branch is workspace and the compare/head branch is backport/backport-236-to-workspace.

wanglam pushed a commit that referenced this pull request Feb 26, 2024
…236)

* feat: create management / public workspaces when calling list api

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: fix bootstrap

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: integration test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: flaky test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe added a commit that referenced this pull request Mar 18, 2024
…236)

* feat: create management / public workspaces when calling list api

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: fix bootstrap

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: integration test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: flaky test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.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.

4 participants