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

Self host runner #3

Open
wants to merge 132 commits into
base: workspace
Choose a base branch
from
Open

Self host runner #3

wants to merge 132 commits into from

Conversation

SuZhou-Joe
Copy link
Owner

@SuZhou-Joe SuZhou-Joe commented Sep 7, 2023

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

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

ruanyl and others added 30 commits August 3, 2023 17:21
add license header

Signed-off-by: Yulong Ruan <[email protected]>
* feat: add workspace creator page

Signed-off-by: Lin Wang <[email protected]>

* feat: integrate with application workspace template

Signed-off-by: Lin Wang <[email protected]>

* feat: add max-width and remove image wrapper if not exists

Signed-off-by: Lin Wang <[email protected]>

* feat: update filter condition to align with collapsible nav

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* fix: validation & query

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify file name to reduce confusion

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add landing logic to retrive workspace id

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: make client more robust

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: use Subject

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
* feat: integrate with workspace create API

Signed-off-by: Lin Wang <[email protected]>

* feat: update to i18n text for toast

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* feat: add currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add emit on currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
Add workspace dropdown list 

---------

Signed-off-by: zhichao-aws <[email protected]>
Signed-off-by: SuZhoue-Joe <[email protected]>
Signed-off-by: suzhou <[email protected]>
Co-authored-by: SuZhoue-Joe <[email protected]>
* feat: init workspace menu stage 1

Signed-off-by: tygao <[email protected]>

* fix: remove port diff

Signed-off-by: tygao <[email protected]>

* feat: update menu logic

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
* fix import error

Signed-off-by: Hailong Cui <[email protected]>

* fix osd bootstrap failure

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
* feat: add workspace overview page

Signed-off-by: Lin Wang <[email protected]>

* refactor: move paths to common constants

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace overview item by custom nav in start phase

Signed-off-by: Lin Wang <[email protected]>

* refactor: change to currentWorkspace$ in workspace client

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
fix failed test snapshots

temporary fix: fetch functional test from main branch

fixed git error which cannot find ref due to feature branch `workspace`
not exists on repo opensearch-dashboards-functional-test

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
)

* change to currentWorkspace, wrap title using i18n

Signed-off-by: zhichao-aws <[email protected]>

* change import

Signed-off-by: zhichao-aws <[email protected]>

* directly return [] if currentWorkspace is null

Signed-off-by: zhichao-aws <[email protected]>

---------

Signed-off-by: zhichao-aws <[email protected]>
* feat: update workspace switch

Signed-off-by: tygao <[email protected]>

* fix: fix switch error

Signed-off-by: tygao <[email protected]>

* fix: fix prettier after merge

Signed-off-by: tygao <[email protected]>

* chore: remove extra code after merge

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
Hailong-am and others added 13 commits August 30, 2023 11:52
* fix typo

Signed-off-by: yuye-aws <[email protected]>

* adjust copy modal

Signed-off-by: yuye-aws <[email protected]>

* list workspace with write permission on copy modal

Signed-off-by: yuye-aws <[email protected]>

* add copy icon and move getcopyworkspaces function from copy_modal to saved_object table

Signed-off-by: yuye-aws <[email protected]>

* fix duplicate error in public workspace and change copy to duplicate all in header

Signed-off-by: yuye-aws <[email protected]>

* bug fix: create saved objects in public workspace

Signed-off-by: yuye-aws <[email protected]>

* update snapshots

Signed-off-by: yuye-aws <[email protected]>

* remove unused import

Signed-off-by: yuye-aws <[email protected]>

* change validate schema

Signed-off-by: yuye-aws <[email protected]>

* behavior subject bug fix for workspace plugin

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
* add workspace name duplication check

Signed-off-by: Hailong Cui <[email protected]>

* update error message

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
* hide workspace feature for management workspace settings

Signed-off-by: yuye-aws <[email protected]>

* add workspace settings to management workspace

Signed-off-by: yuye-aws <[email protected]>

* prohibit name change for public and management workspace

Signed-off-by: yuye-aws <[email protected]>

* fix empty permission bug

Signed-off-by: yuye-aws <[email protected]>

* cancel export

Signed-off-by: yuye-aws <[email protected]>

* position fix

Signed-off-by: yuye-aws <[email protected]>

* make name text field readonly

Signed-off-by: yuye-aws <[email protected]>

* refactor render logic

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
…arch-project#129)

* cleanup: move WORKSPACE_TYPE constant to core/utils/constants

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: bootstrap

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
…roject#128)

* feat: setup mechanism to register different implementation on query DSL

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: some optimization on error message and response

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless clause

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: move some code to a util function

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2023

Codecov Report

All modified lines are covered by tests ✅

❗ No coverage uploaded for pull request base (workspace@c6037d5). Click here to learn what that means.

❗ Current head 66baef1 differs from pull request most recent head 977e6a5. Consider uploading reports for the commit 977e6a5 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             workspace       #3   +/-   ##
============================================
  Coverage             ?   66.80%           
============================================
  Files                ?     3285           
  Lines                ?    63176           
  Branches             ?    10076           
============================================
  Hits                 ?    42205           
  Misses               ?    18489           
  Partials             ?     2482           
Flag Coverage Δ
Linux_1 35.26% <0.00%> (?)
Linux_2 55.34% <0.00%> (?)
Linux_3 43.84% <0.00%> (?)
Linux_4 35.36% <0.00%> (?)
Windows_1 35.28% <0.00%> (?)
Windows_2 55.31% <0.00%> (?)
Windows_3 43.84% <0.00%> (?)
Windows_4 35.36% <0.00%> (?)

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: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
This reverts commit fc24867.
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 1, 2024
SuZhou-Joe added a commit that referenced this pull request Mar 5, 2024
SuZhou-Joe added a commit that referenced this pull request Mar 11, 2024
…objects client wrapper (opensearch-project#230)

* feat: add basic workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* feat: add unit test (#2)

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update client wrapper

Signed-off-by: tygao <[email protected]>

* feat: init permission control in workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Support disable permission check on workspace (opensearch-project#228)

* support disable permission check for workspace

Signed-off-by: Hailong Cui <[email protected]>

* fix typos

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>

* feat: add ACLSearchParams consumer in repository (#3)

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: ACLSearchParams missing in search dsl

Signed-off-by: Lin Wang <[email protected]>

* test: add integration test for workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* style: add empty line under license

Signed-off-by: Lin Wang <[email protected]>

* test: enable workspace permission control for integration tests

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace into includeHiddenTypes (opensearch-project#249)

* feat: add workspace into includeHiddenTypes of client wrapper and permission control client

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: hiddenType side effect

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* fix workspace client wrapper integration tests

Signed-off-by: Lin Wang <[email protected]>

* add permissions fields to workspace CRUD APIs

Signed-off-by: Lin Wang <[email protected]>

* Move WorkspacePermissionMode inside workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Address pr comments

Signed-off-by: Lin Wang <[email protected]>

* Remove ACLSearchParams in public SavedObjectsFindOptions

Signed-off-by: Lin Wang <[email protected]>

* Remove lodash and Add default permissionModes

Signed-off-by: Lin Wang <[email protected]>

* feat: address concerns on ensureRawRequest (#4)

* feat: address concerns on ensureRawRequest

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add check for empty array

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make find api backward compatible

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* Update annotations and  error

Signed-off-by: Lin Wang <[email protected]>

* Add unit tests for worksapce saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* Remove getPrincipalsOfObjects in permission

Signed-off-by: Lin Wang <[email protected]>

* Fix permissionEnabled flag missed in workspace plugin setup test

Signed-off-by: Lin Wang <[email protected]>

* Change back to Not Authorized error

Signed-off-by: Lin Wang <[email protected]>

* Fix unit tests for query_params and plugin setup

Signed-off-by: Lin Wang <[email protected]>

* Fix unittests in workspace server utils

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspacesSearchOperators to decouple ACLSearchParams

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit defaultSearchOperator in public savedobjetcs client

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit workspacesSearchOperator field

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: Lin Wang <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 18, 2024
…objects client wrapper (opensearch-project#230)

* feat: add basic workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* feat: add unit test (#2)

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update client wrapper

Signed-off-by: tygao <[email protected]>

* feat: init permission control in workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Support disable permission check on workspace (opensearch-project#228)

* support disable permission check for workspace

Signed-off-by: Hailong Cui <[email protected]>

* fix typos

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>

* feat: add ACLSearchParams consumer in repository (#3)

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: ACLSearchParams missing in search dsl

Signed-off-by: Lin Wang <[email protected]>

* test: add integration test for workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* style: add empty line under license

Signed-off-by: Lin Wang <[email protected]>

* test: enable workspace permission control for integration tests

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace into includeHiddenTypes (opensearch-project#249)

* feat: add workspace into includeHiddenTypes of client wrapper and permission control client

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: hiddenType side effect

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* fix workspace client wrapper integration tests

Signed-off-by: Lin Wang <[email protected]>

* add permissions fields to workspace CRUD APIs

Signed-off-by: Lin Wang <[email protected]>

* Move WorkspacePermissionMode inside workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Address pr comments

Signed-off-by: Lin Wang <[email protected]>

* Remove ACLSearchParams in public SavedObjectsFindOptions

Signed-off-by: Lin Wang <[email protected]>

* Remove lodash and Add default permissionModes

Signed-off-by: Lin Wang <[email protected]>

* feat: address concerns on ensureRawRequest (#4)

* feat: address concerns on ensureRawRequest

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add check for empty array

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make find api backward compatible

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* Update annotations and  error

Signed-off-by: Lin Wang <[email protected]>

* Add unit tests for worksapce saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* Remove getPrincipalsOfObjects in permission

Signed-off-by: Lin Wang <[email protected]>

* Fix permissionEnabled flag missed in workspace plugin setup test

Signed-off-by: Lin Wang <[email protected]>

* Change back to Not Authorized error

Signed-off-by: Lin Wang <[email protected]>

* Fix unit tests for query_params and plugin setup

Signed-off-by: Lin Wang <[email protected]>

* Fix unittests in workspace server utils

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspacesSearchOperators to decouple ACLSearchParams

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit defaultSearchOperator in public savedobjetcs client

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit workspacesSearchOperator field

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: Lin Wang <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
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.

9 participants