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

Merge main to workspace #247

Merged
merged 121 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
71dd06e
Chore: Add 1.3.13 release notes (#5030) (#5042)
opensearch-trigger-bot[bot] Sep 19, 2023
f02a88e
Updating yarn installation step from the Dev guide (#5065)
dtaivpp Sep 19, 2023
9c192a3
add test ids (#5072)
abbyhu2000 Sep 20, 2023
a10f1c7
[Data Explorer][Discover] Fix total hits issue (#5087)
ananzh Sep 22, 2023
eec3ed7
Update optimizer webpack config to support ReactFlow dependency (#4882)
ohltyler Sep 22, 2023
46d7c2d
Update yarn install step from dev guide (#5067)
BSFishy Sep 22, 2023
6ca6227
Add Bandini as maintainer (#5113)
zengyan-amazon Sep 26, 2023
34a8594
[CI] accept inputs for manually triggered cypress tests (#5134)
kavilla Sep 27, 2023
6154e2d
[CI] Cypress test run spec input (#5142)
kavilla Sep 29, 2023
0557ab1
[Deangular] OSD without angular (#5086)
ashwin-pc Sep 29, 2023
a77178f
[CI][Cypress] set NODE_OPTIONS and cluster disk allocation (#5172)
kavilla Oct 2, 2023
9b56575
Reoder dev guide for yarn install to work (#5138)
BSFishy Oct 3, 2023
d017c5c
Bump `agentkeepalive` to v4.5.0 to solve a problem preventing the use…
AMoo-Miki Oct 3, 2023
588efcd
[Console] Enhance support for JSON with long numerals (#5130)
AMoo-Miki Oct 3, 2023
7d89cca
[BUG][Discover] Add onQuerySubmit to top nav and allow force update t…
ananzh Oct 3, 2023
ab925eb
fix removing pinned global filters (#5143)
abbyhu2000 Oct 3, 2023
cb6e0f0
[Discover] A bunch of navigation fixes (#5168)
ashwin-pc Oct 3, 2023
9601c6c
[BUG][Data Explorer][Discover] Automatically load solo added default …
ananzh Oct 3, 2023
677fdf5
[BUG][Data Explorer][Discover] Allow data grid to auto adjust size ba…
ananzh Oct 3, 2023
c27d2f5
Fix `visAugmenter` forming empty key-value pairs in its calls to the …
AMoo-Miki Oct 4, 2023
3024c6a
Add subject test id for testing data-shared-attribute (#5196)
abbyhu2000 Oct 4, 2023
dc6a7ec
[CI][Cypress][Bug] use default SOURCE inputs (#5197)
kavilla Oct 4, 2023
0ffd2ab
Fixes mobile layout (#5195)
ashwin-pc Oct 4, 2023
5623cef
[BUG][Data Explorer][Discover] Allow filter and query persist when re…
ananzh Oct 4, 2023
c70125f
fixes DataTable rendering in doscover (#5207)
ashwin-pc Oct 4, 2023
7207635
Fix errors in conditions for activating `vizAugmenter` (#5213)
AMoo-Miki Oct 4, 2023
336dce6
[OSCI] [FIX] time conversion unit test bug (#5174)
thanhinhchtom Oct 4, 2023
70b9eea
[Tests-refactor] Remove angular code from plugin_functional and updat…
ananzh Oct 5, 2023
6268794
[OSCI] Remove ftr test from PR template (#5217)
Leo7Deng Oct 5, 2023
1e980fa
[Feature] Datasource selector of multiple datasources (#5167)
mengweieric Oct 6, 2023
d6345f3
[BUG][Fuctional Test] Make setDefaultAbsoluteRange more robust and up…
ananzh Oct 9, 2023
e05d297
Adds popular field to discover (#5259)
ashwin-pc Oct 10, 2023
5f45553
Fixes recently accessed (#5258)
ashwin-pc Oct 10, 2023
df08387
[Data Explorer] Removed X icon in data source selection. (#5238)
Abilashinamdar Oct 10, 2023
b3104ce
[BUG][Discover] Allow default columns settings (#5261)
ananzh Oct 10, 2023
39d6828
Add 2.11.0 release notes (#5234) (#5252)
opensearch-trigger-bot[bot] Oct 11, 2023
f28b729
Support for TLS v1.3 (#5133)
kajetan-nobel Oct 12, 2023
0836c71
[Fix] typo in 2.11.0 release note header (#5286)
tobiasehlert Oct 13, 2023
7a964b6
[CI] Cypress tests support ciGroups (#5298)
kavilla Oct 13, 2023
60f4c8f
[Fix] Added documentation link for the dev tools' help menu (#5166)
willie-hung Oct 14, 2023
534b2d0
[OSCI][Doc]Updated EUI doc site links to OUI doc site (#5293)
vvavdiya Oct 16, 2023
9e3e3a7
[Workspace] Feature/workspace service core module (#5092)
ruanyl Oct 17, 2023
a351f90
[CVE-2023-45133] Add package resolution for `@babel/traverse` to `7.…
manasvinibs Oct 17, 2023
286cc38
Change panel header & update snapshot (#5304)
willie-hung Oct 17, 2023
7b3a9f6
[Fix] Add platform "darwin-arm64" to unit test (#5290)
willie-hung Oct 18, 2023
466d298
[Fix] ValidationError when setting `maps.proxyOpenSearchMapsServiceIn…
ShatilKhan Oct 18, 2023
e1db842
fix share link in discover (#5324)
abbyhu2000 Oct 19, 2023
8d8de0a
[OSCI][CI] replace deprecated `set-output` (#5340)
vvavdiya Oct 27, 2023
b796940
[CI][Test] Add plugin functional tests on GitHub Actions (#5383)
abbyhu2000 Oct 27, 2023
eeb3251
[Workspace][Feature]Setup workspace skeleton and implement basic CRUD…
SuZhou-Joe Oct 30, 2023
abc97ea
Read Only Tenant Mode (#4498)
jakubp-eliatra Nov 6, 2023
1de8be6
Fix navigation bug from dashboard to dashboard (#5435)
abbyhu2000 Nov 7, 2023
3c0211b
[OSCI] Remove unused tutorials (#5212)
CMDWillYang Nov 7, 2023
088fc66
Bump `eslint-import-resolver-webpack` and `browserify-sign` (#5414)
joshuarrrr Nov 8, 2023
e0b6006
[BUG] Fix Discover table panel size auto adjust in Dashboard (#5441)
ananzh Nov 9, 2023
d2fa466
Add new MAINTAINERS to CODEOWNERS file (#5456)
bandinib-amzn Nov 10, 2023
b82aa1c
[Security] Bump all babel dependencies from `7.16.x` to `7.22.9` (#5428)
joshuarrrr Nov 10, 2023
89dc051
Enhance darwin-arm64 release (#5455)
AMoo-Miki Nov 10, 2023
524fd93
Bumps chromedriver from 107.0.3 to 119.0.1 (#5465)
ananzh Nov 11, 2023
f822702
Replace `node-sass` with `sass-embedded` (#5338)
AMoo-Miki Nov 14, 2023
cf4f929
[Decouple] Add new core service to expose functionality to verify plu…
manasvinibs Nov 15, 2023
40ba1f5
[OSCI][FIX] Discover: Fix the Subfields Display Issue (#5429)
MadaniKK Nov 15, 2023
f6ce6e7
Add border for header navigation on right (#5450)
Hailong-am Nov 15, 2023
7def75c
Add Release Notes and update CHANGELOG.md for 2.11.1 (#5486)
ananzh Nov 16, 2023
791210d
Remove #5428 from 2.11.1 release due to conflicts (#5491)
ananzh Nov 16, 2023
e79caf6
[Docs] Fix a broken link by updating a typo (#5517)
vinaykakade Nov 28, 2023
dadfefa
[Data source] Fix datasource filtering issue (#5484)
mengweieric Nov 29, 2023
2e7a2ba
[Chore] `--security` for snapshot and OSD server (#5451)
kavilla Nov 30, 2023
c8f6db9
Add 1.3.14 release notes (#5574) (#5579)
opensearch-trigger-bot[bot] Dec 6, 2023
805400d
[BUG][Data] Support for custom filters with heterogeneous data fields…
kavilla Dec 7, 2023
f27a031
Add @SuZhou-Joe as a maintainer (#5594)
kavilla Dec 12, 2023
3c9e643
Modify data source text for dev tool (#5475)
bandinib-amzn Dec 12, 2023
5fabb73
Bump typescript and axios (#5470)
AMoo-Miki Dec 12, 2023
b8d30dc
Remove redundant icon component (#5511)
willie-hung Dec 13, 2023
478176a
[Fix] Inactive State on 'Discover' Tab in Side Navigation Menu (#5432)
willie-hung Dec 13, 2023
808591a
[Fix] Remove empty suggestion history (#5349)
willie-hung Dec 13, 2023
9ba5cf5
[OSCI][ADD] More tests for overview (#5418)
thanhinhchtom Dec 13, 2023
3268e37
[Data Explorer] Readme (#5273)
ashwin-pc Dec 14, 2023
a5c45a3
fix: Dev tools console autocomplete issue #5567 (#5568)
kishor82 Dec 14, 2023
0a33d4a
[OSCI][Fix][Discover]Prevent Adding Timefield to the Side Nav Selecte…
MadaniKK Dec 14, 2023
4d57b8a
adding documentation on files in util in addition to a README.md with…
tanupa Dec 14, 2023
d8cbc17
Custom Branding: Relative URL should be allowed (#5572)
Alankarsharma Dec 15, 2023
5695f9b
feat: Introduce `registerCollapsibleNavHeader` to ChromeService (#5244)
ruanyl Dec 19, 2023
28c1fbb
[Data Explorer] Fix missing field error from taking down the page (#5…
ashwin-pc Dec 19, 2023
45e867f
to add documentation on packages/osd-stylelint-plugin-stylelint (#5632)
tanupa Dec 20, 2023
34994f8
[osci23] implmented advance setting in Dicover: MODIFY_COLUMN_ON_SWIT…
MadaniKK Dec 21, 2023
6710ec3
Move @seanneumann to emeritus maintainer (#5634)
AMoo-Miki Jan 3, 2024
18607a2
Replace OuiSelect component with OuiSuperSelect in data-source plugin…
bandinib-amzn Jan 8, 2024
bf5e842
Bump OUI to 1.4.0 (#5637)
AMoo-Miki Jan 9, 2024
f2a44ae
[CVE-2023-26159] Bump follow-redirects from 1.15.2 to 1.15.4 (#5669)
ZilongX Jan 9, 2024
09b64a4
Remove duplicate sample data as id 90943e30-9a47-11e8-b64d-95841ca0b2…
zhyuanqi Jan 9, 2024
10ae4ee
[Discover] Add long numerals support (#5592)
AMoo-Miki Jan 10, 2024
52981db
Chore (deps): remove ui-select angular dev dep (#5660)
joshuarrrr Jan 10, 2024
a4ae399
Chore (ui-shared-deps): Clean up direct usage of OUI theme JSON (#5662)
joshuarrrr Jan 10, 2024
e83b7ee
[Discover] Data Grid Pagination Options (#5610)
kishor82 Jan 17, 2024
b5d39b6
Fix Datasource testing connection don't validate endpoints with path …
xinruiba Jan 23, 2024
058dfbc
[Datasource selector] Sort datasource option list alphabetically (#5719)
mengweieric Jan 25, 2024
1a0cf47
[Security] Updates dev guide for security (#5736)
ashwin-pc Jan 26, 2024
f8ee03a
[Discover] Fix 0 filters applied state (#5733)
ashwin-pc Jan 26, 2024
b2d2b26
Add datasource picker component and use it in devtools and tutorial p…
BionIT Jan 31, 2024
7c0bd9f
[PM] Enhance single version requirements imposed during bootstrapping…
AMoo-Miki Feb 3, 2024
aea8716
Bump to fix vulnerable dependency (#5797)
manasvinibs Feb 5, 2024
8e93c54
Add datasource picker to import saved object flyout when multiple dat…
BionIT Feb 5, 2024
d968bbe
[CVE-2023-52079] Bump `msgpackr` from `1.9.7` to `1.10.1` (#5803)
AMoo-Miki Feb 6, 2024
bbd40e1
Datasource id is required if multiple datasource is enabled and no de…
xinruiba Feb 6, 2024
510c759
Update import api to have data source id to allow import saved object…
yujin-emma Feb 6, 2024
1eb2f8b
[MD] Support local cluster by default (#5811)
xinruiba Feb 6, 2024
3e22939
Fix (TableVis): Properly filter table columns when sending to filter …
joshuarrrr Feb 6, 2024
9c3738d
Bump node version to 18.19.0 (#5830)
kavilla Feb 7, 2024
e13dbff
Revert to legacy discover table and add toggle to new discover table …
abbyhu2000 Feb 7, 2024
ba298c7
[Discover] Update fonts of the datagrid (#5841)
AMoo-Miki Feb 8, 2024
4d791b1
Release notes for 2.12.0 (#5852)
abbyhu2000 Feb 9, 2024
bd75107
Bump oui to 1.5.1 (#5862)
ashwin-pc Feb 10, 2024
e08bf30
[Multi data source] Add interfaces to register add-on authentication …
bandinib-amzn Feb 13, 2024
26fc902
[MD] Able to hide "Local Cluster" option (#5827)
xinruiba Feb 15, 2024
30aea11
Update `caniuse-lite` (#5886)
AMoo-Miki Feb 16, 2024
d8aefae
Bug 5861 Fix: fix import api always display `overwritten` after impor…
yujin-emma Feb 16, 2024
55443f7
[Tests] Add Github workflow for Test Orchestrator in FT Repo to run c…
manasvinibs Feb 16, 2024
eff7cb5
Add api registry and allow it to be added into client config in data …
BionIT Feb 19, 2024
b748f8f
Merge main to workspace
wanglam Feb 21, 2024
789f451
fix management section register
wanglam Feb 22, 2024
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
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ target
# plugin overrides
/src/core/lib/osd_internal_native_observable
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
/src/plugins/data/common/opensearch_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timeline/public/_generated_/**
/src/plugins/**/_generated_/**

# package overrides
/packages/opensearch-eslint-config-opensearch-dashboards
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @ananzh @kavilla @seanneumann @AMoo-Miki @ashwin-pc @joshuarrrr @abbyhu2000 @zengyan-amazon @kristenTian @zhongnansu @manasvinibs @ZilongX @Flyingliuhub @BSFishy @curq
* @ananzh @kavilla @AMoo-Miki @ashwin-pc @joshuarrrr @abbyhu2000 @zengyan-amazon @kristenTian @zhongnansu @manasvinibs @ZilongX @Flyingliuhub @BSFishy @curq @bandinib-amzn @SuZhou-Joe
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
- [ ] 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](./../CHANGELOG.md)
Expand Down
131 changes: 128 additions & 3 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:
TEST_OPENSEARCH_TRANSPORT_PORT: 9403
TEST_OPENSEARCH_PORT: 9400
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first"
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'

jobs:
build-lint-test:
Expand All @@ -45,6 +45,14 @@ jobs:
run: |
git config --global core.autocrlf false

- name: Configure pagefile size (Windows only)
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3

Expand Down Expand Up @@ -142,6 +150,14 @@ jobs:
run: |
git config --global core.autocrlf false

- name: Configure pagefile size (Windows only)
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3

Expand Down Expand Up @@ -208,6 +224,95 @@ jobs:
test/*/failure_debug/
test/*/screenshots/

plugin-functional-tests:
name: Run plugin functional tests on ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running plugin functional tests

- name: Configure git's autocrlf (Windows only)
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false

- name: Configure pagefile size (Windows only)
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
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
yarn config set network-timeout 1000000 -g

- name: Configure Yarn Cache (Linux)
if: matrix.os != 'windows-latest'
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
if: matrix.os != 'windows-latest'
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 (Linux)
if: matrix.os != 'windows-latest'
run: yarn osd bootstrap

- name: Run bootstrap (Windows)
if: matrix.os == 'windows-latest'
run: yarn osd bootstrap || yarn osd bootstrap

- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10 --scan-dir "./test/plugin_functional/plugins"

- name: Run functional plugin tests
id: plugin-ftr-tests
run: node scripts/functional_tests.js --config test/plugin_functional/config.ts

- uses: actions/upload-artifact@v3
if: failure()
with:
name: failure-artifacts-plugin-functional-${{ matrix.os }}
path: |
test/*/failure_debug/
test/*/screenshots/

build-min-artifact-tests:
name: Build min release artifacts on ${{ matrix.name }}
strategy:
Expand All @@ -234,6 +339,14 @@ jobs:
git config --global core.autocrlf false
working-directory: .

- name: Configure pagefile size (Windows only)
if: matrix.os == 'windows-latest'
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -310,7 +423,19 @@ jobs:
working-directory: ./artifacts
strategy:
matrix:
version: [osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0, osd-2.6.0, osd-2.7.0, osd-2.8.0, osd-2.9.0]
version:
[
osd-2.0.0,
osd-2.1.0,
osd-2.2.0,
osd-2.3.0,
osd-2.4.0,
osd-2.5.0,
osd-2.6.0,
osd-2.7.0,
osd-2.8.0,
osd-2.9.0,
]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -344,7 +469,7 @@ jobs:
id: verify-opensearch-exists
run: |
if curl -I -L ${{ env.OPENSEARCH_URL }}; then
echo "::set-output name=version-exists::true"
echo "name=version-exists::true" >> $GITHUB_OUTPUT
fi

- name: Skipping tests
Expand Down
127 changes: 117 additions & 10 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,53 @@ name: Run cypress tests
# trigger on every PR for all branches
on:
pull_request:
branches: [ '**' ]
branches: ['**']
paths-ignore:
- '**/*.md'
workflow_dispatch:
inputs:
test_repo:
description: 'Cypress test repo'
default: 'opensearch-project/opensearch-dashboards-functional-test'
required: true
type: string
test_branch:
description: 'Cypress test branch (default: source branch)'
# remove this default value
default: 'workspace'
required: false
type: string
specs:
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'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
SPEC: 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,'
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'
CYPRESS_BROWSER: 'chromium'
CYPRESS_VISBUILDER_ENABLED: true
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
COMMENT_TAG: '[MANUAL CYPRESS TEST RUN RESULTS]'
COMMENT_SUCCESS_MSG: ':white_check_mark: Cypress test run succeeded!'
COMMENT_FAILURE_MSG: ':x: Cypress test run failed!'

jobs:
cypress-tests:
runs-on: arc-runner-set
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 @@ -28,10 +58,33 @@ 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 != '' }}
id: get_pr_info
uses: actions/github-script@v6
with:
script: |
const { data: result } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ inputs.pr_number }}
});
core.setOutput('head_name', result.head.repo.full_name);
core.setOutput('head_ref', result.head.ref);

- name: Set source repo from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
run: |
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.head_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head_ref }}" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v2
with:
repository: ${{ env.SOURCE_REPO }}
ref: '${{ env.SOURCE_BRANCH }}'

- name: Setup Node
uses: actions/setup-node@v2
Expand All @@ -48,20 +101,36 @@ 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
with:
path: ${{ env.FTR_PATH }}
repository: opensearch-project/opensearch-dashboards-functional-test
# revert this to '${{ github.base_ref }}'
ref: 'workspace'
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: |
echo "::set-output name=cypress_version::$(cat ./${{ env.FTR_PATH }}/package.json | jq '.devDependencies.cypress' | tr -d '"')"
echo "name=cypress_version::$(cat ./${{ env.FTR_PATH }}/package.json | jq '.devDependencies.cypress' | tr -d '"')" >> $GITHUB_OUTPUT

- name: Cache Cypress
id: cache-cypress
Expand Down Expand Up @@ -103,3 +172,41 @@ jobs:
name: ftr-cypress-results
path: ${{ env.FTR_PATH }}/cypress/results
retention-days: 1

add-comment:
needs: [cypress-tests]
if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ inputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: '${{ env.COMMENT_TAG }}'

- name: Add comment on the PR
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ inputs.pr_number }}
body: |
### ${{ env.COMMENT_TAG }}

#### ${{ needs.cypress-tests.result == 'success' && env.COMMENT_SUCCESS_MSG || env.COMMENT_FAILURE_MSG }}

#### Inputs:
```
Test repo: '${{ env.TEST_REPO }}'
Test branch: '${{ env.TEST_BRANCH }}'

Test spec:
'${{ env.SPEC }}'
```

#### Link to results:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
edit-mode: replace
Loading
Loading