From 9d1605aebd15a261e325462a4acd26c9d36c1f59 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:24:32 -0700 Subject: [PATCH 1/7] Remove version dependency in cypress workflow Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 55991557..47d7e319 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -11,7 +11,6 @@ on: - "*" env: OPENSEARCH_DASHBOARDS_VERSION: 'main' - OPENSEARCH_VERSION: '3.0.0-SNAPSHOT' OPENSEARCH_DASHBOARDS_FTREPO_VERSION: 'main' ANOMALY_DETECTION_PLUGIN_VERSION: 'main' jobs: @@ -47,8 +46,10 @@ jobs: - name: Run OpenSearch with plugin run: | + OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT + echo "Using OpenSearch version $OPENSEARCH_VERSION" cd anomaly-detection - ./gradlew run -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} & + ./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION & timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done' shell: bash From 393109046bbe94a2fbb0b0de38292848ca3a7989 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:26:58 -0700 Subject: [PATCH 2/7] Update path Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 47d7e319..8ddf1711 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -46,7 +46,7 @@ jobs: - name: Run OpenSearch with plugin run: | - OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT + OPENSEARCH_VERSION=$(node -p "require('../../opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT echo "Using OpenSearch version $OPENSEARCH_VERSION" cd anomaly-detection ./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION & From 2bf3394e27a244d1580653e2cf1cbf6595ba23c2 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:28:26 -0700 Subject: [PATCH 3/7] Update path Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 8ddf1711..5d2f1a84 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -46,7 +46,7 @@ jobs: - name: Run OpenSearch with plugin run: | - OPENSEARCH_VERSION=$(node -p "require('../../opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT + OPENSEARCH_VERSION=$(node -p "require('../opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT echo "Using OpenSearch version $OPENSEARCH_VERSION" cd anomaly-detection ./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION & From afe7142b660ce0362bcfdffdfe77f28cfa9265fa Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:36:09 -0700 Subject: [PATCH 4/7] Fetch from AD OSD plugin Signed-off-by: Tyler Ohlsen --- .../workflows/remote-integ-tests-workflow.yml | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 5d2f1a84..98db4881 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -37,22 +37,6 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} run: git config --system core.longpaths true - - name: Checkout Anomaly-Detection - uses: actions/checkout@v2 - with: - path: anomaly-detection - repository: opensearch-project/anomaly-detection - ref: ${{ env.ANOMALY_DETECTION_PLUGIN_VERSION }} - - - name: Run OpenSearch with plugin - run: | - OPENSEARCH_VERSION=$(node -p "require('../opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT - echo "Using OpenSearch version $OPENSEARCH_VERSION" - cd anomaly-detection - ./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION & - timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done' - shell: bash - - name: Checkout OpenSearch Dashboards uses: actions/checkout@v2 with: @@ -82,6 +66,25 @@ jobs: - run: node -v - run: yarn -v + - name: Get OpenSearch version + - run: | + cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin + OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT + + - name: Checkout Anomaly-Detection + uses: actions/checkout@v2 + with: + path: anomaly-detection + repository: opensearch-project/anomaly-detection + ref: ${{ env.ANOMALY_DETECTION_PLUGIN_VERSION }} + + - name: Run OpenSearch with plugin + run: | + cd anomaly-detection + ./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION & + timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done' + shell: bash + - name: Bootstrap the plugin run: | cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin From aa2b8f4352f5be7f93712e9f4dbf0c09699b28e6 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:38:10 -0700 Subject: [PATCH 5/7] fix syntax Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 98db4881..5c635b59 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -67,7 +67,7 @@ jobs: - run: yarn -v - name: Get OpenSearch version - - run: | + run: | cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT From e651edc8feab842d2d55f6414a200abb99cff144 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:40:55 -0700 Subject: [PATCH 6/7] add echo Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 5c635b59..9081124e 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -70,6 +70,7 @@ jobs: run: | cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT + echo "Using OpenSearch version $OPENSEARCH_VERSION" - name: Checkout Anomaly-Detection uses: actions/checkout@v2 From f64962ef33b89fcd3983db0d508d2fc4a30704b8 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Thu, 13 Jul 2023 15:47:29 -0700 Subject: [PATCH 7/7] Enforce bash to prevent windows failure Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 9081124e..326fb32c 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -67,6 +67,8 @@ jobs: - run: yarn -v - name: Get OpenSearch version + # Need to use bash to avoid having a windows/linux specific step + shell: bash run: | cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT