From 1152aaedf5dbecb03f239d666ccd4abd8a20c88f Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 16:44:53 +0100 Subject: [PATCH 01/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests-e2e-docker.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 107e29d3e4..cd033bd40c 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -45,7 +45,8 @@ jobs: fail-fast: false matrix: # Number of threads to run tests - parallel: [0, 1, 2, 3] + parallel: [0] + # parallel: [0, 1, 2, 3] steps: - uses: actions/checkout@v4 @@ -73,7 +74,9 @@ 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 % 4 == ${{ matrix.parallel }}") + + testFiles=tests/e2e/tests/web/critical-path/database/connecting-to-the-db.e2e.ts echo $testFiles # Multi-Line value From 330143f96702d39879ac0a19fe27a12e130953dc Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 16:52:16 +0100 Subject: [PATCH 02/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests-e2e-docker.yml | 21 ++++++++++++++------- .github/workflows/tests.yml | 3 ++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index cd033bd40c..153895688d 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -57,19 +57,26 @@ jobs: # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 - if: inputs.debug + # if: inputs.debug with: detached: true - - name: Download Docker Artifacts - uses: actions/download-artifact@v4 - with: - name: docker-builds - path: ./release + # - name: Download Docker Artifacts + # uses: actions/download-artifact@v4 + # with: + # name: docker-builds + # path: ./release - name: Load built docker image from workspace run: | - docker image load -i ./release/docker/docker-linux-alpine.amd64.tar + # docker image load -i ./release/docker/docker-linux-alpine.amd64.tar + + OUTPUT_FILE="docker-linux-alpine.amd64.tar" + FILE_URL="https://s3.us-east-1.amazonaws.com/redisinsight.download/public/latest/docker/${OUTPUT_FILE}" + + wget -O "$OUTPUT_FILE" "$FILE_URL" + + docker image load -i ./docker-linux-alpine.amd64.tar - name: Generate short list of the test files working-directory: ./tests/e2e diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c83bb2d2ca..37074eeb97 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -112,7 +112,8 @@ jobs: needs: changes timeout-minutes: 60 if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/') - environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} + # environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} + environment: 'staging' name: Approve E2E tests steps: - uses: actions/checkout@v4 From 4fe1bd65a016457fdfc48e29131e36d283758af2 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 16:53:11 +0100 Subject: [PATCH 03/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests.yml | 96 ++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37074eeb97..689177c9c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -106,63 +106,63 @@ jobs: redis_client: ${{ inputs.redis_client || '' }} debug: ${{ inputs.debug || false }} - # E2E Approve - e2e-approve: - runs-on: ubuntu-latest - needs: changes - timeout-minutes: 60 - if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/') - # environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} - environment: 'staging' - name: Approve E2E tests - steps: - - uses: actions/checkout@v4 + # # E2E Approve + # e2e-approve: + # runs-on: ubuntu-latest + # needs: changes + # timeout-minutes: 60 + # if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/') + # # environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} + # environment: 'staging' + # name: Approve E2E tests + # steps: + # - uses: actions/checkout@v4 # E2E Docker - build-docker: - uses: ./.github/workflows/pipeline-build-docker.yml - needs: e2e-approve - secrets: inherit - with: - debug: ${{ inputs.debug || false }} - only_docker: true + # build-docker: + # uses: ./.github/workflows/pipeline-build-docker.yml + # needs: e2e-approve + # secrets: inherit + # with: + # debug: ${{ inputs.debug || false }} + # only_docker: true e2e-docker-tests: - needs: build-docker + # needs: build-docker uses: ./.github/workflows/tests-e2e-docker.yml secrets: inherit with: debug: ${{ inputs.debug || false }} # E2E AppImage - build-appimage: - uses: ./.github/workflows/pipeline-build-linux.yml - needs: e2e-approve - secrets: inherit - with: - target: linux:appimage:x64 - debug: ${{ inputs.debug || false }} - - e2e-appimage-tests: - needs: build-appimage - uses: ./.github/workflows/tests-e2e-appimage.yml - secrets: inherit - with: - debug: ${{ inputs.debug || false }} - - clean: - uses: ./.github/workflows/clean-deployments.yml - needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] - if: ${{ !inputs.pre_release && always() }} + # build-appimage: + # uses: ./.github/workflows/pipeline-build-linux.yml + # needs: e2e-approve + # secrets: inherit + # with: + # target: linux:appimage:x64 + # debug: ${{ inputs.debug || false }} + + # e2e-appimage-tests: + # needs: build-appimage + # uses: ./.github/workflows/tests-e2e-appimage.yml + # secrets: inherit + # with: + # debug: ${{ inputs.debug || false }} + + # clean: + # uses: ./.github/workflows/clean-deployments.yml + # needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] + # if: ${{ !inputs.pre_release && always() }} # Remove artifacts from github actions - remove-artifacts: - name: Remove artifacts - needs: [clean] - if: ${{ !inputs.pre_release && always() }} - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Remove all artifacts - uses: ./.github/actions/remove-artifacts + # remove-artifacts: + # name: Remove artifacts + # needs: [clean] + # if: ${{ !inputs.pre_release && always() }} + # runs-on: ubuntu-latest + + # steps: + # - uses: actions/checkout@v4 + # - name: Remove all artifacts + # uses: ./.github/actions/remove-artifacts From e55d7099dc3447ad4332cd140fc5d31b5f18d52b Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 17:07:27 +0100 Subject: [PATCH 04/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests-e2e-docker.yml | 2 +- tests/e2e/docker.web.docker-compose.yml | 6 +- tests/e2e/rte.docker-compose.yml | 250 ++++++++++++------------ 3 files changed, 129 insertions(+), 129 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 153895688d..de32e1d81e 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -83,7 +83,7 @@ jobs: run: | # testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}") - testFiles=tests/e2e/tests/web/critical-path/database/connecting-to-the-db.e2e.ts + testFiles=tests/web/critical-path/database/connecting-to-the-db.e2e.ts echo $testFiles # Multi-Line value diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index 32c6c78d90..25b0749f6a 100644 --- a/tests/e2e/docker.web.docker-compose.yml +++ b/tests/e2e/docker.web.docker-compose.yml @@ -30,9 +30,9 @@ 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', - '--', - 'npm', 'run', 'test:chrome:ci' + # './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '120', + # '--', + # 'npm', 'run', 'test:chrome:ci' ] # Built image diff --git a/tests/e2e/rte.docker-compose.yml b/tests/e2e/rte.docker-compose.yml index f5510a9d26..8f87713940 100644 --- a/tests/e2e/rte.docker-compose.yml +++ b/tests/e2e/rte.docker-compose.yml @@ -154,134 +154,134 @@ services: logging: *logging image: redis:5 - # oss cluster (v7) - cluster-plain-creator-7: - logging: *logging - build: - context: ./rte/oss-cluster-7 - dockerfile: creator.Dockerfile - depends_on: - - master-plain-7-1 - - master-plain-7-2 - - master-plain-7-3 - master-plain-7-1: - logging: *logging - build: &cluster-plain-7-build ./rte/oss-cluster-7 - ports: - - 8200:6379 - networks: - default: - ipv4_address: 172.31.100.211 - ssh: - ipv4_address: 172.33.100.211 - master-plain-7-2: - logging: *logging - build: *cluster-plain-7-build - networks: - default: - ipv4_address: 172.31.100.212 - master-plain-7-3: - logging: *logging - build: *cluster-plain-7-build - networks: - default: - ipv4_address: 172.31.100.213 + # # oss cluster (v7) + # cluster-plain-creator-7: + # logging: *logging + # build: + # context: ./rte/oss-cluster-7 + # dockerfile: creator.Dockerfile + # depends_on: + # - master-plain-7-1 + # - master-plain-7-2 + # - master-plain-7-3 + # master-plain-7-1: + # logging: *logging + # build: &cluster-plain-7-build ./rte/oss-cluster-7 + # ports: + # - 8200:6379 + # networks: + # default: + # ipv4_address: 172.31.100.211 + # ssh: + # ipv4_address: 172.33.100.211 + # master-plain-7-2: + # logging: *logging + # build: *cluster-plain-7-build + # networks: + # default: + # ipv4_address: 172.31.100.212 + # master-plain-7-3: + # logging: *logging + # build: *cluster-plain-7-build + # networks: + # default: + # ipv4_address: 172.31.100.213 - # oss cluster (v7) with rediserch > 2.2 - cluster-rs-creator-7: - logging: *logging - build: - context: &cluster-rs-7-build ./rte/oss-cluster-7-rs - dockerfile: creator.Dockerfile - depends_on: - - master-rs-7-1 - - master-rs-7-2 - - master-rs-7-3 - master-rs-7-1: - logging: *logging - build: *cluster-rs-7-build - ports: - - 8221:6379 - networks: - default: - ipv4_address: 172.31.100.221 - master-rs-7-2: - logging: *logging - build: *cluster-rs-7-build - networks: - default: - ipv4_address: 172.31.100.222 - master-rs-7-3: - logging: *logging - build: *cluster-rs-7-build - networks: - default: - ipv4_address: 172.31.100.223 + # # oss cluster (v7) with rediserch > 2.2 + # cluster-rs-creator-7: + # logging: *logging + # build: + # context: &cluster-rs-7-build ./rte/oss-cluster-7-rs + # dockerfile: creator.Dockerfile + # depends_on: + # - master-rs-7-1 + # - master-rs-7-2 + # - master-rs-7-3 + # master-rs-7-1: + # logging: *logging + # build: *cluster-rs-7-build + # ports: + # - 8221:6379 + # networks: + # default: + # ipv4_address: 172.31.100.221 + # master-rs-7-2: + # logging: *logging + # build: *cluster-rs-7-build + # networks: + # default: + # ipv4_address: 172.31.100.222 + # master-rs-7-3: + # logging: *logging + # build: *cluster-rs-7-build + # networks: + # default: + # ipv4_address: 172.31.100.223 - # oss cluster with redisgears 2 - gears-cluster-2-0-creator: - logging: *logging - image: redis:latest - entrypoint: ['/bin/sh', '-c', 'redis-cli --cluster create 172.31.100.191:6379 172.31.100.192:6379 172.31.100.193:6379 172.31.100.194:6379 172.31.100.195:6379 172.31.100.196:6379 --cluster-replicas 1 --cluster-yes && tail -f /dev/null'] - depends_on: - - gears-cluster-2-0-node-1 - - gears-cluster-2-0-node-2 - - gears-cluster-2-0-node-3 - - gears-cluster-2-0-node-4 - - gears-cluster-2-0-node-5 - - gears-cluster-2-0-node-6 - gears-cluster-2-0-node-1: - logging: *logging - image: &gears-cluster-img redislabs/redisgears:edge - command: &gears-cluster-cmd redis-server --protected-mode no --loadmodule /build/target/release/libredisgears.so v8-plugin-path /build/target/release/libredisgears_v8_plugin.so --cluster-enabled yes - networks: - default: - ipv4_address: 172.31.100.191 - gears-cluster-2-0-node-2: - logging: *logging - image: *gears-cluster-img - command: *gears-cluster-cmd - networks: - default: - ipv4_address: 172.31.100.192 - gears-cluster-2-0-node-3: - logging: *logging - image: *gears-cluster-img - command: *gears-cluster-cmd - networks: - default: - ipv4_address: 172.31.100.193 - gears-cluster-2-0-node-4: - logging: *logging - image: *gears-cluster-img - command: *gears-cluster-cmd - networks: - default: - ipv4_address: 172.31.100.194 - gears-cluster-2-0-node-5: - logging: *logging - image: *gears-cluster-img - command: *gears-cluster-cmd - networks: - default: - ipv4_address: 172.31.100.195 - gears-cluster-2-0-node-6: - logging: *logging - image: *gears-cluster-img - command: *gears-cluster-cmd - networks: - default: - ipv4_address: 172.31.100.196 + # # oss cluster with redisgears 2 + # gears-cluster-2-0-creator: + # logging: *logging + # image: redis:latest + # entrypoint: ['/bin/sh', '-c', 'redis-cli --cluster create 172.31.100.191:6379 172.31.100.192:6379 172.31.100.193:6379 172.31.100.194:6379 172.31.100.195:6379 172.31.100.196:6379 --cluster-replicas 1 --cluster-yes && tail -f /dev/null'] + # depends_on: + # - gears-cluster-2-0-node-1 + # - gears-cluster-2-0-node-2 + # - gears-cluster-2-0-node-3 + # - gears-cluster-2-0-node-4 + # - gears-cluster-2-0-node-5 + # - gears-cluster-2-0-node-6 + # gears-cluster-2-0-node-1: + # logging: *logging + # image: &gears-cluster-img redislabs/redisgears:edge + # command: &gears-cluster-cmd redis-server --protected-mode no --loadmodule /build/target/release/libredisgears.so v8-plugin-path /build/target/release/libredisgears_v8_plugin.so --cluster-enabled yes + # networks: + # default: + # ipv4_address: 172.31.100.191 + # gears-cluster-2-0-node-2: + # logging: *logging + # image: *gears-cluster-img + # command: *gears-cluster-cmd + # networks: + # default: + # ipv4_address: 172.31.100.192 + # gears-cluster-2-0-node-3: + # logging: *logging + # image: *gears-cluster-img + # command: *gears-cluster-cmd + # networks: + # default: + # ipv4_address: 172.31.100.193 + # gears-cluster-2-0-node-4: + # logging: *logging + # image: *gears-cluster-img + # command: *gears-cluster-cmd + # networks: + # default: + # ipv4_address: 172.31.100.194 + # gears-cluster-2-0-node-5: + # logging: *logging + # image: *gears-cluster-img + # command: *gears-cluster-cmd + # networks: + # default: + # ipv4_address: 172.31.100.195 + # gears-cluster-2-0-node-6: + # logging: *logging + # image: *gears-cluster-img + # command: *gears-cluster-cmd + # networks: + # default: + # ipv4_address: 172.31.100.196 - # redis enterprise - redis-enterprise: - logging: *logging - build: ./rte/redis-enterprise - cap_add: - - sys_resource - ports: - - 19443:9443 - - 12000:12000 + # # redis enterprise + # redis-enterprise: + # logging: *logging + # build: ./rte/redis-enterprise + # cap_add: + # - sys_resource + # ports: + # - 19443:9443 + # - 12000:12000 networks: default: name: "e2e-private-network" From 34ac571870631c8a3f545de854eb76421c74d20a Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 17:14:28 +0100 Subject: [PATCH 05/28] #RI-6325 - Fix e2e tests for SSH --- tests/e2e/docker.web.docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index 25b0749f6a..c96b0e0231 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:12001', '-s', '-t', '120000', # '--', # 'npm', 'run', 'test:chrome:ci' ] From 61724114402216b5a699801b536da5cb23929d46 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 17:22:28 +0100 Subject: [PATCH 06/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests-e2e-docker.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index de32e1d81e..5c9e300455 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -54,6 +54,11 @@ jobs: - name: Setup repository run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 From 6a247d874661c7a90a5af0c238ecb757f3c48f02 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Wed, 20 Nov 2024 17:57:03 +0100 Subject: [PATCH 07/28] #RI-6325 - Fix e2e tests for SSH --- .github/workflows/tests-e2e-docker.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 5c9e300455..8aa90a3ef4 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -35,12 +35,11 @@ jobs: name: E2E Docker tests # environment: # name: production - container: - image: docker:latest - options: --privileged - volumes: - - /usr/src/app/results:/usr/src/app/results - - /usr/src/app/report:/usr/src/app/report + # container: + # image: docker:latest + # volumes: + # - /usr/src/app/results:/usr/src/app/results + # - /usr/src/app/report:/usr/src/app/report strategy: fail-fast: false matrix: From 2ef88a4c2daae6936dd90b02e3f55079221b3692 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 12:02:50 +0100 Subject: [PATCH 08/28] #RI-6325 - Fix e2e tests for SSH --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 2699224643..51d0e36ea8 100644 --- a/tests/e2e/web.runner.ci.ts +++ b/tests/e2e/web.runner.ci.ts @@ -34,7 +34,7 @@ import testcafe from 'testcafe'; ]) .run({ skipJsErrors: true, - browserInitTimeout: 120000, + browserInitTimeout: 240000, selectorTimeout: 5000, assertionTimeout: 5000, speed: 1, From 74ed95c55a8f4c1d8f8cdf2991e6f7b8b266f0df Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 13:28:04 +0100 Subject: [PATCH 09/28] #RI-6349 - Fix mas build --- .github/workflows/pipeline-build-macos.yml | 34 +++++++++---------- electron-builder-mas.js | 1 + electron-builder.json | 3 +- redisinsight/api/package.json | 1 + redisinsight/api/stubs/cpu-features/index.js | 1 + .../api/stubs/cpu-features/package.json | 5 +++ redisinsight/api/yarn.lock | 19 ++--------- redisinsight/package.json | 3 +- redisinsight/yarn.lock | 32 ++++++----------- 9 files changed, 40 insertions(+), 59 deletions(-) create mode 100644 redisinsight/api/stubs/cpu-features/index.js create mode 100644 redisinsight/api/stubs/cpu-features/package.json diff --git a/.github/workflows/pipeline-build-macos.yml b/.github/workflows/pipeline-build-macos.yml index a389dcce68..1a074f7b53 100644 --- a/.github/workflows/pipeline-build-macos.yml +++ b/.github/workflows/pipeline-build-macos.yml @@ -64,37 +64,35 @@ jobs: mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg - name: Build macos dmg (staging) - if: (vars.ENV == 'staging' || vars.ENV == 'development') && inputs.target == vars.ALL + # if: (vars.ENV == 'staging' || vars.ENV == 'development') && inputs.target == vars.ALL run: | unset CSC_LINK echo $APP_BUNDLE_VERSION echo $CSC_KEYCHAIN - yarn package:stage + yarn package:stage && yarn package:mas rm -rf release/mac - - # TODO: return MAS build - # yarn package:stage && yarn package:mas - # mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg + + mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg # handle manual builds - - name: Build macos dmg (custom) - if: inputs.target != vars.ALL - run: | - unset CSC_LINK - target=$(echo "${{inputs.target}}" | grep -oE 'build_macos_[^ ]+' | sed 's/build_macos_/dmg:/' | paste -sd ' ' -) + # - name: Build macos dmg (custom) + # if: inputs.target != vars.ALL + # run: | + # unset CSC_LINK + # target=$(echo "${{inputs.target}}" | grep -oE 'build_macos_[^ ]+' | sed 's/build_macos_/dmg:/' | paste -sd ' ' -) - if [ "${{ vars.ENV == 'production' }}" == "true" ]; then - yarn package:prod --mac $target - else - yarn package:stage --mac $target - fi + # if [ "${{ vars.ENV == 'production' }}" == "true" ]; then + # yarn package:prod --mac $target + # else + # yarn package:stage --mac $target + # fi - rm -rf release/mac + # rm -rf release/mac - name: Repack dmg to tar - if: vars.ENV == 'production' && inputs.target == vars.ALL + # if: vars.ENV == 'production' && inputs.target == vars.ALL run: | ARCH=x64 ./.github/redisstack/dmg.repack.sh ARCH=arm64 ./.github/redisstack/dmg.repack.sh diff --git a/electron-builder-mas.js b/electron-builder-mas.js index 2907e851c1..6fbe6e1964 100644 --- a/electron-builder-mas.js +++ b/electron-builder-mas.js @@ -2,6 +2,7 @@ const electronBuilder = require('./electron-builder.json') const config = { ...electronBuilder, + npmRebuild: true, appId: 'com.redis.RedisInsight', } diff --git a/electron-builder.json b/electron-builder.json index aee0f3148b..d1a2e42187 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -12,8 +12,7 @@ "compression": "normal", "asarUnpack": [ "node_modules/keytar", - "node_modules/sqlite3", - "node_modules/cpu-features" + "node_modules/sqlite3" ], "protocols": [{ "name": "RedisInsight", diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 874a1d7792..bc8afe625e 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -48,6 +48,7 @@ "@nestjs/platform-socket.io/socket.io": "^4.8.0", "@nestjs/cli/**/braces": "^3.0.3", "**/semver": "^7.5.2", + "**/cpu-features": "file:./stubs/cpu-features", "winston-daily-rotate-file/**/file-stream-rotator": "^1.0.0" }, "dependencies": { diff --git a/redisinsight/api/stubs/cpu-features/index.js b/redisinsight/api/stubs/cpu-features/index.js new file mode 100644 index 0000000000..f053ebf797 --- /dev/null +++ b/redisinsight/api/stubs/cpu-features/index.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/redisinsight/api/stubs/cpu-features/package.json b/redisinsight/api/stubs/cpu-features/package.json new file mode 100644 index 0000000000..95b97743c0 --- /dev/null +++ b/redisinsight/api/stubs/cpu-features/package.json @@ -0,0 +1,5 @@ +{ + "name": "cpu-features", + "version": "1.0.0", + "main": "index.js" +} diff --git a/redisinsight/api/yarn.lock b/redisinsight/api/yarn.lock index 02a158cdae..ce2390fa2c 100644 --- a/redisinsight/api/yarn.lock +++ b/redisinsight/api/yarn.lock @@ -2626,11 +2626,6 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buildcheck@~0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238" - integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A== - busboy@^1.0.0, busboy@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" @@ -3213,13 +3208,8 @@ cosmiconfig@^8.2.0: parse-json "^5.2.0" path-type "^4.0.0" -cpu-features@~0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" - integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ== - dependencies: - buildcheck "~0.0.6" - nan "^2.17.0" +"cpu-features@file:./stubs/cpu-features", cpu-features@~0.0.9: + version "1.0.0" create-jest@^29.7.0: version "29.7.0" @@ -6446,11 +6436,6 @@ mz@^2.4.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.17.0: - version "2.17.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" - integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== - nan@^2.18.0: version "2.18.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" diff --git a/redisinsight/package.json b/redisinsight/package.json index 69059207fe..5c0b3dc79a 100644 --- a/redisinsight/package.json +++ b/redisinsight/package.json @@ -16,7 +16,8 @@ }, "resolutions": { "**/semver": "^7.5.2", - "sqlite3/**/tar": "^6.2.1" + "sqlite3/**/tar": "^6.2.1", + "**/cpu-features": "file:./api/stubs/cpu-features" }, "dependencies": { "keytar": "^7.9.0", diff --git a/redisinsight/yarn.lock b/redisinsight/yarn.lock index c12a5b9c62..7a063ce0f3 100644 --- a/redisinsight/yarn.lock +++ b/redisinsight/yarn.lock @@ -129,11 +129,6 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buildcheck@~0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238" - integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A== - cacache@^15.2.0: version "15.3.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" @@ -188,13 +183,8 @@ console-control-strings@^1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== -cpu-features@~0.0.9: - version "0.0.10" - resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.10.tgz#9aae536db2710c7254d7ed67cb3cbc7d29ad79c5" - integrity sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA== - dependencies: - buildcheck "~0.0.6" - nan "^2.19.0" +"cpu-features@file:./api/stubs/cpu-features", cpu-features@~0.0.10: + version "1.0.0" debug@4, debug@^4.3.3: version "4.3.4" @@ -557,10 +547,10 @@ ms@^2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nan@^2.18.0, nan@^2.19.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" - integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw== +nan@^2.20.0: + version "2.22.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.22.0.tgz#31bc433fc33213c97bad36404bb68063de604de3" + integrity sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw== napi-build-utils@^1.0.1: version "1.0.2" @@ -810,15 +800,15 @@ sqlite3@5.1.7: node-gyp "8.x" ssh2@^1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b" - integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== + version "1.16.0" + resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.16.0.tgz#79221d40cbf4d03d07fe881149de0a9de928c9f0" + integrity sha512-r1X4KsBGedJqo7h8F5c4Ybpcr5RjyP+aWIG007uBPRjmdQWfEiVLzSK71Zji1B9sKxwaCvD8y8cwSkYrlLiRRg== dependencies: asn1 "^0.2.6" bcrypt-pbkdf "^1.0.2" optionalDependencies: - cpu-features "~0.0.9" - nan "^2.18.0" + cpu-features "~0.0.10" + nan "^2.20.0" ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" From 701a613944f6629706db56b82d3ab960d7be4e43 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 13:54:37 +0100 Subject: [PATCH 10/28] #RI-6349 - Fix mas build --- electron-builder-mas.js | 1 - electron-builder.json | 1 - 2 files changed, 2 deletions(-) diff --git a/electron-builder-mas.js b/electron-builder-mas.js index 6fbe6e1964..2907e851c1 100644 --- a/electron-builder-mas.js +++ b/electron-builder-mas.js @@ -2,7 +2,6 @@ const electronBuilder = require('./electron-builder.json') const config = { ...electronBuilder, - npmRebuild: true, appId: 'com.redis.RedisInsight', } diff --git a/electron-builder.json b/electron-builder.json index d1a2e42187..d0aa82c16d 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -7,7 +7,6 @@ "node_modules", "package.json" ], - "npmRebuild": false, "artifactName": "Redis-Insight-${os}-${arch}.${ext}", "compression": "normal", "asarUnpack": [ From 11726f5dd32cb648fb2d84b1fe535159f1389264 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 14:26:35 +0100 Subject: [PATCH 11/28] #RI-6349 - Fix mas build --- package.json | 1 - yarn.lock | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9e7137756b..83fdb79b1b 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "**/trim": "0.0.3", "word-wrap": "1.2.4", "**/semver": "^7.5.2", - "@electron/notarize": "2.5.0", "rawproto/protobufjs": "^7.2.5", "webpack-bundle-analyzer/ws": "^7.5.10", "msw/path-to-regexp": "^6.3.0", diff --git a/yarn.lock b/yarn.lock index 8f909ef0ed..56a809d3fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1205,10 +1205,10 @@ tar "^6.2.1" which "^2.0.2" -"@electron/notarize@2.2.1", "@electron/notarize@2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.5.0.tgz#d4d25356adfa29df4a76bd64a8bd347237cd251e" - integrity sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A== +"@electron/notarize@2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.1.tgz#d0aa6bc43cba830c41bfd840b85dbe0e273f59fe" + integrity sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg== dependencies: debug "^4.1.1" fs-extra "^9.0.1" @@ -12563,7 +12563,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12668,7 +12677,14 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -14006,7 +14022,7 @@ word-wrap@1.2.4, word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -14024,6 +14040,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 0a2030e0169a503c4efdc6393e83dfcffa27e0f8 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 14:50:08 +0100 Subject: [PATCH 12/28] #RI-6349 - Fix mas build --- .github/workflows/pipeline-build-macos.yml | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pipeline-build-macos.yml b/.github/workflows/pipeline-build-macos.yml index 1a074f7b53..eafc375ed4 100644 --- a/.github/workflows/pipeline-build-macos.yml +++ b/.github/workflows/pipeline-build-macos.yml @@ -64,7 +64,7 @@ jobs: mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg - name: Build macos dmg (staging) - # if: (vars.ENV == 'staging' || vars.ENV == 'development') && inputs.target == vars.ALL + if: (vars.ENV == 'staging' || vars.ENV == 'development') && inputs.target == vars.ALL run: | unset CSC_LINK @@ -77,22 +77,22 @@ jobs: mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg # handle manual builds - # - name: Build macos dmg (custom) - # if: inputs.target != vars.ALL - # run: | - # unset CSC_LINK - # target=$(echo "${{inputs.target}}" | grep -oE 'build_macos_[^ ]+' | sed 's/build_macos_/dmg:/' | paste -sd ' ' -) + - name: Build macos dmg (custom) + if: inputs.target != vars.ALL + run: | + unset CSC_LINK + target=$(echo "${{inputs.target}}" | grep -oE 'build_macos_[^ ]+' | sed 's/build_macos_/dmg:/' | paste -sd ' ' -) - # if [ "${{ vars.ENV == 'production' }}" == "true" ]; then - # yarn package:prod --mac $target - # else - # yarn package:stage --mac $target - # fi + if [ "${{ vars.ENV == 'production' }}" == "true" ]; then + yarn package:prod --mac $target + else + yarn package:stage --mac $target + fi - # rm -rf release/mac + rm -rf release/mac - name: Repack dmg to tar - # if: vars.ENV == 'production' && inputs.target == vars.ALL + if: vars.ENV == 'production' && inputs.target == vars.ALL run: | ARCH=x64 ./.github/redisstack/dmg.repack.sh ARCH=arm64 ./.github/redisstack/dmg.repack.sh From 788c796c3f88ee2b4771c62fab88d0faa172ba20 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 15:26:56 +0100 Subject: [PATCH 13/28] #RI-6349 - Fix mas build --- .github/workflows/tests-e2e-docker.yml | 14 +- tests/e2e/rte.docker-compose.yml | 250 ++++++++++++------------- tests/e2e/web.runner.ci.ts | 3 +- 3 files changed, 134 insertions(+), 133 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 8aa90a3ef4..f3f50d3778 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -44,8 +44,8 @@ jobs: fail-fast: false matrix: # Number of threads to run tests - parallel: [0] - # parallel: [0, 1, 2, 3] + # parallel: [0] + parallel: [0, 1, 2, 3] steps: - uses: actions/checkout@v4 @@ -53,10 +53,10 @@ jobs: - name: Setup repository run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' + # - name: Setup Python + # uses: actions/setup-python@v5 + # with: + # python-version: '3.11' # SSH Debug - name: Enable SSH @@ -76,7 +76,7 @@ jobs: # docker image load -i ./release/docker/docker-linux-alpine.amd64.tar OUTPUT_FILE="docker-linux-alpine.amd64.tar" - FILE_URL="https://s3.us-east-1.amazonaws.com/redisinsight.download/public/latest/docker/${OUTPUT_FILE}" + FILE_URL="https://s3.us-east-1.amazonaws.com/redisinsight.test/public/pre-release/2.62.0/docker/${OUTPUT_FILE}" wget -O "$OUTPUT_FILE" "$FILE_URL" diff --git a/tests/e2e/rte.docker-compose.yml b/tests/e2e/rte.docker-compose.yml index 8f87713940..f5510a9d26 100644 --- a/tests/e2e/rte.docker-compose.yml +++ b/tests/e2e/rte.docker-compose.yml @@ -154,134 +154,134 @@ services: logging: *logging image: redis:5 - # # oss cluster (v7) - # cluster-plain-creator-7: - # logging: *logging - # build: - # context: ./rte/oss-cluster-7 - # dockerfile: creator.Dockerfile - # depends_on: - # - master-plain-7-1 - # - master-plain-7-2 - # - master-plain-7-3 - # master-plain-7-1: - # logging: *logging - # build: &cluster-plain-7-build ./rte/oss-cluster-7 - # ports: - # - 8200:6379 - # networks: - # default: - # ipv4_address: 172.31.100.211 - # ssh: - # ipv4_address: 172.33.100.211 - # master-plain-7-2: - # logging: *logging - # build: *cluster-plain-7-build - # networks: - # default: - # ipv4_address: 172.31.100.212 - # master-plain-7-3: - # logging: *logging - # build: *cluster-plain-7-build - # networks: - # default: - # ipv4_address: 172.31.100.213 + # oss cluster (v7) + cluster-plain-creator-7: + logging: *logging + build: + context: ./rte/oss-cluster-7 + dockerfile: creator.Dockerfile + depends_on: + - master-plain-7-1 + - master-plain-7-2 + - master-plain-7-3 + master-plain-7-1: + logging: *logging + build: &cluster-plain-7-build ./rte/oss-cluster-7 + ports: + - 8200:6379 + networks: + default: + ipv4_address: 172.31.100.211 + ssh: + ipv4_address: 172.33.100.211 + master-plain-7-2: + logging: *logging + build: *cluster-plain-7-build + networks: + default: + ipv4_address: 172.31.100.212 + master-plain-7-3: + logging: *logging + build: *cluster-plain-7-build + networks: + default: + ipv4_address: 172.31.100.213 - # # oss cluster (v7) with rediserch > 2.2 - # cluster-rs-creator-7: - # logging: *logging - # build: - # context: &cluster-rs-7-build ./rte/oss-cluster-7-rs - # dockerfile: creator.Dockerfile - # depends_on: - # - master-rs-7-1 - # - master-rs-7-2 - # - master-rs-7-3 - # master-rs-7-1: - # logging: *logging - # build: *cluster-rs-7-build - # ports: - # - 8221:6379 - # networks: - # default: - # ipv4_address: 172.31.100.221 - # master-rs-7-2: - # logging: *logging - # build: *cluster-rs-7-build - # networks: - # default: - # ipv4_address: 172.31.100.222 - # master-rs-7-3: - # logging: *logging - # build: *cluster-rs-7-build - # networks: - # default: - # ipv4_address: 172.31.100.223 + # oss cluster (v7) with rediserch > 2.2 + cluster-rs-creator-7: + logging: *logging + build: + context: &cluster-rs-7-build ./rte/oss-cluster-7-rs + dockerfile: creator.Dockerfile + depends_on: + - master-rs-7-1 + - master-rs-7-2 + - master-rs-7-3 + master-rs-7-1: + logging: *logging + build: *cluster-rs-7-build + ports: + - 8221:6379 + networks: + default: + ipv4_address: 172.31.100.221 + master-rs-7-2: + logging: *logging + build: *cluster-rs-7-build + networks: + default: + ipv4_address: 172.31.100.222 + master-rs-7-3: + logging: *logging + build: *cluster-rs-7-build + networks: + default: + ipv4_address: 172.31.100.223 - # # oss cluster with redisgears 2 - # gears-cluster-2-0-creator: - # logging: *logging - # image: redis:latest - # entrypoint: ['/bin/sh', '-c', 'redis-cli --cluster create 172.31.100.191:6379 172.31.100.192:6379 172.31.100.193:6379 172.31.100.194:6379 172.31.100.195:6379 172.31.100.196:6379 --cluster-replicas 1 --cluster-yes && tail -f /dev/null'] - # depends_on: - # - gears-cluster-2-0-node-1 - # - gears-cluster-2-0-node-2 - # - gears-cluster-2-0-node-3 - # - gears-cluster-2-0-node-4 - # - gears-cluster-2-0-node-5 - # - gears-cluster-2-0-node-6 - # gears-cluster-2-0-node-1: - # logging: *logging - # image: &gears-cluster-img redislabs/redisgears:edge - # command: &gears-cluster-cmd redis-server --protected-mode no --loadmodule /build/target/release/libredisgears.so v8-plugin-path /build/target/release/libredisgears_v8_plugin.so --cluster-enabled yes - # networks: - # default: - # ipv4_address: 172.31.100.191 - # gears-cluster-2-0-node-2: - # logging: *logging - # image: *gears-cluster-img - # command: *gears-cluster-cmd - # networks: - # default: - # ipv4_address: 172.31.100.192 - # gears-cluster-2-0-node-3: - # logging: *logging - # image: *gears-cluster-img - # command: *gears-cluster-cmd - # networks: - # default: - # ipv4_address: 172.31.100.193 - # gears-cluster-2-0-node-4: - # logging: *logging - # image: *gears-cluster-img - # command: *gears-cluster-cmd - # networks: - # default: - # ipv4_address: 172.31.100.194 - # gears-cluster-2-0-node-5: - # logging: *logging - # image: *gears-cluster-img - # command: *gears-cluster-cmd - # networks: - # default: - # ipv4_address: 172.31.100.195 - # gears-cluster-2-0-node-6: - # logging: *logging - # image: *gears-cluster-img - # command: *gears-cluster-cmd - # networks: - # default: - # ipv4_address: 172.31.100.196 + # oss cluster with redisgears 2 + gears-cluster-2-0-creator: + logging: *logging + image: redis:latest + entrypoint: ['/bin/sh', '-c', 'redis-cli --cluster create 172.31.100.191:6379 172.31.100.192:6379 172.31.100.193:6379 172.31.100.194:6379 172.31.100.195:6379 172.31.100.196:6379 --cluster-replicas 1 --cluster-yes && tail -f /dev/null'] + depends_on: + - gears-cluster-2-0-node-1 + - gears-cluster-2-0-node-2 + - gears-cluster-2-0-node-3 + - gears-cluster-2-0-node-4 + - gears-cluster-2-0-node-5 + - gears-cluster-2-0-node-6 + gears-cluster-2-0-node-1: + logging: *logging + image: &gears-cluster-img redislabs/redisgears:edge + command: &gears-cluster-cmd redis-server --protected-mode no --loadmodule /build/target/release/libredisgears.so v8-plugin-path /build/target/release/libredisgears_v8_plugin.so --cluster-enabled yes + networks: + default: + ipv4_address: 172.31.100.191 + gears-cluster-2-0-node-2: + logging: *logging + image: *gears-cluster-img + command: *gears-cluster-cmd + networks: + default: + ipv4_address: 172.31.100.192 + gears-cluster-2-0-node-3: + logging: *logging + image: *gears-cluster-img + command: *gears-cluster-cmd + networks: + default: + ipv4_address: 172.31.100.193 + gears-cluster-2-0-node-4: + logging: *logging + image: *gears-cluster-img + command: *gears-cluster-cmd + networks: + default: + ipv4_address: 172.31.100.194 + gears-cluster-2-0-node-5: + logging: *logging + image: *gears-cluster-img + command: *gears-cluster-cmd + networks: + default: + ipv4_address: 172.31.100.195 + gears-cluster-2-0-node-6: + logging: *logging + image: *gears-cluster-img + command: *gears-cluster-cmd + networks: + default: + ipv4_address: 172.31.100.196 - # # redis enterprise - # redis-enterprise: - # logging: *logging - # build: ./rte/redis-enterprise - # cap_add: - # - sys_resource - # ports: - # - 19443:9443 - # - 12000:12000 + # redis enterprise + redis-enterprise: + logging: *logging + build: ./rte/redis-enterprise + cap_add: + - sys_resource + ports: + - 19443:9443 + - 12000:12000 networks: default: name: "e2e-private-network" diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 51d0e36ea8..3922aee556 100644 --- a/tests/e2e/web.runner.ci.ts +++ b/tests/e2e/web.runner.ci.ts @@ -11,7 +11,8 @@ import testcafe from 'testcafe'; experimentalDecorators: true } }) .src((process.env.TEST_FILES || 'tests/web/**/*.e2e.ts').split('\n')) - .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chrome:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) + // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', takeOnFails: true, From 2587bea3faa0ed4fdfb240df14012135f38f60b6 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 15:40:02 +0100 Subject: [PATCH 14/28] #RI-6349 - Fix mas build --- tests/e2e/docker.web.docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index c96b0e0231..32c6c78d90 100644 --- a/tests/e2e/docker.web.docker-compose.yml +++ b/tests/e2e/docker.web.docker-compose.yml @@ -30,9 +30,9 @@ services: E2E_CLOUD_API_SECRET_KEY: $E2E_CLOUD_API_SECRET_KEY REMOTE_FOLDER_PATH: "/root/remote" command: [ - './wait-for-it.sh', 'redis-enterprise:12001', '-s', '-t', '120000', - # '--', - # 'npm', 'run', 'test:chrome:ci' + './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '120', + '--', + 'npm', 'run', 'test:chrome:ci' ] # Built image From 6976b599b4bebd8a1a90224173641505ac7e3283 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 15:46:48 +0100 Subject: [PATCH 15/28] test --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 3922aee556..c34dfd0cff 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(['chrome:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chrome --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', From d3ce57dd5ee5e5c427017e0a07609df7253cd5c3 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 15:55:17 +0100 Subject: [PATCH 16/28] test --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index c34dfd0cff..cb2076983d 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(['chrome --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chrome:headless']) // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', From 53e68b374f965c6f51de6f87cff74016c04bc374 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 15:55:17 +0100 Subject: [PATCH 17/28] test --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index cb2076983d..e4471fa13e 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(['chrome:headless']) + .browsers(['firefox:headless']) // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', From 56520b85c3ee0346fb414c0a71df7486a8ac61ea Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 16:16:50 +0100 Subject: [PATCH 18/28] #RI-6325 - Fix e2e --- .github/workflows/tests-e2e-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index f3f50d3778..cfb3b9aa3c 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -61,7 +61,7 @@ jobs: # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 - # if: inputs.debug + if: inputs.debug with: detached: true From 3b9a51ef215308c400d615bb45cab841680d3d07 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 16:32:44 +0100 Subject: [PATCH 19/28] #RI-6325 - Fix e2e --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index e4471fa13e..90679b0336 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(['firefox:headless']) + .browsers(['firefox:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', From 32b286eb95a927845e5ab5300f92bca8805fd7b6 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 16:39:34 +0100 Subject: [PATCH 20/28] #RI-6325 - Fix e2e --- .github/workflows/tests-e2e-docker.yml | 2 +- tests/e2e/web.runner.ci.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index cfb3b9aa3c..9dab3cdb65 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -87,7 +87,7 @@ jobs: run: | # testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}") - testFiles=tests/web/critical-path/database/connecting-to-the-db.e2e.ts + # testFiles=tests/web/critical-path/database/connecting-to-the-db.e2e.ts echo $testFiles # Multi-Line value diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 90679b0336..8e06c7fba8 100644 --- a/tests/e2e/web.runner.ci.ts +++ b/tests/e2e/web.runner.ci.ts @@ -11,8 +11,7 @@ import testcafe from 'testcafe'; experimentalDecorators: true } }) .src((process.env.TEST_FILES || 'tests/web/**/*.e2e.ts').split('\n')) - .browsers(['firefox:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) - // .browsers(['chromium:headless --cache --allow-insecure-localhost --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chromium:headless --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', takeOnFails: true, From 811dd6b417175475f6f5d2537a5455df79828547 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 17:00:51 +0100 Subject: [PATCH 21/28] test --- tests/e2e/web.runner.ci.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 8e06c7fba8..e34b994a02 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(['firefox:headless --disable-search-engine-choice-screen --ignore-certificate-errors']) .screenshots({ path: 'report/screenshots/', takeOnFails: true, From 37b1608d3bdcda88596ed4ed300e872f2a6a069f Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 17:20:53 +0100 Subject: [PATCH 22/28] #RI-6325 - Fix e2e --- tests/e2e/docker.web.docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index 32c6c78d90..8e9280a8d9 100644 --- a/tests/e2e/docker.web.docker-compose.yml +++ b/tests/e2e/docker.web.docker-compose.yml @@ -46,6 +46,7 @@ services: RI_ENCRYPTION_KEY: $E2E_RI_ENCRYPTION_KEY RI_SERVER_TLS_CERT: $RI_SERVER_TLS_CERT RI_SERVER_TLS_KEY: $RI_SERVER_TLS_KEY + RI_STDOUT_LOGGER: 'false' volumes: - rihomedir:/data - tmp:/tmp From 8bfcbafdf66b048344cc733cfd07f202399916e0 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Fri, 22 Nov 2024 17:22:59 +0100 Subject: [PATCH 23/28] #RI-6325 - Fix e2e --- .github/workflows/tests-e2e-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 9dab3cdb65..4cf0cb04a9 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -85,7 +85,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 % 4 == ${{ matrix.parallel }}") # testFiles=tests/web/critical-path/database/connecting-to-the-db.e2e.ts echo $testFiles From 329a0825dcb48416f0dcb07bb36fcf25d1724c3b Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Sun, 24 Nov 2024 18:21:22 +0100 Subject: [PATCH 24/28] #RI-6325 - Fix e2e --- .github/workflows/pipeline-build-docker.yml | 27 ++++-- .github/workflows/tests-e2e-docker.yml | 54 ++++-------- .github/workflows/tests.yml | 91 ++++++++++----------- 3 files changed, 80 insertions(+), 92 deletions(-) diff --git a/.github/workflows/pipeline-build-docker.yml b/.github/workflows/pipeline-build-docker.yml index de16477508..d40e948b29 100644 --- a/.github/workflows/pipeline-build-docker.yml +++ b/.github/workflows/pipeline-build-docker.yml @@ -7,8 +7,8 @@ on: default: 'staging' type: string - only_docker: - description: Build only docker + for_e2e_tests: + description: Build for e2e docker tests default: false type: boolean @@ -45,7 +45,16 @@ jobs: run: ./.github/build/build.sh # todo: matrix + - name: Build web archives for e2e tests + if: inputs.for_e2e_tests + run: | + unset npm_config_keytar_binary_host_mirror + unset npm_config_node_sqlite3_binary_host_mirror + # Docker sources + PLATFORM=linux ARCH=x64 LIBC=musl .github/build/build_modules.sh + - name: Build web archives + if: ${{ !inputs.for_e2e_tests }} run: | unset npm_config_keytar_binary_host_mirror unset npm_config_node_sqlite3_binary_host_mirror @@ -60,10 +69,8 @@ jobs: PLATFORM=darwin ARCH=arm64 .github/build/build_modules.sh # VSC Windows PLATFORM=win32 ARCH=x64 .github/build/build_modules.sh - - name: Build Docker (x64, arm64) - env: - ENV: ${{ vars.ENV }} - RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }} + + - name: Build Docker (x64) run: | # Build alpine x64 image docker buildx build \ @@ -75,6 +82,12 @@ jobs: -t redisinsight:amd64 \ . + mkdir -p release/docker + docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64 + + - name: Build Docker (arm64) + if: ${{ !inputs.for_e2e_tests }} + run: | # Build alpine arm64 image docker buildx build \ -f .github/build/build.Dockerfile \ @@ -86,7 +99,6 @@ jobs: . mkdir -p release/docker - docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64 docker image save -o release/docker/docker-linux-alpine.arm64.tar redisinsight:arm64 - uses: actions/upload-artifact@v4 @@ -100,6 +112,7 @@ jobs: ./release/web-mini env: + ENV: ${{ vars.ENV }} RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }} RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }} RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }} diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 4cf0cb04a9..32bcd856d0 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -50,14 +50,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup repository - run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight - - # - name: Setup Python - # uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 @@ -65,29 +57,21 @@ jobs: with: detached: true - # - name: Download Docker Artifacts - # uses: actions/download-artifact@v4 - # with: - # name: docker-builds - # path: ./release + - name: Download Docker Artifacts + uses: actions/download-artifact@v4 + with: + name: docker-builds + path: ./release - name: Load built docker image from workspace run: | - # docker image load -i ./release/docker/docker-linux-alpine.amd64.tar - - OUTPUT_FILE="docker-linux-alpine.amd64.tar" - FILE_URL="https://s3.us-east-1.amazonaws.com/redisinsight.test/public/pre-release/2.62.0/docker/${OUTPUT_FILE}" - - wget -O "$OUTPUT_FILE" "$FILE_URL" - - docker image load -i ./docker-linux-alpine.amd64.tar + docker image load -i ./release/docker/docker-linux-alpine.amd64.tar - 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=tests/web/critical-path/database/connecting-to-the-db.e2e.ts echo $testFiles # Multi-Line value @@ -131,23 +115,8 @@ jobs: list-suites: 'failed' fail-on-error: 'false' - - 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 - - # Deploy report to AWS test bucket - deploy-report: - name: Deploy report - needs: 'e2e-docker-tests' - if: always() - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - name: Deploy report + if: always() uses: ./.github/actions/deploy-test-reports with: group: 'report' @@ -157,3 +126,12 @@ jobs: 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.yml b/.github/workflows/tests.yml index 689177c9c3..80e2bb7f03 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -107,62 +107,59 @@ jobs: debug: ${{ inputs.debug || false }} # # E2E Approve - # e2e-approve: - # runs-on: ubuntu-latest - # needs: changes - # timeout-minutes: 60 - # if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/') - # # environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} - # environment: 'staging' - # name: Approve E2E tests - # steps: - # - uses: actions/checkout@v4 + e2e-approve: + runs-on: ubuntu-latest + needs: changes + if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/') + timeout-minutes: 60 + environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }} + name: Approve E2E tests + steps: + - uses: actions/checkout@v4 # E2E Docker - # build-docker: - # uses: ./.github/workflows/pipeline-build-docker.yml - # needs: e2e-approve - # secrets: inherit - # with: - # debug: ${{ inputs.debug || false }} - # only_docker: true + build-docker: + uses: ./.github/workflows/pipeline-build-docker.yml + needs: e2e-approve + secrets: inherit + with: + debug: ${{ inputs.debug || false }} + for_e2e_tests: true e2e-docker-tests: - # needs: build-docker + needs: build-docker uses: ./.github/workflows/tests-e2e-docker.yml secrets: inherit with: debug: ${{ inputs.debug || false }} # E2E AppImage - # build-appimage: - # uses: ./.github/workflows/pipeline-build-linux.yml - # needs: e2e-approve - # secrets: inherit - # with: - # target: linux:appimage:x64 - # debug: ${{ inputs.debug || false }} - - # e2e-appimage-tests: - # needs: build-appimage - # uses: ./.github/workflows/tests-e2e-appimage.yml - # secrets: inherit - # with: - # debug: ${{ inputs.debug || false }} - - # clean: - # uses: ./.github/workflows/clean-deployments.yml - # needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] - # if: ${{ !inputs.pre_release && always() }} + build-appimage: + uses: ./.github/workflows/pipeline-build-linux.yml + needs: e2e-approve + secrets: inherit + with: + target: build_linux_appimage_x64 + debug: ${{ inputs.debug || false }} + + e2e-appimage-tests: + needs: build-appimage + uses: ./.github/workflows/tests-e2e-appimage.yml + secrets: inherit + with: + debug: ${{ inputs.debug || false }} + + clean: + uses: ./.github/workflows/clean-deployments.yml + if: always() + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] # Remove artifacts from github actions - # remove-artifacts: - # name: Remove artifacts - # needs: [clean] - # if: ${{ !inputs.pre_release && always() }} - # runs-on: ubuntu-latest - - # steps: - # - uses: actions/checkout@v4 - # - name: Remove all artifacts - # uses: ./.github/actions/remove-artifacts + remove-artifacts: + name: Remove artifacts + needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Remove all artifacts + uses: ./.github/actions/remove-artifacts From d00d62a2001922bb35e879306a29ff938b2131b5 Mon Sep 17 00:00:00 2001 From: zalenskiSofteq Date: Sun, 24 Nov 2024 18:46:02 +0100 Subject: [PATCH 25/28] #RI-6325 - Fix e2e --- .github/workflows/tests-e2e-docker.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 32bcd856d0..21a514b39f 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -33,18 +33,10 @@ jobs: e2e-docker-tests: runs-on: ubuntu-latest name: E2E Docker tests - # environment: - # name: production - # container: - # image: docker:latest - # volumes: - # - /usr/src/app/results:/usr/src/app/results - # - /usr/src/app/report:/usr/src/app/report strategy: fail-fast: false matrix: # Number of threads to run tests - # parallel: [0] parallel: [0, 1, 2, 3] steps: From 59b2b86e8fe6584de6b33e23a32b354e0f9a778b Mon Sep 17 00:00:00 2001 From: Zalenski Egor Date: Sun, 24 Nov 2024 19:39:29 +0100 Subject: [PATCH 26/28] fix tests --- redisinsight/api/test/test-runs/test.Dockerfile | 1 + tests/e2e/e2e.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/redisinsight/api/test/test-runs/test.Dockerfile b/redisinsight/api/test/test-runs/test.Dockerfile index 0821d14c7c..ec5e45d825 100644 --- a/redisinsight/api/test/test-runs/test.Dockerfile +++ b/redisinsight/api/test/test-runs/test.Dockerfile @@ -6,6 +6,7 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id WORKDIR /usr/src/app COPY package.json yarn.lock ./ +COPY stubs ./stubs RUN yarn install COPY . . diff --git a/tests/e2e/e2e.Dockerfile b/tests/e2e/e2e.Dockerfile index 306c5a77f9..469bc5fb35 100644 --- a/tests/e2e/e2e.Dockerfile +++ b/tests/e2e/e2e.Dockerfile @@ -7,6 +7,7 @@ WORKDIR /usr/src/app RUN apk add --no-cache bash curl COPY package.json yarn.lock ./ +COPY stubs ./stubs RUN npx yarn From 31ad5c5f0bef1cfd3a09569ecfd8f0a333053b4c Mon Sep 17 00:00:00 2001 From: Zalenski Egor Date: Sun, 24 Nov 2024 20:22:09 +0100 Subject: [PATCH 27/28] fix tests --- redisinsight/api/test/test-runs/test.Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/redisinsight/api/test/test-runs/test.Dockerfile b/redisinsight/api/test/test-runs/test.Dockerfile index ec5e45d825..0821d14c7c 100644 --- a/redisinsight/api/test/test-runs/test.Dockerfile +++ b/redisinsight/api/test/test-runs/test.Dockerfile @@ -6,7 +6,6 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id WORKDIR /usr/src/app COPY package.json yarn.lock ./ -COPY stubs ./stubs RUN yarn install COPY . . From b714b19034d6ce9b6ea8e4dc11023a95c7ec7205 Mon Sep 17 00:00:00 2001 From: Zalenski Egor Date: Sun, 24 Nov 2024 22:04:14 +0100 Subject: [PATCH 28/28] fix tests --- redisinsight/api/test/test-runs/test.Dockerfile | 1 + tests/e2e/e2e.Dockerfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/test/test-runs/test.Dockerfile b/redisinsight/api/test/test-runs/test.Dockerfile index 0821d14c7c..ec5e45d825 100644 --- a/redisinsight/api/test/test-runs/test.Dockerfile +++ b/redisinsight/api/test/test-runs/test.Dockerfile @@ -6,6 +6,7 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id WORKDIR /usr/src/app COPY package.json yarn.lock ./ +COPY stubs ./stubs RUN yarn install COPY . . diff --git a/tests/e2e/e2e.Dockerfile b/tests/e2e/e2e.Dockerfile index 469bc5fb35..306c5a77f9 100644 --- a/tests/e2e/e2e.Dockerfile +++ b/tests/e2e/e2e.Dockerfile @@ -7,7 +7,6 @@ WORKDIR /usr/src/app RUN apk add --no-cache bash curl COPY package.json yarn.lock ./ -COPY stubs ./stubs RUN npx yarn