Skip to content

Commit

Permalink
[CI] Fix BWC related CI failures by swapping dist url with snapshot url
Browse files Browse the repository at this point in the history
Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
  • Loading branch information
manasvinibs committed Aug 28, 2023
1 parent dee93c9 commit 5099e91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
TEST_OPENSEARCH_DASHBOARDS_PORT: 6610
TEST_OPENSEARCH_TRANSPORT_PORT: 9403
TEST_OPENSEARCH_PORT: 9400
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first"

Expand Down Expand Up @@ -346,7 +347,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
Expand Down
7 changes: 6 additions & 1 deletion scripts/bwc/opensearch_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5099e91

Please sign in to comment.