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

Refact: move workspace specific logic to savedObjectWrapper #234

Conversation

SuZhou-Joe
Copy link
Collaborator

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

ananzh and others added 30 commits September 22, 2023 09:08
…search-project#4882)

* Add reactflow with compiler fix

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Update CHANGELOG

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Update comment

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Revert adding reactflow dep

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

---------

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
* Update yarn install step from dev guide

Signed-off-by: Matt Provost <provomat@amazon.com>

* Update the corepack command

Signed-off-by: Matt Provost <provomat@amazon.com>

* Update to use corepack install

Signed-off-by: Matt Provost <provomat@amazon.com>

* Revise corepack url

Signed-off-by: Matt Provost <provomat@amazon.com>

---------

Signed-off-by: Matt Provost <provomat@amazon.com>
* Add Bandini as maintainer

Signed-off-by: Yan Zeng <zengyan@amazon.com>
…roject#5134)

Utilizing the GitHub `workflow_dispatch`, we can trigger
a job with a specific inputs.

By default, we run from this repo:
https://github.com/opensearch-project/opensearch-dashboards-functional-test

This workflow uses the target branch of the PR to pull down
from the FTRepo and run the tests from that specific branch.

For example, PRs against `main` will pull down `main` from
the FTRepo.

The problem occurs when new functionality is opened or a bug is
fixed and, per industry standard, we want to see tests added
to ensure functionality, stability, and raise the bar.

However, the cypress tests PR into the FTRepo depends on the new code
to be merged for the CI within the FTRepo to work. So we have a
stalemate that usually slows down PR review time.

Here, a manual run can be triggered by a maintainer. It will utilize
the source branch from the PR if provided.

Related to:
opensearch-project#4019

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Originally:
opensearch-project#5134

I believed it to be a good idea to ensure that triggering the CI
should always run a batch of tests. But I realized that some tests
can be added and just be bad tests until updated. Or if we want
to verify a flaky test in the CI.

So instead of only making it additional tests, the spec input will
complete replace the default tests (unless you append to the default).

Empty will run the default spec still. This will append on to the
PR comment with the spec that was run. So at least maintainers can
see it passed for a set of tests but it did not run the ones
we usually run.

Also adding some formatting for empty values for the PR comment.

Issue related:
opensearch-project#4019

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
* Basic working version of OSD without angular (opensearch-project#4982)

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* [Data Explorer][Discover 2.0] Implement saved search embeddable (opensearch-project#5081)

* [Data Explorer][Discover 2.0] Implement saved search embeddable

Issue Resolve
opensearch-project#4233

---------

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

* Deangular: removes angular paginate, cleanup data plugin and tilemap (opensearch-project#5060)

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* [Data Explorer] Delete legacy discover selenium tests (opensearch-project#5088)

* delete legacy discover functional tests

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* remove discover folder in config file

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

---------

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* [Data Explorer][Discover][Function Test] Fix ciGroup4 (opensearch-project#5099)

* add data-render-complete and data-shared-item for test convenience
* change docTableFieldCount to dataGridTableCellCount to fetch data grid cell
* add methods in data grid service to reuse current massive selenium tests
* update tests

Issue Resolve
opensearch-project#5098
opensearch-project#5058

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* [Data Explorer][Discover][Functional Test] fix ciGroup 8 (opensearch-project#5104)

Update index pattern fetch method in discover page due to changing to EuiComboBox.

Issue Resolve
opensearch-project#5103

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Fix cigroup 1 with dataGridTable helper functions (opensearch-project#5105)

* fix1

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* fix 1

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* fix anchor test

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* fix cigroup1

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* address comments

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

---------

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* [Data Explorer] Fix functional cigroup 3 for save search on dashboard filtering (opensearch-project#5111)

* fix cigroup3

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* fix error

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

---------

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* add data-shared-item tag (opensearch-project#5119)

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Modifying html tests to utilize jsx and fixing tests to include all pluginPaths (opensearch-project#5080)

Signed-off-by: Zashary Maskus-Lavin <zashary.maskus-lavin@oracle.com>

* fix cigroup6 (opensearch-project#5125)

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* [Discover] Search on load fix (opensearch-project#5112)

* fixes search on load

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* Fixes search after initial page load

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* [Data Explorer][Discover][Functional Test] Fix ciGroup7 (opensearch-project#5131)

* [Data Explorer][Discover][Functional Test] Fix ciGroup7

Issue Resolve
opensearch-project#5129

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* restore _discover_navigation

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Deangular: removes angular from notify and utils of opendashboards legacy (opensearch-project#5085)

* Basic working version of OSD without angular (opensearch-project#4982)

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* deangularized notify and utils folders in the opendashboards legacy directory

Signed-off-by: Cameron Reed <chyltonreed@gmail.com>

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Cameron Reed <chyltonreed@gmail.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Co-authored-by: Cameron Reed <chyltonreed@gmail.com>

* [Discover] Misc fixes (opensearch-project#5114)

* Canvas scrolling fix, remove notice and improve flyout focus

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* Hide action icons unless hovered or focussed on

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* followup fixes from opensearch-project#5085

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: ananzh <ananzh@amazon.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Zashary Maskus-Lavin <zashary.maskus-lavin@oracle.com>
Signed-off-by: Cameron Reed <chyltonreed@gmail.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Qingyang(Abby) Hu <abigailhu2000@gmail.com>
Co-authored-by: Zashary Maskus-Lavin <zashary.maskus-lavin@oracle.com>
Co-authored-by: Cameron Reed <cameron.reed@oracle.com>
Co-authored-by: Cameron Reed <chyltonreed@gmail.com>
…h-project#5172)

Set env variable of NODE_OPTIONS for OSD to reference on startup
to ensure stable env.

Disable threshold enabled for disk allocation

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Signed-off-by: Matt Provost <provomat@amazon.com>
… `https://ip` in `opensearch.hosts` (opensearch-project#4949)

The `elasticsearch` client uses a flaws version that incorrectly sets `servername` on a `tls` connection using IPs.

Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
…ject#5130)

* Improve testing of clients with long numerals support
* Work around serializer inheritance in the JS client

Signed-off-by: Miki <miki@amazon.com>
…o embeddable (opensearch-project#5160)

* all reload to force update embeddable
* add onQuerySubmit to top nav

Issue Resolve
opensearch-project#5116
opensearch-project#5159

Signed-off-by: ananzh <ananzh@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Co-authored-by: Miki <miki@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
* Discover: Fixes state persistence after nav
* Fixed breadcrumbs and navigation
* fixes mobile view

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
…index pattern (opensearch-project#5171)

* [BUG][Data Explorer][Discover] Automatically load solo added default index pattern

This fix ensures that when add a default index pattern, Discover will
automatically select and load its details.

Issue Resolve
opensearch-project#5128

---------

Signed-off-by: ananzh <ananzh@amazon.com>
…sed on fetched data count (opensearch-project#5191)

* This PR adds a new rows state to the DiscoverCanvas component and updated it whenever
the data$ observable emitted new row data.
* The DiscoverTable component was then refactored to accept rows as a prop, making it
dependent on the parent component to provide the correct set of data. This ensures that the table
renders correctly based on the current data and doesn't rely on its internal state,
which could be outdated.

Issue Resolve
opensearch-project#5181

Signed-off-by: ananzh <ananzh@amazon.com>
opensearch-project#5134

Incorrectly uses the source of the code to pull down to BASE REF,
which would likely be `main` or `2.x`, etc.

It should be pulling down the PR branch. Cypress tests at the time
of merging were failing due to unrelated issue of disk allocation.

Not setting the env variables causes the workflow to rely on the default
values which is a return back to the original implementation and if the
env is set then it will be not empty.

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
…fresh page or paste url to a new tab (opensearch-project#5206)

Issue Resolve
opensearch-project#5179
opensearch-project#5071

Signed-off-by: ananzh <ananzh@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
* fix time conversion test bug
* Fix wrong test case

---------

Signed-off-by: Thanh <lechithanh2003@gmail.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Co-authored-by: Sean Neumann <1413295+seanneumann@users.noreply.github.com>
…e tests (opensearch-project#5221)

* remove angular-based view from DocViewsPlugin
* remove the test case that validates the display and content of the angular doc view

Issue Resolve
opensearch-project#5020

Signed-off-by: ananzh <ananzh@amazon.com>
* removed ftr test step from PR template

Signed-off-by: Leo Deng <leo7deng@gmail.com>

* change changelog

Signed-off-by: Leo Deng <leo7deng@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: Leo Deng <105402895+Leo7Deng@users.noreply.github.com>

---------

Signed-off-by: Leo Deng <leo7deng@gmail.com>
Signed-off-by: Leo Deng <105402895+Leo7Deng@users.noreply.github.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
…ject#5167)

* initial commit for datasource

Signed-off-by: Eric <menwe@amazon.com>

* initial commit for datasource service

Signed-off-by: Eric <menwe@amazon.com>

* [Data Sources] Move datasource codebase from datasource plugin to data plugin

Signed-off-by: Eric <menwe@amazon.com>

* [Data Sources] Add datasource factory

Signed-off-by: Eric <menwe@amazon.com>

* datasource service

Signed-off-by: Eric <menwe@amazon.com>

* datasource with factory

Signed-off-by: Eric <menwe@amazon.com>

* datasource selector

Signed-off-by: Eric <menwe@amazon.com>

* exposes datasources from data plugin

Signed-off-by: Eric <menwe@amazon.com>

* index pattern datasource registration

Signed-off-by: Eric <menwe@amazon.com>

* add datasource selector to discover

Signed-off-by: Eric <menwe@amazon.com>

* remove unused files

Signed-off-by: Eric <menwe@amazon.com>

* add/exposes types for datasources as a set of services

Signed-off-by: Eric <menwe@amazon.com>

* add datasource selector unit tests

Signed-off-by: Eric <menwe@amazon.com>

* add metadata to selectable

Signed-off-by: Eric <menwe@amazon.com>

* redirection to observability for non-index-pattern datasource

Signed-off-by: Eric <menwe@amazon.com>

* add datasource factory tests

Signed-off-by: Eric <menwe@amazon.com>

* add datasource service test

Signed-off-by: Eric <menwe@amazon.com>

* datasources related fixes

Signed-off-by: Eric <menwe@amazon.com>

* add tests for datasource selectable

Signed-off-by: Eric <menwe@amazon.com>

* added types/interfaces for sidebar selector, and add a couple of enhancements

Signed-off-by: Eric <menwe@amazon.com>

* remove pill effect

Signed-off-by: Eric <menwe@amazon.com>

* change type for name display in selector for index patterns

Signed-off-by: Eric <menwe@amazon.com>

* remove legacy index selector

Signed-off-by: Eric <menwe@amazon.com>

* rename datasource change handler

Signed-off-by: Eric <menwe@amazon.com>

* remove unused constants

Signed-off-by: Eric <menwe@amazon.com>

* fix a redirection bug

Signed-off-by: Eric <menwe@amazon.com>

* add to change log

Signed-off-by: Eric <menwe@amazon.com>

* fix bg color issue in source selector

Signed-off-by: Eric <menwe@amazon.com>

* address oui and missing guard

Signed-off-by: Eric <menwe@amazon.com>

* add test subj

Signed-off-by: Eric <menwe@amazon.com>

* i18 and datasource interface default return

Signed-off-by: Eric <menwe@amazon.com>

* add default datasource tests

Signed-off-by: Eric <menwe@amazon.com>

* fix typo

Signed-off-by: Eric <menwe@amazon.com>

* modify wording

Signed-off-by: Eric <menwe@amazon.com>

* add experimental annotation to datasource

Signed-off-by: Eric <menwe@amazon.com>

* add type datasource filtering to remove type error hint

Signed-off-by: Eric <menwe@amazon.com>

* remove unused type

Signed-off-by: Eric <menwe@amazon.com>

* add 'type' to option type

Signed-off-by: Eric <menwe@amazon.com>

* Type fixes

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* cherry-pick type changes from remote and add partial fixes

Signed-off-by: Eric <menwe@amazon.com>

* add one type exports

Signed-off-by: Eric <menwe@amazon.com>

* remaining type errors fixed

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* addressing comments

Signed-off-by: Eric <menwe@amazon.com>

* address dedup

Signed-off-by: Eric <menwe@amazon.com>

* refactor datasource_selectable to address comments

Signed-off-by: Joshua Li <joshuali925@gmail.com>

* remove unnecessary optional chaining

Signed-off-by: Joshua Li <joshuali925@gmail.com>

* refactor variable names

Signed-off-by: Joshua Li <joshuali925@gmail.com>

* move functnions out of selectable component

Signed-off-by: Eric <menwe@amazon.com>

* add comments for dedup/options list updates

Signed-off-by: Eric <menwe@amazon.com>

* add experimental annotation

Signed-off-by: Eric <menwe@amazon.com>

* callback and experimental annotation on types

Signed-off-by: Eric <menwe@amazon.com>

* handleSourceSelection callback

Signed-off-by: Eric <menwe@amazon.com>

* datasource annotation and import adjustment

Signed-off-by: Eric <menwe@amazon.com>

* remove pill effect

Signed-off-by: Eric <menwe@amazon.com>

* minor changes addressing latest comments

Signed-off-by: Eric <menwe@amazon.com>

* remove unused tests

Signed-off-by: Eric <menwe@amazon.com>

---------

Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Co-authored-by: Joshua Li <joshuali925@gmail.com>
…date doc views tests (opensearch-project#5242)

* [BUG][Fuctional Test] Make setDefaultAbsoluteRange more robust and update doc views tests

* fix PR comment by making a special time picker method for discover
* update doc_views test to click docTableExpandToggleColumn-0
* update doc_views_link to check new tab

Issue Resolve
opensearch-project#5241

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
SuZhou-Joe and others added 27 commits October 17, 2023 13:32
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…oject#189)

* feat: optimize logic when checkConflict and bulkCreate

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

* feat: add options.workspace check

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

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

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

* feat: modify judgement

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

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

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

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe marked this pull request as draft October 18, 2023 08:24
@SuZhou-Joe SuZhou-Joe closed this Oct 18, 2023
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.