From 80fe14d673c41f8ca5391c5392e18a1207a67f1a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:40:33 -0700 Subject: [PATCH] [CI] Fix BWC related CI failures by swapping dist url with snapshot url (#4828) (#4985) (cherry picked from commit d8f156f1a04ef7d43b736c0fce96ba587eae13f5) Signed-off-by: Manasvini B Suryanarayana Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/build_and_test_workflow.yml | 2 +- scripts/bwc/opensearch_service.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 57c7f60ba58c..a9175ad23f8b 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -346,7 +346,7 @@ jobs: - name: Set OpenSearch URL run: | - echo "OPENSEARCH_URL=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch/opensearch-${{ env.VERSION }}-linux-x64.tar.gz" >> $GITHUB_ENV + echo "OPENSEARCH_URL=https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.VERSION }}-SNAPSHOT/opensearch-min-${{ env.VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz" >> $GITHUB_ENV - name: Verify if OpenSearch is available for version id: verify-opensearch-exists diff --git a/scripts/bwc/opensearch_service.sh b/scripts/bwc/opensearch_service.sh index ecd95990de7e..09f3b5d50c8c 100755 --- a/scripts/bwc/opensearch_service.sh +++ b/scripts/bwc/opensearch_service.sh @@ -24,7 +24,12 @@ function setup_opensearch() { function run_opensearch() { echo "[ Attempting to start OpenSearch... ]" cd "$OPENSEARCH_DIR" - spawn_process_and_save_PID "./opensearch-tar-install.sh > ${LOGS_DIR}/opensearch.log 2>&1 &" + # Check if opensearch-tar-install.sh exists + if [ -f "./opensearch-tar-install.sh" ]; then + spawn_process_and_save_PID "./opensearch-tar-install.sh > ${LOGS_DIR}/opensearch.log 2>&1 &" + else + spawn_process_and_save_PID "./bin/opensearch > ${LOGS_DIR}/opensearch.log 2>&1 &" + fi } # Checks the running status of OpenSearch