Skip to content

Commit

Permalink
Merge branch 'main' into doc/update-EUI-links
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin-pc authored Oct 16, 2023
2 parents 4008f25 + 60f4c8f commit 588b710
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 15 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,29 @@ on:
workflow_dispatch:
inputs:
test_repo:
description: 'Test repo'
description: 'Cypress test repo'
default: 'opensearch-project/opensearch-dashboards-functional-test'
required: true
type: string
test_branch:
description: 'Test branch (default: source branch)'
description: 'Cypress test branch (default: source branch)'
required: false
type: string
pr_number:
description: 'PR Number'
required: false
type: number
specs:
description: 'Tests to run (default: core)'
default: 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,'
description: 'Tests to run (default: osd:ciGroup)'
required: false
type: string
pr_number:
description: 'PR Number (optional)'
required: false
type: number

env:
TEST_REPO: ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }}
TEST_BRANCH: "${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
FTR_PATH: 'ftr'
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch'
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
SPEC: ${{ inputs.specs != '' && inputs.specs || 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,' }}
CYPRESS_BROWSER: 'chromium'
CYPRESS_VISBUILDER_ENABLED: true
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
Expand All @@ -46,6 +44,10 @@ env:
jobs:
cypress-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9]
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
Expand All @@ -54,7 +56,7 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
name: Run cypress tests
name: Run cypress tests (osd:ciGroup${{ matrix.group }})
steps:
- name: Get source information from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
Expand Down Expand Up @@ -97,7 +99,7 @@ jobs:
run: yarn osd bootstrap

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

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -106,6 +108,23 @@ jobs:
repository: ${{ env.TEST_REPO }}
ref: '${{ env.TEST_BRANCH }}'

- name: Setup spec files by input
if: ${{ inputs.specs != '' }}
run: |
echo "SPEC=${{ inputs.specs }}" >> $GITHUB_ENV
- name: Setup spec files
if: ${{ inputs.specs == '' }}
working-directory: ${{ env.FTR_PATH }}
shell: bash
run: |
IFS="," read -a SPEC_ARRAY <<< $(yarn --silent osd:ciGroup${{ matrix.group }})
FORMATTED_SPEC=''
for i in "${SPEC_ARRAY[@]}"; do
FORMATTED_SPEC+="cypress/integration/core-opensearch-dashboards/opensearch-dashboards/${i},"
done
echo "SPEC=${FORMATTED_SPEC}" >> $GITHUB_ENV
- name: Get Cypress version
id: cypress_version
run: |
Expand Down Expand Up @@ -179,8 +198,6 @@ jobs:
#### Inputs:
```
Source repo: '${{ env.SOURCE_REPO }}'
Source branch: '${{ env.SOURCE_BRANCH }}'
Test repo: '${{ env.TEST_REPO }}'
Test branch: '${{ env.TEST_BRANCH }}'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [BUG][Data Explorer][Discover] Allow filter and query persist when refresh page or paste url to a new tab ([#5206](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5206))
- [Data Explorer] Remove the `X` icon in data source selection field ([#5238](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5238))
- [BUG][Fuctional Test] Make setDefaultAbsoluteRange more robust and update doc views tests ([#5242](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5242))
- [BUG][Dev Tool] Add dev tool documentation link to dev tool's help menu [#5166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5166)

### 🚞 Infrastructure

Expand All @@ -76,6 +77,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add an achievement badger to the PR ([#3721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3721))
- [CI] Enable inputs for manually triggered Cypress test jobs ([#5134](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5134))
- [CI] Add `NODE_OPTIONS` and disable disk allocation threshold ([#5172](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5172))
- [CI] Supprt CI Groups for Cypress test jobs ([#5298](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5298))

### 📝 Documentation

Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ export class DocLinksService {
ganttCharts: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}gantt`,
// https://opensearch.org/docs/latest/dashboards/reporting/
reporting: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}reporting`,
// https://opensearch.org/docs/latest/dashboards/dev-tools/index-dev/
devTools: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dev-tools/index-dev/`,
notebooks: {
// https://opensearch.org/docs/latest/dashboards/notebooks/
base: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks`,
Expand Down

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

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

4 changes: 3 additions & 1 deletion src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import { useEffectOnce } from 'react-use';
import { getDataSources } from '../../data_source_management/public/components/utils';
import { DevToolApp } from './dev_tool';
import { DevToolsSetupDependencies } from './plugin';
import { addHelpMenuToAppChrome } from './utils/util';

interface DevToolsWrapperProps {
devTools: readonly DevToolApp[];
Expand Down Expand Up @@ -254,7 +255,7 @@ function setBreadcrumbs(chrome: ChromeStart) {
}

export function renderApp(
{ application, chrome, savedObjects, notifications }: CoreStart,
{ application, chrome, docLinks, savedObjects, notifications }: CoreStart,
element: HTMLElement,
history: ScopedHistory,
devTools: readonly DevToolApp[],
Expand All @@ -265,6 +266,7 @@ export function renderApp(
return () => {};
}

addHelpMenuToAppChrome(chrome, docLinks);
setBadge(application, chrome);
setBreadcrumbs(chrome);
setTitle(chrome);
Expand Down
24 changes: 24 additions & 0 deletions src/plugins/dev_tools/public/utils/util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import { CoreStart } from 'opensearch-dashboards/public';

export function addHelpMenuToAppChrome(
chrome: CoreStart['chrome'],
docLinks: CoreStart['docLinks']
) {
chrome.setHelpExtension({
appName: i18n.translate('devTools.helpMenu.appName', {
defaultMessage: 'Dev Tools',
}),
links: [
{
linkType: 'documentation',
href: `${docLinks.links.opensearchDashboards.devTools}`,
},
],
});
}

0 comments on commit 588b710

Please sign in to comment.