Skip to content

Commit

Permalink
Merge branch 'main' into chore/vega-lite-v5-from-source
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuarrrr authored Jan 6, 2023
2 parents 1d3823a + 1d4bbe7 commit ad59146
Show file tree
Hide file tree
Showing 39 changed files with 647 additions and 98 deletions.
112 changes: 110 additions & 2 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ on:
branches: [ '**', '!backport/**' ]
paths-ignore:
- '**/*.md'
- 'docs/**'
pull_request:
branches: [ '**' ]
paths-ignore:
- '**/*.md'
- 'docs/**'

env:
TEST_BROWSER_HEADLESS: 1
Expand Down Expand Up @@ -45,6 +47,18 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Run bootstrap
run: yarn osd bootstrap
Expand Down Expand Up @@ -103,9 +117,23 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: |
echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $env:GITHUB_ENV
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Run bootstrap
run: yarn osd bootstrap
run: yarn osd bootstrap || yarn osd bootstrap

- name: Run linter
id: linter
Expand Down Expand Up @@ -159,6 +187,18 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Setup chromedriver
run: node scripts/upgrade_chromedriver.js
Expand All @@ -178,6 +218,14 @@ jobs:
JOB: ci${{ matrix.group }}
CACHE_DIR: ciGroup${{ matrix.group }}

- uses: actions/upload-artifact@v3
if: failure()
with:
name: failure-artifacts
path: |
test/*/failure_debug/
test/*/screenshots/
functional-tests-windows:
runs-on: windows-latest
name: Run functional tests on Windows
Expand Down Expand Up @@ -210,12 +258,26 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: |
echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $env:GITHUB_ENV
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Setup chromedriver
run: node scripts/upgrade_chromedriver.js

- name: Run bootstrap
run: yarn osd bootstrap
run: yarn osd bootstrap || yarn osd bootstrap

- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10
Expand All @@ -229,6 +291,14 @@ jobs:
JOB: ci${{ matrix.group }}
CACHE_DIR: ciGroup${{ matrix.group }}

- uses: actions/upload-artifact@v3
if: failure()
with:
name: failure-artifacts-ci${{ matrix.group }}
path: |
test/*/failure_debug/
test/*/screenshots/
build-min-artifact-tests-linux:
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -265,6 +335,18 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Get package version
run: |
Expand Down Expand Up @@ -321,6 +403,20 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: |
echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $env:GITHUB_ENV
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Get package version
run: |
Expand Down Expand Up @@ -375,6 +471,18 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Get package version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.20.0
14.20.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.20.0
14.20.1
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Eliminate dependency on `got` versions older than 11.8.5 ([#2801](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2801))
- [Multi DataSource] Add explicit no spellcheck on password fields ([#2818](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2818))
- [CVE-2022-25912] Bumps simple-git from 3.4.0 to 3.15.0 ([#3036](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3036))
- [CVE-2022-35256] Bumps node version from 14.20.0 to 14.20.1 [#3166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3166))

### 📈 Features/Enhancements

Expand Down Expand Up @@ -48,8 +49,11 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [I18n] Register ru, ru-RU locale ([#2817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2817))
- Add yarn opensearch arg to setup plugin dependencies ([#2544](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2544))
- [Multi DataSource] Test the connection to an external data source when creating or updating ([#2973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2973))
- [Doc] Add current plugin persistence implementation readme ([#3081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3081))
- [Table Visualization] Refactor table visualization using React and DataGrid component ([#2863](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2863))
- [Vis Builder] Add redux store persistence ([#3088](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3088))
- [Multi DataSource] Improve test connection ([#3110](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3110))
- [Vis Builder] Add app filter and query persistence without using state container ([#3100](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3100))
- [Optimizer] Increase timeout waiting for the exiting of an optimizer worker ([#3193](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193))

### 🐛 Bug Fixes

Expand Down Expand Up @@ -77,7 +81,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Vis Builder] Add global data persistence for vis builder #2896 ([#2896](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2896))
- Update `leaflet-vega` and fix its usage ([#3005](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3005))
- [Table Visualization][BUG] Fix Url content display issue in table ([#2918](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2918))
- Fixes misleading embaddable plugin error message ([#3043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3043))
- [MD] Update dummy url in tests to follow lychee url allowlist ([#3099](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3099))
- Adds config override to fix obsolete theme:version config value of v8 (beta) rendering issue ([#3045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3045))
- [CI] Update test workflow to increase network-timeout for yarn for installing dependencies ([#3118](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3118))

### 🚞 Infrastructure

Expand All @@ -86,7 +93,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Re-enable CI workflows for feature branckes ([#2908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2908))
- Add Windows CI workflows ([#2966](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2966))
- Add automatic selection of the appropriate version of chrome driver to run functional tests ([#2990](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2990))

- Add recording of functional test artifacts if they fail ([#3190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3190))
- Improve yarn's performance in workflows by caching yarn's cache folder ([#3194](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3194))

### 📝 Documentation

Expand All @@ -97,6 +105,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add `current-usage.md` and more details to `README.md` of `charts` plugin ([#2695](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2695))
- [Doc] Add readme for global query persistence ([#3001](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3001))
- Updates NOTICE file, adds validation to GitHub CI ([#3051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3051))
- [Doc] Add current plugin persistence implementation readme ([#3081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3081))

### 🛠 Maintenance

Expand All @@ -116,6 +125,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

- [Multi DataSource] Add unit test coverage for Update Data source management stack ([#2567](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2567))
- [BWC Tests] Add BWC tests for 2.5.0 ([#2890](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2890))
- Add retrial of flaky tests ([#2967](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2967))
- Fix incorrect validation of time values in JUnit Reporter ([#2965](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2965))
- Make tests covering plugin installation on cluster snapshots work across platforms ([#2994](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2994))
- Correct the linting logic for `no-restricted-path` to ignore trailing slashes ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020))
Expand All @@ -136,6 +146,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Resolve sub-dependent d3-color version and potential security issue ([#2454](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2454))
- [CVE-2022-3517] Bumps minimatch from 3.0.4 to 3.0.5 and [IBM X-Force ID: 220063] unset-value from 1.0.1 to 2.0.1 ([#2640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2640))
- [CVE-2022-37601] Bump loader-utils to 2.0.3 ([#2689](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2689))
- [CVE-2022-37599] Bump loader-utils to 2.0.4 ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031))
- [CVE-2022-37603] Bump loader-utils to 2.0.4 ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031))
- [WS-2021-0638][Security] bump mocha to 10.1.0 ([#2711](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2711))

### 📈 Features/Enhancements
Expand Down
5 changes: 5 additions & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ $ npm i -g yarn
$ yarn osd bootstrap # This command will also install npm dependencies
```

If you experience a network timeout while bootstrapping, you can update the timeout by configuring it in the `.yarnrc`. For example:
```
network-timeout 1000000
```

### Configure OpenSearch Dashboards

*This step is only mandatory if you have https/authentication enabled, or if you use the OpenSearch Docker image in its default configuration.*
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=14.20.0
ARG NODE_VERSION=14.20.1
FROM node:${NODE_VERSION} AS base

ENV HOME '.'
Expand Down
17 changes: 9 additions & 8 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# OpenSearch-Dashboards Maintainers
## Overview

This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md).

## Current Maintainers

## Maintainers
| Maintainer | GitHub ID | Affiliation |
| ------------------------- | --------------------------------------------------- | ----------- |
| Anan Zhuang | [ananzh](https://github.com/ananzh) | Amazon |
| Bishoy Boktor | [boktorbb](https://github.com/boktorbb) | Amazon |
| Mihir Soni | [mihirsoni](https://github.com/mihirsoni) | Amazon |
| Kawika (Rocky) Avilla | [kavilla](https://github.com/kavilla) | Amazon |
| Sean Neumann | [seanneumann](https://github.com/seanneumann) | Amazon |
| Sean Neumann | [seanneumann](https://github.com/seanneumann) | Amazon |
| Miki Barahmand | [AMoo-Miki](https://github.com/AMoo-Miki) | Amazon |
| Ashwin P Chandran | [ashwin-pc](https://github.com/ashwin-pc) | Amazon |
| Josh Romero | [joshuarrrr](https://github.com/joshuarrrr) | Amazon |
Expand All @@ -19,8 +22,6 @@

## Emeritus

| Maintainer | GitHub ID | Affiliation |
| ------------------------- | --------------------------------------------------- | ----------- |
| Tommy Markley | [tmarkley](https://github.com/tmarkley) | Amazon |

[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
| Maintainer | GitHub ID | Affiliation |
| ------------- | --------------------------------------- | ----------- |
| Tommy Markley | [tmarkley](https://github.com/tmarkley) | Amazon |
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In general, we recommend four tiers of tests:

# Requirements
* Install the latest NodeJS, [NPM](https://www.npmjs.com/get-npm) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
* `nvm install v14.20.0`
* `nvm install v14.20.1`
* `npm install -g yarn`

# Running tests
Expand Down
2 changes: 2 additions & 0 deletions docs/plugins/data_persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ There are two types for data persistence:
4. In `useEditorUpdates()`, we use the saved appState to load the visualize editor
5. We can also choose to do state sync without using state container by directing hooking up the state managers with the URL data storage. For example, we implemented state management in Vis Builder with redux store, while the global state persistence implementation is the same, we implemented app state persistence without using any state containers or state syncing utils. For the actual visual data, we directly hook up redux store with `OsdUrlStateStorage` to sync the values by using `saveReduxState()` and `loadReduxState()`. For app filter and query, since they are part of the app states but not part of the redux store, we directly hook up their state managers from data plugin with `OsdUrlStateStorage` and `connectStorageToQueryState()`.
# Refresh
When we refresh the page, both app state and global state should persist:
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@
"**/hoist-non-react-statics": "^3.3.2",
"**/json-schema": "^0.4.0",
"**/kind-of": ">=6.0.3",
"**/loader-utils": "^2.0.3",
"**/loader-utils": "^2.0.4",
"**/node-jose": "^2.1.0",
"**/nth-check": "^2.0.1",
"**/qs": "^6.10.3",
"**/trim": "^0.0.3",
"**/typescript": "4.0.2",
"**/unset-value": "^2.0.1"
"**/unset-value": "^2.0.1",
"**/jest-config": "npm:@amoo-miki/[email protected]",
"**/jest-jasmine2": "npm:@amoo-miki/[email protected]"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -463,7 +465,7 @@
"zlib": "^1.0.5"
},
"engines": {
"node": "14.20.0",
"node": "14.20.1",
"yarn": "^1.21.1"
}
}
6 changes: 4 additions & 2 deletions packages/osd-optimizer/src/worker/run_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ const exit = (code: number) => {
setTimeout(() => {
send(
workerMsgs.error(
new Error('process did not automatically exit within 5 seconds, forcing exit')
new Error(
`process did not automatically exit within 15 seconds (previous code: ${code}); forcing exit...`
)
)
);
process.exit(1);
}, 5000).unref();
}, 15000).unref();
};

// check for connected parent on an unref'd timer rather than listening
Expand Down
Loading

0 comments on commit ad59146

Please sign in to comment.