From 7162f624fa3027d670ae702f0f850d87cac7f756 Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Wed, 29 Nov 2023 18:03:09 +0800 Subject: [PATCH] Fix: CI flow on windows main (#145) * feat: remove useless step Signed-off-by: SuZhou-Joe * feat: add opensearch logs Signed-off-by: SuZhou-Joe * feat: update Signed-off-by: SuZhou-Joe * feat: add more requestTimeout Signed-off-by: SuZhou-Joe --------- Signed-off-by: SuZhou-Joe Co-authored-by: Hailong Cui (cherry picked from commit 15c0b72ac44919d691dc459fc61d1f6d6983318c) --- ...t-and-build-workflow-prod-docker-linux.yml | 7 ------- ...-notifications-test-and-build-workflow.yml | 19 +++++++++---------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow-prod-docker-linux.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow-prod-docker-linux.yml index 317c7ad3..3022999d 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow-prod-docker-linux.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow-prod-docker-linux.yml @@ -53,13 +53,6 @@ jobs: distribution: temurin # Temurin is a distribution of adoptium java-version: 11 - - name: Checkout Plugin - uses: actions/checkout@v2 - with: - path: notifications - repository: opensearch-project/notifications - ref: '2.x' - - name: Check out the notifications repo uses: actions/checkout@v2 with: diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml index 7039b0b4..6a9205fc 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml @@ -49,13 +49,6 @@ jobs: with: java-version: 11 - - name: Checkout Plugin - uses: actions/checkout@v2 - with: - path: notifications - repository: opensearch-project/notifications - ref: '2.x' - # This is a hack, but this step creates a link to the X: mounted drive, which makes the path # short enough to work on Windows - name: Shorten Path @@ -72,7 +65,7 @@ jobs: brew install coreutils fi cd notifications/notifications - ./gradlew run -x integTest -x jacocoTestReport & + ./gradlew run -x integTest -x jacocoTestReport | tee -a opensearch.log & timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done' shell: bash env: @@ -136,8 +129,8 @@ jobs: - name: Run OpenSearch Dashboards server run: | - cd OpenSearch-Dashboards - yarn start --no-base-path --no-watch --server.host="0.0.0.0" & + cd ./OpenSearch-Dashboards + yarn start --no-base-path --no-watch --server.host="0.0.0.0" --opensearch.requestTimeout=120000 & timeout 900 bash -c 'while [[ "$(curl -s http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do echo sleeping 5; sleep 5; done' curl -sk localhost:5601/api/status | jq netstat -anp tcp | grep LISTEN | grep 5601 || netstat -ntlp | grep 5601 @@ -191,6 +184,12 @@ jobs: name: cypress-screenshots-${{ matrix.os }} path: OpenSearch-Dashboards/plugins/dashboards-notifications/.cypress/screenshots + - uses: actions/upload-artifact@v1 + if: always() + with: + name: opensearch-logs-${{ matrix.os }} + path: notifications/notifications/opensearch.log + # Test run video was always captured, so this action uses "always()" condition - uses: actions/upload-artifact@v1 if: always()