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]Remove default appended features #7841

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Aug 26, 2024

Description

This PR is for removing default appended features logic for workspace create and update page. For now only workspace_detail will be appended to the features array in the workspace form. But the workspace_detail feature already been added to workspace's use case in this code. Which means the workspace_detail feature will always be able to access inside workspace, then we don't need to append by default.

Issues Resolved

#7844

Screenshot

No UI changes

Testing the changes

  • Clone branch code and run yarn osd bootstrap --single-version ignore
  • Add below configs in config/opensearch_dashboards.yml
savedObjects.permission.enabled: true
workspace.enabled: true
uiSettings:
  overrides:
    'home:useNewHomePage': true
  • Run yarn start --no-base-path
  • Login and visit workspace create page
  • Fill out workspace form and open devtools
  • Click create button and check POST /api/workspaces request in devtools, the features array should not includes workspace_detail like below image
    image
  • Page will redirect to workspace_detail after create successfully
  • Click "Edit" button and add change description
  • Click "Save changes" and check PUT /api/workspaces/{:id}, the features array should not includes workspace_detail like below image
    image

Changelog

  • feat: [Workspace]Remove default appended features

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: Lin Wang <wonglam@amazon.com>
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

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

Project coverage is 63.83%. Comparing base (452b65d) to head (f723bd1).
Report is 151 commits behind head on main.

Files with missing lines Patch % Lines
...ic/components/workspace_form/use_workspace_form.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7841      +/-   ##
==========================================
- Coverage   63.83%   63.83%   -0.01%     
==========================================
  Files        3661     3661              
  Lines       81347    81343       -4     
  Branches    12978    12978              
==========================================
- Hits        51926    51922       -4     
  Misses      26235    26235              
  Partials     3186     3186              
Flag Coverage Δ
Linux_1 30.14% <50.00%> (-0.01%) ⬇️
Linux_2 55.87% <ø> (ø)
Linux_3 40.39% <ø> (ø)
Linux_4 31.34% <ø> (ø)
Windows_1 30.16% <50.00%> (-0.01%) ⬇️
Windows_2 55.82% <ø> (ø)
Windows_3 40.39% <ø> (ø)
Windows_4 31.34% <ø> (ø)

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.

@ruanyl ruanyl added the v2.17.0 label Aug 26, 2024
@SuZhou-Joe SuZhou-Joe merged commit ca66127 into opensearch-project:main Aug 26, 2024
75 of 76 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 26, 2024
* Remove workspace_detail from default append features

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #7841 created/updated

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit ca66127)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Aug 27, 2024
* Remove workspace_detail from default append features



* Changeset file for PR #7841 created/updated

---------



(cherry picked from commit ca66127)

Signed-off-by: Lin Wang <wonglam@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.

4 participants