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

Ci/temp #17

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

Ci/temp #17

wants to merge 34 commits into from

Conversation

SuZhou-Joe
Copy link
Owner

Description

Issues Resolved

Screenshot

Testing the changes

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

SuZhou-Joe and others added 30 commits March 18, 2024 15:15
…search-project#130)

* feature: setup workspace skeleton and implement basic CRUD API on workspace

Signed-off-by: Zhou Su <[email protected]>

* feat: remove useless required plugins and logger typo

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

* feat: setup public side skeleton

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

---------

Signed-off-by: Zhou Su <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Zhou Su <[email protected]>
…ct#146)

* [Workspace] Add acl related functions for workspace

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

* Minor change

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

---------

Signed-off-by: gaobinlong <[email protected]>
The core workspace module(WorkspaceService) is a foundational component
that enables the implementation of workspace features within OSD
plugins. The purpose of the core workspace module is to provide
a framework for workspace implementations.

This module does not implement specific workspace
functionality but provides the essential infrastructure for plugins to
extend and customize workspace features, it maintains a shared
workspace state(observables) across the entire application to ensure
a consistent and up-to-date view of workspace-related information to
all parts of the application.

---------

Signed-off-by: Yulong Ruan <[email protected]>
…ct#182)

disable github workflows running on windows for development (opensearch-project#161)

---------

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
…PI (opensearch-project#185)

* [Workspace] Add workspaces parameters to all saved objects API

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

* feat: update snapshot

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

* feat: optimize logic when checkConflict and bulkCreate (opensearch-project#189)

* feat: optimize logic when checkConflict and bulkCreate

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

* feat: add options.workspace check

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

* feat: throw error when workspace check error in repository create

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

* feat: modify judgement

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

* feat: always get objects from DB when create-with-override

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

---------

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

* feat: call get when create with override

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

* feat: update test according to count

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

* feat: add integration test

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

* fix: unit test

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

* feat: regenerate ids when import

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

* feat: add more unit test

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

* feat: minor changes logic on repository

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

* feat: update unit test

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

* feat: update test

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

* feat: optimization according to comments

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

* feat: update test

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

* feat: optimize code

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

---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
…ement and SavedObject management as standalone app, retire dashboard management (opensearch-project#208)

* feat: init retire dashboard management

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

* move index pattern to Library (opensearch-project#91)

* move index pattern to libaray

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

* Remove it from Dashboards management when workspace is on

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

---------

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

index pattern always show under library

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

* functional test

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

* feat: move data source / advanced settings / saved objects management out of Dashboard management

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

* feat: update test

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

* feat: update snapshot

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

* feat: update snapshot

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

* fix: fix failed overview header ut

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

* fix: deeplink inside saved objects management page

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

* fix: unit test fail

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

* feat: add unit test for each page wrapper

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

* feat: some optimization

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

* remove management dependency

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

* test: update cypress config to use workspace branch

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

* Replace ManagementAppMountParams with AppMountParameters

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

---------

Signed-off-by: tygao <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
* feat: enable workspace id in basePath

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

* feat: add unit test

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

* feat: remove useless test object id

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

* feat: add unit test

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

* feat: add unit test

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

* feat: update snapshot

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

* feat: move formatUrlWithWorkspaceId to core/public/utils

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

* feat: remove useless variable

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

* feat: remove useless variable

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

* feat: optimization

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

* feat: optimization

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

* feat: optimization

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

* feat: move workspace/utils to core

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

* feat: move workspace/utils to core

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

* feat: update comment

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

* feat: optimize code

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

* feat: update unit test

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

* feat: optimization

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

* feat: add space under license

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

* fix: unit test

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

---------

Signed-off-by: SuZhou-Joe <[email protected]>
* Delete saved objects by workspace

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

fix osd boostrap

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

* add unit test

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

* fix can't delete workspace due to invalid permission

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

---------

Signed-off-by: Hailong Cui <[email protected]>
…ect#210)

* feat: import sample data saved objects to workspace

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

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

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

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

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

---------

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

* refactor: assigned copied saved objects to new variables

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

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
* consume permissions in repository

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

* feat: consume permissions in serializer

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

* Add unit tests for consuming permissions in repository

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

* feat: update

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

* fix: unit test

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

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: gaobinlong <[email protected]>
Co-authored-by: gaobinlong <[email protected]>
…ect#192)

* add util function to filter workspace feature by wildcard

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

* resolve conflict

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

* update tests and snapshots

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

* small adjustment to left menu

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

* resolve git conflict

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

* rename nav link service function

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

* unit test for workspace plugin.ts

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

* update snapshots

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

* optimize code

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

* optimize code

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

* optimize code

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

* optimize code

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

* optimize code

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

* optimize code

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

---------

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: yuye-aws <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
* Add copy saved objects API

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

* Modify file header

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

---------

Signed-off-by: gaobinlong <[email protected]>
…pensearch-project#236)

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

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

* feat: fix bootstrap

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

* fix: integration test

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

* fix: flaky test

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

---------

Signed-off-by: SuZhou-Joe <[email protected]>
… objects client (opensearch-project#261)

* feat: consume current workspace in saved objects management and saved objects client

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

* feat: add unit test

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

* feat: add unit test for each change

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

* fix: update snapshot of unit test

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

* fix: unit test

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

* fix: unit test

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

* fix: unit test

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

---------

Signed-off-by: SuZhou-Joe <[email protected]>
* feat: merge 5949

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

* feat: update snapshot

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

* fix: bootstrap error

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

* fix: unit test error

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

---------

Signed-off-by: SuZhou-Joe <[email protected]>
…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]>
…n management and SavedObject management as standalone app, retire dashboard management (opensearch-project#283)

* Revert "Register Advance Settings, Data Source management,Index Pattern management and SavedObject management as standalone app, retire dashboard management (opensearch-project#208)"

This reverts commit 5f09f84.

* Revert "feat: add unit test for mountWrapper (opensearch-project#223)"

This reverts commit a70ce71.

* Revert "fix: cypress tests checkout workspace branch (opensearch-project#252)"

This reverts commit 734c890.

* run cypress with ftr main

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

---------

Signed-off-by: Yulong Ruan <[email protected]>
…ect#282)

In this commit, the workspace plugin registered a workspace dropdown
menu on the top of left navigation bar. This allows user to quickly
switch the current workspace and navigate to workspace create page and
workspace list page from the dropdown sticky on the top of the left nav bar.

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

---------

Signed-off-by: Yulong Ruan <[email protected]>
…ect#281)

* remove management workspace (opensearch-project#278)

* remove management workspace

* delete unnecessary code comments

* delete comments
# Conflicts:
#	src/core/public/index.ts
#	src/core/public/utils/index.ts
#	src/core/utils/constants.ts
#	src/plugins/workspace/public/components/workspace_creator/workspace_form.tsx
#	src/plugins/workspace/public/components/workspace_menu/workspace_menu.tsx
#	src/plugins/workspace/server/workspace_client.ts

* update typescript version to 4.6.4

* delete useless code and add a lost yarn.lock

* delete yarn.lock
…) (opensearch-project#287)

* [Workspace] Add ACL related functions for workspace (opensearch-project#146)

* [Workspace] Add acl related functions for workspace



* Minor change



---------



* Modify changelog



* Add more unit test cases



* Modify test case



* Some minor change



* Add more test cases



* Optimize some code and the comments of the functions



* Add more comments for some basic functions



* Export more interfaces



* consume permissions in repository



* feat: consume permissions in serializer



* Add unit tests for consuming permissions in repository



* Remove double exclamation



* Rename some variables



* Remove duplicated semicolon



* Add permissions field to the mapping only if the permission control is enabled



* Fix test failure



* Add feature flag config to the yml file



* Make the comment of feature flag more clear



* Make comment more clear



* Remove management permission type



* Fix test failure



---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
* revert unnecessary changes to recently viewed component

refactor nav link updater so that the displayed links can be customized,
this is majority required by workspace as with workspace, user would be
able to config what features(plugins) then want to see for a workspace,
this requires to filter out those links that are not configured by the
user.

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

* fix test snapshot

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

* tweak comments

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

---------

Signed-off-by: Yulong Ruan <[email protected]>
…ct#211)

* Add workspace column/filter into saved objects page

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

fix failed test case

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

move workspace column to its own folder

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

* default workspace

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

fix test case

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

add test case

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

remove hide import

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

* address review comments

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

---------

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

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

* update index.ts

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

* test: update workspace plugin test

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

* remove extra file and add test for modal

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

* test: add tests for workspace util

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

* test: update test for delete_workspace_modal

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

* test: update test for delete_workspace_modal

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

* test: update test for workspace list

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

* rename and update test

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

* add tests for workspace list

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

---------

Signed-off-by: tygao <[email protected]>
* fix: authInfo destructure



* fix: unit test error



---------

Signed-off-by: SuZhou-Joe <[email protected]>
wanglam and others added 2 commits March 18, 2024 16:27
* Add workspace create page

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

* Address PR comments

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

* Add more comments

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

* Add example for dependencies field in App

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

* Separate workspace feature selector

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

* Correct example for dependencies

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

* Remove unclear icon and defaultVISTheme input

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

* Remove unclear dependencies feature

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

* Remove states and fix onChange fired after mount

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

---------

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

8 participants