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

[D&D] Rebase with Node 14 #1236

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4133cac
[Git] update PR template (#937)
kavilla Nov 17, 2021
3d69c4f
Add release notes for Dashboards 1.2.0 (#944)
seanneumann Nov 17, 2021
9047044
Add versioned document support in OSD
zuochengding Nov 2, 2021
86c202a
[Branding] prevent logging when config not set (#941)
kavilla Nov 23, 2021
b8c5453
[Version] Increment to 2.0 (#973)
kavilla Nov 23, 2021
8c11eff
Add Lychee Link Checker into OSD (#938)
zuochengding Dec 8, 2021
3ddaecb
Fix Lychee Link Checker Error (#1011)
zuochengding Dec 9, 2021
2d44dab
[CI] Add tests to github workflow
kavilla Nov 3, 2021
74eb00e
Add bwc tests for osd with bundle (#871)
ananzh Dec 15, 2021
879cd33
Add more bwc tests for osd without bundles (#900)
ananzh Dec 15, 2021
382ebe0
Add bwc test data for osd without bundle (#927)
ananzh Dec 15, 2021
160a7fd
Add bwc test data for osd with bundle (#940)
ananzh Dec 15, 2021
f665da3
Add more bwc tests for osd with bundles (#901)
ananzh Dec 15, 2021
b8f276f
[Backwards Compatibility] restore URL forwarding from legacy app
kavilla Dec 12, 2021
034ce71
[Link] Fix yarnpkg link error
zuochengding Dec 21, 2021
6eb6ba0
Use the OpenSearch Dashboards logo in the READMEs
Dec 21, 2021
4fd0649
Add .whitesource file to activate integration scan (#999)
zelinh Jan 4, 2022
ac9c837
[Build] remove legacy version check for plugin builds (#1029)
kavilla Jan 4, 2022
d48d001
[Node 14] Upgrades Node version from 10.24.1 to 14.18.2 (#1028)
boktorbb Jan 5, 2022
b9ae16e
Add a script to run one command for all bwc tests (#931)
ananzh Jan 5, 2022
aa6d7bd
[Map] Remove hardcoded AWS paths
zuochengding Dec 10, 2021
5c4cdb3
[Docs] remove invalid reference in CONVENTIONS.md (#1110)
kavilla Jan 7, 2022
3d9f542
Upgrades babel, storybook, and postcss (#1104)
Jan 7, 2022
8b518e7
Bumps microsoft api-documenter and api-extractor (#1106)
Jan 7, 2022
86d13f8
Fixes incorrect license headers (#1131)
Jan 12, 2022
144eccd
Fixes linting errors (#1115)
Jan 12, 2022
a8d499d
[Backwards Compatibility] update instructions in TESTING.md (#1030)
ananzh Jan 13, 2022
1106bc1
[CI] upgrade to chromedriver 97 for github actions
kavilla Jan 13, 2022
ddb2cc4
Disable WhiteSource check fails on commits/PRs (#1149)
Jan 14, 2022
a765199
Bump parse-link-header from 1.0.1 to 2.0.0 (#1108)
dependabot[bot] Jan 14, 2022
167b993
Upgrades `hapi` from v17 to v20 (#1146)
Jan 15, 2022
8777eb3
[BUG] fix disableWelcomeScreen config (#1143)
kavilla Jan 20, 2022
fc96cc3
[Tests] configurable skip checksum verification (#1207)
kavilla Feb 3, 2022
0c3f901
Bump nanoid from 3.1.30 to 3.2.0 (#1173)
dependabot[bot] Feb 4, 2022
06d06a9
Don't terminate the server on NodeDeprecationWarning (#1185)
ginkel Feb 4, 2022
a7da974
Removes KUI Generator and related dependencies (#1105)
Feb 4, 2022
895a564
Bump markdown-it from 10.0.0 to 12.3.2 (#1140)
dependabot[bot] Feb 4, 2022
5d41936
Fix createStateContainerReactHelpers documentation (#1213)
ginkel Feb 7, 2022
bf6bde3
Bumps `node-fetch` from v2.6.1 to v2.6.7 (#1169)
Feb 7, 2022
c66b034
Removes deprecated `request` and `@percy/agent` (#1113)
Feb 8, 2022
fbf646d
[Bug] fix incorrect import for opensearch aggs (#1192)
kavilla Feb 8, 2022
588cb4d
Re-enable WhiteSource check fails on commits/PRs (#1226)
Feb 8, 2022
6db875f
Removes storybook package and related code (#1172)
Feb 9, 2022
b8a2270
Run build and test workflow on all branches (#1222)
Feb 10, 2022
4c8a7ae
Initial Drag and Drop plugin code (#946)
ashwin-pc Nov 23, 2021
293cd8b
Adds state management to Drag and Drop
ashwin-pc Dec 3, 2021
550e15d
Moves Drag and Drop to create visualization menu
ashwin-pc Dec 11, 2021
4c6e6ff
Field Search in Data panel (#995)
abbashus Jan 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ target
/packages/osd-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/osd-ui-framework/dist
/packages/osd-ui-framework/doc_site/build
/packages/osd-ui-framework/generator-kui/*/templates/
/packages/osd-ui-shared-deps/flot_charts
14 changes: 0 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ const APACHE_2_0_LICENSE_HEADER = `
*/
`;

const ELASTIC_LICENSE_HEADER = `
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
`;

const SAFER_LODASH_SET_HEADER = `
/*
* Elasticsearch B.V licenses this file to you under the MIT License.
Expand Down Expand Up @@ -171,7 +163,6 @@ module.exports = {
'error',
{
licenses: [
ELASTIC_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
Expand Down Expand Up @@ -207,7 +198,6 @@ module.exports = {
'error',
{
licenses: [
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
Expand All @@ -230,7 +220,6 @@ module.exports = {
{
licenses: [
OSS_HEADER,
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
Expand All @@ -254,7 +243,6 @@ module.exports = {
{
licenses: [
OSS_HEADER,
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
Expand Down Expand Up @@ -388,7 +376,6 @@ module.exports = {
*/
{
files: [
'**/*.stories.tsx',
'test/*/config.ts',
'test/*/config_open.ts',
'test/*/{tests,test_suites,apis,apps}/**/*',
Expand Down Expand Up @@ -447,7 +434,6 @@ module.exports = {
files: [
'packages/osd-ui-framework/**/*.test.js',
'packages/osd-ui-framework/doc_site/**/*.js',
'packages/osd-ui-framework/generator-kui/**/*.js',
'packages/osd-ui-framework/Gruntfile.js',
'packages/osd-opensearch/src/**/*.js',
'packages/osd-interpreter/tasks/**/*.js',
Expand Down
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
### Check List
- [ ] New functionality includes testing.
- [ ] All tests pass
- [ ] `yarn test:jest`
- [ ] `yarn test:jest_integration`
- [ ] `yarn test:ftr`
- [ ] New functionality has been documented.
- [ ] New functionality has javadoc added
- [ ] Commits are signed per the DCO using --signoff
31 changes: 31 additions & 0 deletions .github/workflows/links_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0

name: Link Checker

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
linkchecker:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Load Excludes
run: |
LYCHEE_EXCLUDE=$(sed -e :a -e 'N;s/\n/ --exclude /;ta' .lycheeexclude)
echo "LYCHEE_EXCLUDE=$LYCHEE_EXCLUDE" >> $GITHUB_ENV
- name: Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.0.9
with:
args: --accept=200,403,429 --exclude ${{ env.LYCHEE_EXCLUDE }} --exclude-mail "**/*.html" "**/*.md" "**/*.txt" "**/*.json" "**/*.js" "**/*.ts" "**/*.tsx"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}
214 changes: 201 additions & 13 deletions .github/workflows/pr_check_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,213 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Build and test

# trigger on every commit push and PR for all branches except feature branches
on:
push:
branches: [ main ]
branches: [ '**', '!feature/**' ]
pull_request:
branches: [ main ]
branches: [ '**', '!feature/**' ]

jobs:
build:
env:
CACHE_NAME: osd-node-modules
TEST_BROWSER_HEADLESS: 1
CI: 1
GCS_UPLOAD_PREFIX: fake
TEST_OPENSEARCH_DASHBOARDS_HOST: localhost
TEST_OPENSEARCH_DASHBOARDS_PORT: 6610
TEST_OPENSEARCH_TRANSPORT_PORT: 9403
TEST_OPENSEARCH_PORT: 9400
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true

jobs:
build-lint-test:
runs-on: ubuntu-latest
name: Build and Verify
steps:
# Access a cache of set results from a previous run of the job
# This is to prevent re-running steps that were already successful since it is not native to github actions
# Can be used to verify flaky steps with reduced times
- name: Restore the cached run
uses: actions/cache@v2
with:
path: |
job_successful
linter_results
unit_tests_results
integration_tests_results
key: ${{ github.run_id }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ github.run_id }}-${{ github.job }}-${{ github.sha }}

- name: Get if previous job was successful
id: job_successful
run: cat job_successful 2>/dev/null || echo 'false'

- name: Get the previous linter results
id: linter_results
run: cat linter_results 2>/dev/null || echo 'default'

- name: Get the previous unit tests results
id: unit_tests_results
run: cat unit_tests_results 2>/dev/null || echo 'default'

- name: Get the previous integration tests results
id: integration_tests_results
run: cat integration_tests_results 2>/dev/null || echo 'default'

- name: Checkout code
if: steps.job_successful.outputs.job_successful != 'true'
uses: actions/checkout@v2

- name: Setup Node
if: steps.job_successful.outputs.job_successful != 'true'
uses: actions/setup-node@v2
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
if: steps.job_successful.outputs.job_successful != 'true'
run: |
npm uninstall -g yarn
npm i -g yarn@1.22.10

- name: Run bootstrap
if: steps.job_successful.outputs.job_successful != 'true'
run: yarn osd bootstrap

- name: Run linter
if: steps.linter_results.outputs.linter_results != 'success'
id: linter
run: yarn lint

# Runs unit tests while limiting workers because github actions will spawn more than it can handle and crash
# Continues on error but will create a comment on the pull request if this step failed.
- name: Run unit tests
if: steps.unit_tests_results.outputs.unit_tests_results != 'success'
id: unit-tests
continue-on-error: true
run: node scripts/jest --ci --colors --maxWorkers=10
env:
SKIP_BAD_APPLES: true

- run: echo Unit tests completed unsuccessfully. However, unit tests are inconsistent on the CI so please verify locally with `yarn test:jest`.
if: steps.unit_tests_results.outputs.unit_tests_results != 'success' && steps.unit-tests.outcome != 'success'

# TODO: This gets rejected, we need approval to add this
# - name: Add comment if unit tests did not succeed
# if: steps.unit_tests_results.outputs.unit_tests_results != 'success' && steps.unit-tests.outcome != 'success'
# uses: actions/github-script@v5
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: 'Unit tests completed unsuccessfully. However, unit tests are inconsistent on the CI so please verify locally with `yarn test:jest`.'
# })

- name: Run integration tests
if: steps.integration_tests_results.outputs.integration_tests_results != 'success'
id: integration-tests
run: node scripts/jest_integration --ci --colors --max-old-space-size=5120

# Set cache if linter, unit tests, and integration tests were successful then the job will be marked successful
# Sets individual results to empower re-runs of the same build without re-running successful steps.
- if: |
(steps.linter.outcome == 'success' || steps.linter.outcome == 'skipped') &&
(steps.unit-tests.outcome == 'success' || steps.unit-tests.outcome == 'skipped') &&
(steps.integration-tests.outcome == 'success' || steps.integration-tests.outcome == 'skipped')
run: echo "::set-output name=job_successful::true" > job_successful
- if: steps.linter.outcome == 'success' || steps.linter.outcome == 'skipped'
run: echo "::set-output name=linter_results::success" > linter_results
- if: steps.unit-tests.outcome == 'success' || steps.unit-tests.outcome == 'skipped'
run: echo "::set-output name=unit_tests_results::success" > unit_tests_results
- if: steps.integration-tests.outcome == 'success' || steps.integration-tests.outcome == 'skipped'
run: echo "::set-output name=integration_tests_results::success" > integration_tests_results
functional-tests:
needs: [ build-lint-test ]
runs-on: ubuntu-latest
name: Run functional tests
strategy:
matrix:
group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '10.24.1'
check-latest: false
- run: yarn osd bootstrap
- run: yarn lint
- run: echo Running functional tests for ciGroup${{ matrix.group }}

# Access a cache of set results from a previous run of the job
# This is to prevent re-running a CI group that was already successful since it is not native to github actions
# Can be used to verify flaky steps with reduced times
- name: Restore the cached run
uses: actions/cache@v2
with:
path: |
ftr_tests_results
key: ${{ github.run_id }}-${{ github.job }}-${{ matrix.group }}-${{ github.sha }}
restore-keys: |
${{ github.run_id }}-${{ github.job }}-${{ matrix.group }}-${{ github.sha }}

- name: Get the cached tests results
id: ftr_tests_results
run: cat ftr_tests_results 2>/dev/null || echo 'default'

- name: Checkout code
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
uses: actions/checkout@v2

- name: Setup Node
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
uses: actions/setup-node@v2
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
run: |
npm uninstall -g yarn
npm i -g yarn@1.22.10

- name: Get cache path
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
id: cache-path
run: echo "::set-output name=CACHE_DIR::$(yarn cache dir)"

- name: Setup cache
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
uses: actions/cache@v2
with:
path: ${{ steps.cache-path.outputs.CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ env.CACHE_NAME }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ env.CACHE_NAME }}-
${{ runner.os }}-yarn-
${{ runner.os }}-

# github virtual env is the latest chrome
- name: Setup chromedriver
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
run: yarn add --dev chromedriver@97.0.0

- name: Run bootstrap
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
run: yarn osd bootstrap

- name: Build plugins
if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10

- if: steps.ftr_tests_results.outputs.ftr_tests_results != 'success'
id: ftr-tests
run: node scripts/functional_tests.js --config test/functional/config.js --include ciGroup${{ matrix.group }}
env:
CI_GROUP: ciGroup${{ matrix.group }}
CI_PARALLEL_PROCESS_NUMBER: ciGroup${{ matrix.group }}
JOB: ci${{ matrix.group }}
CACHE_DIR: ciGroup${{ matrix.group }}

- if: steps.ftr-tests.outcome == 'success' || steps.ftr-tests.outcome == 'skipped'
run: echo "::set-output name=ftr_tests_results::success" > ftr_tests_results
Loading