From d67ec95620df79b8e1b8e0cb7d6528afd7c7758c Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 20 Sep 2023 11:27:32 -0700 Subject: [PATCH] Update E2E Test Config (#1025) * fix name change bug and modify test to test behavior Signed-off-by: Derek Ho * change to sonnatype Signed-off-by: Derek Ho * try to figure out where are we Signed-off-by: Derek Ho * try with file name Signed-off-by: Derek Ho * cut sleep time Signed-off-by: Derek Ho * Add a workflow_dispatch event to E2E Signed-off-by: Simeon Widdis * Attempt to edit workflow pulling Signed-off-by: Simeon Widdis * Remove commented bash lines Signed-off-by: Simeon Widdis * Attempt new plugin names Signed-off-by: Simeon Widdis * Use sonatype artifact links Signed-off-by: Simeon Widdis * Fix link Signed-off-by: Simeon Widdis * Rename SQL artifact download Signed-off-by: Simeon Widdis * Hardcode correct node version Signed-off-by: Simeon Widdis * Use other action for file download Signed-off-by: Simeon Widdis * Fix path for install Signed-off-by: Simeon Widdis * Remove redundant sleep We have multiple minutes of bootstrapping, and OSD itself waits for OS to start. Signed-off-by: Simeon Widdis --------- Signed-off-by: Derek Ho Signed-off-by: Simeon Widdis Co-authored-by: Derek Ho --- .../workflows/integration-tests-workflow.yml | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration-tests-workflow.yml b/.github/workflows/integration-tests-workflow.yml index 2d7c376fab..69bdfe2235 100644 --- a/.github/workflows/integration-tests-workflow.yml +++ b/.github/workflows/integration-tests-workflow.yml @@ -2,6 +2,7 @@ name: Dashboards observability plugin E2E test on: schedule: - cron: '0 0 * * *' + workflow_dispatch: env: PLUGIN_NAME: dashboards-observability OPENSEARCH_DASHBOARDS_VERSION: 'main' @@ -36,14 +37,18 @@ jobs: java-version: '11' - name: Download observability artifact - uses: peternied/download-file@v2 + uses: suisei-cn/actions-download-file@v1.4.0 with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.OPENSEARCH_VERSION }}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-observability-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip + url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-observability&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip + target: plugin-artifacts/ + filename: observability.zip - name: Download SQL artifact - uses: peternied/download-file@v2 + uses: suisei-cn/actions-download-file@v1.4.0 with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.OPENSEARCH_VERSION }}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-sql-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip + url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-sql-plugin&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip + target: plugin-artifacts/ + filename: sql.zip - name: Download OpenSearch uses: peternied/download-file@v2 @@ -58,23 +63,18 @@ jobs: - name: Install observability plugin run: | - /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-observability-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip" + /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/observability.zip" shell: bash - - name: Install linux SQL plugin + - name: Install SQL plugin run: | - /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-sql-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip" + /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/sql.zip" shell: bash - name: Run OpenSearch run: /bin/bash -c "./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch &" shell: bash - - name: Sleep while OpenSearch starts - uses: peternied/action-sleep@v1 - with: - seconds: 30 - - name: Checkout OpenSearch Dashboards uses: actions/checkout@v2 with: @@ -87,11 +87,15 @@ jobs: with: path: OpenSearch-Dashboards/plugins/dashboards-observability + # While bootstrap requires node >= 16.14.0, OSD hasn't yet updated their version number in + # package.json, so we need to hardcode it for now. When it's fixed, this line can dynamically + # pull the value: + # $(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]") - name: Get node and yarn versions working-directory: ${{ env.WORKING_DIR }} id: versions_step run: | - echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")" + echo "::set-output name=node_version::16" echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")" - name: Setup node @@ -115,7 +119,7 @@ jobs: run: | cd OpenSearch-Dashboards yarn start --no-base-path --no-watch & - sleep 400 + sleep 200 - name: Install Cypress run: |