Skip to content

Commit

Permalink
Merge branch '2.x' into 2.x-backport-1131
Browse files Browse the repository at this point in the history
  • Loading branch information
AMoo-Miki authored Dec 11, 2024
2 parents 1d6a9f4 + 7497083 commit e490903
Show file tree
Hide file tree
Showing 202 changed files with 48,092 additions and 2,005 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tianleh @kavilla @ohltyler @CCongWang @ashwin-pc @peterzhuamazon @ananzh @prudhvigodithi @xluo-aws @Hailong-am @SuZhou-Joe @ruanyl @wanglam @raintygao
* @tianleh @kavilla @ohltyler @CCongWang @ashwin-pc @peterzhuamazon @ananzh @prudhvigodithi @xluo-aws @Hailong-am @SuZhou-Joe @ruanyl @wanglam @raintygao @zhongnansu @yujin-emma @yubonluo
2 changes: 1 addition & 1 deletion .github/actions/start-opensearch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21

- name: Create temporary directory
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/assistant-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ jobs:
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
osd-serve-args: --assistant.chat.enabled=true
security-enabled: false
tests-with-multiple-data-source-and-disabled-local-cluster:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: dashboards assistant
test-command: env CYPRESS_DISABLE_LOCAL_CLUSTER=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/mds*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --data_source.hideLocalCluster=true --assistant.chat.enabled=true
security-enabled: true

119 changes: 119 additions & 0 deletions .github/workflows/cypress-workflow-bundle-snapshot-based-ci-groups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Cypress test for core Dashboards
on:
pull_request:
branches: ['**']
paths:
- '.github/workflows/cypress-workflow-bundle-snapshot-based-ci-groups.yml'
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- 'package.json'
- '.github/actions/start-opensearch/action.yml'
- '.github/workflows/release-e2e-workflow-template.yml'

push:
branches: ['**']
paths:
- '.github/workflows/cypress-workflow-bundle-snapshot-based-ci-groups.yml'
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- 'package.json'
- '.github/actions/start-opensearch/action.yml'
- '.github/workflows/release-e2e-workflow-template.yml'

env:
CI_GROUPS: "1,2,3,4,5,6,7,8,9"

jobs:
get_spec:
runs-on: 'ubuntu-latest'
outputs:
MATRIX_INCLUDES: ${{ steps.get_spec.outputs.MATRIX_INCLUDES }}
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Checkout cypress-test
uses: actions/checkout@v2
with:
repository: ${{github.repository}}
path: spec-detect
- id: get_spec
name: Get specs array
run: |
cd spec-detect
source ./test_finder.sh
result="["
## split CI_Groups into array
IFS="," read -a groups <<< "${{ env.CI_GROUPS }}"
for group in "${groups[@]}"; do
item="{\"ciGroup\": \"${group}\", \"specs\": "
specs_of_ci_group=`ci_grouped_specs_finder ${group}`
FORMATTED_SPEC="\"${specs_of_ci_group}\" }"
if [[ "${result}" != "[" ]];
then
result+=","
fi
item+="${FORMATTED_SPEC}"
result+="${item}"
done
result+=']';
echo ${result}
echo "MATRIX_INCLUDES=${result}" >> "$GITHUB_OUTPUT"
tests-with-security:
needs: ["get_spec"]
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
name: (security)osd:ciGroup${{ matrix.ciGroup }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: "osd:ciGroup${{ matrix.ciGroup }}"
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec '${{ matrix.specs }}'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
artifact-name-suffix: "-with-security-ciGroup${{ matrix.ciGroup }}"

tests-without-security:
needs: ["get_spec"]
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
name: (non-security)osd:ciGroup${{ matrix.ciGroup }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: "osd:ciGroup${{ matrix.ciGroup }}"
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec '${{ matrix.specs }}'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
security-enabled: false
artifact-name-suffix: "-without-security-ciGroup${{ matrix.ciGroup }}"


# Hold on windows test cases
# https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/9377445544/job/25819022121?pr=1352
# tests-with-security-windows:
# needs: ["get_spec"]
# strategy:
# fail-fast: false
# matrix:
# include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
# name: (security)osd:ciGroup${{ matrix.ciGroup }}
# uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
# with:
# test-name: "osd:ciGroup${{ matrix.ciGroup }}"
# test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chrome --spec '${{ matrix.specs }}'

# tests-without-security-windows:
# needs: ["get_spec"]
# strategy:
# fail-fast: false
# matrix:
# include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
# name: (non-security)osd:ciGroup${{ matrix.ciGroup }}
# uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
# with:
# test-name: "osd:ciGroup${{ matrix.ciGroup }}"
# test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec '${{ matrix.specs }}'
# security-enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
# not useful now as the windows e2e template currently do not allow serving parameters
#osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true
security-enabled: false
security-enabled: false
14 changes: 8 additions & 6 deletions .github/workflows/cypress-workflow-bundle-snapshot-based.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
name: Bundle Snapshot based E2E Cypress tests workflow for core Dashboards
on:
pull_request:
branches: [ '**' ]
branches: ['**']
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/cypress-workflow-bundle-snapshot-based.yml'
push:
branches: [ '**' ]
branches: ['**']
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/cypress-workflow-bundle-snapshot-based.yml'

jobs:
tests-with-security:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true --usageCollection.uiMetric.enabled=true

tests-without-security:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true --usageCollection.uiMetric.enabled=true
security-enabled: false
24 changes: 24 additions & 0 deletions .github/workflows/dashboards-flow-framework-e2e-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Flow Framework Release tests workflow in Bundled OpenSearch Dashboards
on:
pull_request:
branches: [ '**' ]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.filter.outputs.tests }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tests:
- 'cypress/**/dashboards-flow-framework/**'
tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Flow Framework
test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-flow-framework/*'
19 changes: 19 additions & 0 deletions .github/workflows/mds-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: E2E Cypress tests workflow for MDS
on:
pull_request:
branches: ['**']
paths:
- 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/mds*.js'
push:
branches: ['**']
paths:
- 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/mds*.js'

jobs:
tests-with-multiple-data-source-and-disabled-local-cluster:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: MDS enabled and local cluster disabled
test-command: env CYPRESS_DISABLE_LOCAL_CLUSTER=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/mds*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --data_source.hideLocalCluster=true
security-enabled: true
7 changes: 4 additions & 3 deletions .github/workflows/ml-commons-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ jobs:
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/ml-commons-dashboards/*'
osd-serve-args: --ml_commons_dashboards.enabled=true

tests-with-multi-data-source:
tests-with-multiple-data-source-and-disabled-local-cluster:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: ML Commons With Multi Data Source
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/ml-commons-dashboards/*'
osd-serve-args: --ml_commons_dashboards.enabled=true --data_source.enabled=true
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/ml-commons-dashboards/mds*.js'
osd-serve-args: --ml_commons_dashboards.enabled=true --data_source.enabled=true --data_source.hideLocalCluster=true
artifact-name-suffix: "-with-security-and-mds"
8 changes: 4 additions & 4 deletions .github/workflows/release-e2e-workflow-template-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 21
- name: Checkout cypress-test
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -136,19 +136,19 @@ jobs:
command: ${{ inputs.test-command }}
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
path: cypress-test/cypress/videos
# Test reports was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-results
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
security-enabled:
required: false
type: string
artifact-name-suffix:
required: false
type: string
jobs:
tests:
name: Run Cypress E2E tests for ${{ inputs.test-name }}
Expand All @@ -33,7 +36,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 21
- name: Checkout cypress-test
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -132,20 +135,20 @@ jobs:
command: ${{ inputs.test-command }}
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
name: cypress-screenshots${{ inputs.artifact-name-suffix }}
path: cypress-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
name: cypress-videos${{ inputs.artifact-name-suffix }}
path: cypress-test/cypress/videos
# Test reports was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-results
name: cypress-results${{ inputs.artifact-name-suffix }}
path: cypress-test/cypress/results
4 changes: 2 additions & 2 deletions .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ jobs:
command: yarn cypress:release-chrome
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: functional-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ jobs:
command: yarn cypress:release-ad-only
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: functional-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ jobs:
command: yarn cypress:release-ism-only
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: functional-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ jobs:
command: yarn cypress:release-chromium-0
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: functional-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
Expand Down
Loading

0 comments on commit e490903

Please sign in to comment.