From 054bd6f7b9e14e21681c4a92b9660ea52ac6bc11 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Thu, 19 Dec 2024 14:05:14 +0100 Subject: [PATCH 1/4] #RI-6373 - Fix cluster-plain-creator-7-1 exited with code 1 e2e workflow failure --- .../actions/deploy-test-reports/action.yml | 9 +++++++++ .github/workflows/tests-backend.yml | 17 +++++++---------- .github/workflows/tests-e2e-appimage.yml | 19 +++++++------------ .github/workflows/tests-e2e-docker.yml | 19 ++++++++----------- .github/workflows/tests-frontend.yml | 12 +++++++----- .github/workflows/tests-integration.yml | 1 + .github/workflows/tests.yml | 4 ++-- tests/e2e/docker.web.docker-compose.yml | 2 +- .../rte/oss-cluster-7-rs/cluster-create.sh | 12 ------------ .../rte/oss-cluster-7-rs/creator.Dockerfile | 6 +++--- tests/e2e/rte/oss-cluster-7/cluster-create.sh | 2 +- tests/e2e/web.runner.ci.ts | 2 +- 12 files changed, 47 insertions(+), 58 deletions(-) delete mode 100644 tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh diff --git a/.github/actions/deploy-test-reports/action.yml b/.github/actions/deploy-test-reports/action.yml index fc24b8dd61..bde66650d1 100644 --- a/.github/actions/deploy-test-reports/action.yml +++ b/.github/actions/deploy-test-reports/action.yml @@ -6,6 +6,10 @@ inputs: description: Group matching the artifacts required: false default: '*' + path: + description: Path for link to the report + required: false + default: '' AWS_BUCKET_NAME_TEST: required: true @@ -46,4 +50,9 @@ runs: aws s3 cp public/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive + - name: Add link to report in the workflow summary + shell: bash + run: | + link="${{ inputs.path }}/index.html" + echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tests-backend.yml b/.github/workflows/tests-backend.yml index 027c38afef..12468b1577 100644 --- a/.github/workflows/tests-backend.yml +++ b/.github/workflows/tests-backend.yml @@ -51,6 +51,7 @@ jobs: curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - name: Unit tests API + timeout-minutes: 20 run: yarn --cwd redisinsight/api/ test:cov --ci --silent - name: Upload Test Report @@ -60,24 +61,20 @@ jobs: name: ${{ env.REPORT_NAME }} path: redisinsight/api/report + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tests-e2e-appimage.yml b/.github/workflows/tests-e2e-appimage.yml index 5da4e70536..dc805e4c3e 100644 --- a/.github/workflows/tests-e2e-appimage.yml +++ b/.github/workflows/tests-e2e-appimage.yml @@ -76,6 +76,7 @@ jobs: fluxbox & - name: Run tests + timeout-minutes: 60 run: | .github/e2e/test.app-image.sh @@ -103,26 +104,20 @@ jobs: list-suites: 'failed' fail-on-error: 'false' + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + # Deploy report to AWS test bucket - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY - diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 21a514b39f..cdc22c733f 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -37,11 +37,15 @@ jobs: fail-fast: false matrix: # Number of threads to run tests - parallel: [0, 1, 2, 3] + parallel: [0, 1, 2, 3, 4, 5] steps: - uses: actions/checkout@v4 + - name: Get current date + id: date + uses: ./.github/actions/get-current-date + # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 @@ -62,7 +66,7 @@ jobs: - name: Generate short list of the test files working-directory: ./tests/e2e run: | - testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}") + testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 6 == ${{ matrix.parallel }}") echo $testFiles @@ -72,6 +76,7 @@ jobs: echo "EOF" >> $GITHUB_ENV - name: Run tests + timeout-minutes: 80 run: | export NODE_INDEX=${{ matrix.parallel }} @@ -112,18 +117,10 @@ jobs: uses: ./.github/actions/deploy-test-reports with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Add link to report in the workflow summary - if: always() - run: | - DATE=$(date +'%Y-%m-%d') - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html" - - echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY - - diff --git a/.github/workflows/tests-frontend.yml b/.github/workflows/tests-frontend.yml index 2080bacdc8..a7affed44b 100644 --- a/.github/workflows/tests-frontend.yml +++ b/.github/workflows/tests-frontend.yml @@ -49,6 +49,7 @@ jobs: curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - name: Unit tests UI + timeout-minutes: 30 run: yarn test:cov --ci --silent - name: Upload Test Report @@ -58,22 +59,23 @@ jobs: name: ${{ env.REPORT_NAME }} path: report + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - name: Add link to report in the workflow summary if: always() run: | diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index db9a13e34f..ea561ef5d3 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -115,6 +115,7 @@ jobs: docker image load -i ./release/docker/docker-linux-alpine.amd64.tar - name: Run tests + timeout-minutes: 20 run: | if [ ${{ inputs.redis_client }} == "node-redis" ]; then export RI_REDIS_CLIENTS_FORCE_STRATEGY=${{ inputs.redis_client }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80e2bb7f03..6854e9cf9e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -152,12 +152,12 @@ jobs: clean: uses: ./.github/workflows/clean-deployments.yml if: always() - needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests] # Remove artifacts from github actions remove-artifacts: name: Remove artifacts - needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index 8e9280a8d9..be7bdc84b3 100644 --- a/tests/e2e/docker.web.docker-compose.yml +++ b/tests/e2e/docker.web.docker-compose.yml @@ -30,7 +30,7 @@ services: E2E_CLOUD_API_SECRET_KEY: $E2E_CLOUD_API_SECRET_KEY REMOTE_FOLDER_PATH: "/root/remote" command: [ - './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '120', + './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '240', '--', 'npm', 'run', 'test:chrome:ci' ] diff --git a/tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh b/tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh deleted file mode 100644 index 35203fadd2..0000000000 --- a/tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -echo 'Try to sleep for a while...' -sleep 5 -echo 'Creating cluster...' -echo "yes" | redis-cli \ - --cluster create \ - 172.31.100.221:6379 \ - 172.31.100.222:6379 \ - 172.31.100.223:6379 \ - --cluster-replicas 0 \ - && redis-server diff --git a/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile b/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile index 1d71491a8d..24762ba80e 100644 --- a/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile +++ b/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile @@ -2,8 +2,8 @@ FROM redis:7.0.6 USER root -COPY cluster-create.sh ./ +COPY cluster-rs-create.sh ./ -RUN chmod a+x cluster-create.sh +RUN chmod a+x cluster-rs-create.sh -CMD ["/bin/sh", "./cluster-create.sh"] +CMD ["/bin/sh", "./cluster-rs-create.sh"] diff --git a/tests/e2e/rte/oss-cluster-7/cluster-create.sh b/tests/e2e/rte/oss-cluster-7/cluster-create.sh index 4c5f86da66..5456f68479 100644 --- a/tests/e2e/rte/oss-cluster-7/cluster-create.sh +++ b/tests/e2e/rte/oss-cluster-7/cluster-create.sh @@ -1,7 +1,7 @@ #!/bin/sh echo 'Try to sleep for a while...' -sleep 5 +sleep 25 echo 'Creating cluster...' echo "yes" | redis-cli \ --cluster create \ diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 8e06c7fba8..4cc77995b9 100644 --- a/tests/e2e/web.runner.ci.ts +++ b/tests/e2e/web.runner.ci.ts @@ -11,7 +11,7 @@ import testcafe from 'testcafe'; experimentalDecorators: true } }) .src((process.env.TEST_FILES || 'tests/web/**/*.e2e.ts').split('\n')) - .browsers(['chromium:headless --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chromium:headless --disable-search-engine-choice-screen --ignore-certificate-errors --disable-dev-shm-usage --no-sandbox']) .screenshots({ path: 'report/screenshots/', takeOnFails: true, From 06c2c56328a05cf5d8ef7e3e86dd809906047ce7 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Thu, 19 Dec 2024 14:06:23 +0100 Subject: [PATCH 2/4] #RI-6373 - Fix cluster-plain-creator-7-1 exited with code 1 e2e workflow failure --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6854e9cf9e..80e2bb7f03 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -152,12 +152,12 @@ jobs: clean: uses: ./.github/workflows/clean-deployments.yml if: always() - needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests] + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] # Remove artifacts from github actions remove-artifacts: name: Remove artifacts - needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests] + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From ce116e5573e9411254121313a14d1f9a1c62dd5c Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Thu, 19 Dec 2024 14:20:32 +0100 Subject: [PATCH 3/4] #RI-6373 - Fix cluster-plain-creator-7-1 exited with code 1 e2e workflow failure --- tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh diff --git a/tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh b/tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh new file mode 100644 index 0000000000..a21401b4df --- /dev/null +++ b/tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +echo 'Try to sleep for a while...' +sleep 25 +echo 'Creating cluster...' +echo "yes" | redis-cli \ + --cluster create \ + 172.31.100.221:6379 \ + 172.31.100.222:6379 \ + 172.31.100.223:6379 \ + --cluster-replicas 0 \ + && redis-server From 0e2ff6dfca264ac51ba6060b3477ccdcee933457 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Thu, 19 Dec 2024 14:59:40 +0100 Subject: [PATCH 4/4] #RI-6373 - Fix cluster-plain-creator-7-1 exited with code 1 e2e workflow failure --- .github/workflows/tests-frontend.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/tests-frontend.yml b/.github/workflows/tests-frontend.yml index a7affed44b..b7669e3acd 100644 --- a/.github/workflows/tests-frontend.yml +++ b/.github/workflows/tests-frontend.yml @@ -75,9 +75,3 @@ jobs: AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY