Skip to content

Commit

Permalink
Merge branch 'main' into edit_wizard_directly_on_dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
abbyhu2000 authored Oct 10, 2022
2 parents 3f9f9e0 + ac07159 commit 55bffea
Show file tree
Hide file tree
Showing 43 changed files with 2,925 additions and 4,776 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Run cypress tests

# trigger on every PR for all branches except feature branches
on:
pull_request:
branches: [ '**', '!feature/**' ]
paths-ignore:
- '**/*.md'

env:
FTR_PATH: 'ftr'
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
SPEC: 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/*.js,'

jobs:
cypress-tests:
runs-on: ubuntu-latest
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
env:
# prevents extra Cypress installation progress messages
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
name: Run cypress tests
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g yarn@1.22.10
- name: Run bootstrap
run: yarn osd bootstrap

- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10

- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ env.FTR_PATH }}
repository: opensearch-project/opensearch-dashboards-functional-test
ref: '${{ github.base_ref }}'

- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./${{ env.FTR_PATH }}/package.json | jq '.devDependencies.cypress' | tr -d '"')"
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
with:
path: ~/.cache/Cypress
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}
env:
CYPRESS_INSTALL_BINARY: ${{ steps.cypress_version.outputs.cypress_version }}
- run: npx cypress cache list
- run: npx cypress cache path

- name: Run tests
uses: cypress-io/github-action@v2
with:
working-directory: ${{ env.FTR_PATH }}
start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }}
wait-on: 'http://localhost:9200, http://localhost:5601'
command: yarn cypress:run-without-security --browser chromium --spec ${{ env.SPEC }}

# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ftr-cypress-screenshots
path: ${{ env.FTR_PATH }}/cypress/screenshots
retention-days: 1

- uses: actions/upload-artifact@v3
if: always()
with:
name: ftr-cypress-videos
path: ${{ env.FTR_PATH }}/cypress/videos
retention-days: 1

- uses: actions/upload-artifact@v3
if: always()
with:
name: ftr-cypress-results
path: ${{ env.FTR_PATH }}/cypress/results
retention-days: 1
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

* [MD] Support legacy client for data source ([#2204](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2204))
* [Plugin Helpers] Facilitate version changes ([#2398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2398))

* [MD] Display error toast for create index pattern with data source ([#2506](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2506))
* [Multi DataSource] UX enhacement on index pattern management stack ([#2505](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2505))
* [Multi DataSource] UX enhancement on Data source management stack ([#2521](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2521))
* [Multi DataSource] UX enhancement on Index Pattern management stack ([#2527](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2527))
### 🐛 Bug Fixes
* [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))
* [Vis Builder] Fixes visualization shift when editing agg ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))
Expand Down Expand Up @@ -50,6 +53,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Viz Builder] State validation before dispatching and loading ([#2351](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2351))
* [Viz Builder] Create a new wizard directly on a dashboard ([#2384](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2384))
* [Viz Builder] Edit wizard directly on dashboard ([#2508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2508))
* [Multi DataSource] UX enhacement on index pattern management stack ([#2505](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2505))
* [Multi DataSource] UX enhancement on Data source management stack ([#2521](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2521))

### 🐛 Bug Fixes

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

* Add path ignore for markdown files for CI ([#2312](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2312))
* Updating WS scans to ignore BWC artifacts in `cypress` ([#2408](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2408))

* [CI] Run functional test repo as workflow ([#2503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2503))

### 📝 Documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ export class IndexPattern implements IIndexPattern {
return this.dataSourceRef
? [
{
...this.dataSourceRef,
id: this.dataSourceRef.id,
type: this.dataSourceRef.type,
name: DATA_SOURCE_REFERNECE_NAME,
},
]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from 'react';
import { History } from 'history';

import { EuiButton } from '@elastic/eui';
import { FormattedMessage } from '@osd/i18n/react';
import { CREATE_DATA_SOURCE_BUTTON_TEXT } from '../text_content';

interface Props {
history: History;
Expand All @@ -19,12 +19,8 @@ export const CreateButton = ({ history }: Props) => {
data-test-subj="createDataSourceButton"
fill={true}
onClick={() => history.push('/create')}
iconType="plusInCircle"
>
<FormattedMessage
id="dataSourcesManagement.dataSourcesTable.createBtn"
defaultMessage="Create data source connection"
/>
{CREATE_DATA_SOURCE_BUTTON_TEXT}
</EuiButton>
);
};
Loading

0 comments on commit 55bffea

Please sign in to comment.