From 56bb590792c55ec6463677c7a300cffe4ae08cb4 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 17 Apr 2024 14:42:58 +0200 Subject: [PATCH 1/8] Migrate to ghcr Issue: UTAPI-99 (cherry picked from commit 9e1f14ed174f5659335ca00756fabd375d9612e2) --- .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 636197de..f8349df9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,9 +37,33 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: softprops/action-gh-release@v1 + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildk + uses: docker/setup-buildx-action@v1 + + - name: Login to Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + + - name: Build and push utapi image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}" + + - name: Create Release + uses: softprops/action-gh-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} with: name: Release ${{ github.event.inputs.tag }} tag_name: ${{ github.event.inputs.tag }} From 93d77fc514feb3a3f73d44d3ba30e60ff71a5a10 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 17 Apr 2024 15:02:44 +0200 Subject: [PATCH 2/8] Bump github actions - checkout@v4 - setup-qemu@v3 - setup-buildx@v3 - setup-node@v4 - setup-python@v5 - login@v3 - build-push@v5 - gh-release@v2 Issue: UTAPI-99 (cherry picked from commit 5976018d0e75ce4bc9b5b420421a0973774d7f56) --- .github/workflows/release.yaml | 12 +-- .github/workflows/tests.yaml | 134 ++------------------------------- 2 files changed, 11 insertions(+), 135 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f8349df9..7cb9279f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,30 +38,30 @@ jobs: needs: build steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildk - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ github.token }} - name: Build and push utapi image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: true tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}" - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ece6e452..c0df3cbd 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -204,139 +204,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 - with: - lfs: true - - uses: actions/setup-node@v2 - with: - node-version: '16.13.2' - cache: yarn - - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip - - name: Install python deps - run: | - pip install requests - pip install redis - - name: install dependencies - run: yarn install --frozen-lockfile --network-concurrency 1 - - name: Wait for warp10 for 60 seconds - run: sleep 60 - - name: run v2 functional tests - run: bash ./.github/scripts/run_ft_tests.bash true ft_test:v2 - env: - UTAPI_CACHE_BACKEND: redis - UTAPI_SERVICE_USER_ENABLED: 'true' - UTAPI_LOG_LEVEL: trace - SETUP_CMD: "run start_v2:server" - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - if: failure() - - tests-v2-without-sensision: - needs: - - build-ci - runs-on: ubuntu-latest - env: - REINDEX_PYTHON_INTERPRETER: python3 - name: ${{ matrix.test.name }} - strategy: - fail-fast: false - matrix: - test: - - name: run v2 soft limit test - command: bash ./.github/scripts/run_ft_tests.bash true ft_test:softLimit - env: - UTAPI_CACHE_BACKEND: redis - UTAPI_LOG_LEVEL: trace - SETUP_CMD: "run start_v2:server" - - name: run v2 hard limit test - command: bash ./.github/scripts/run_ft_tests.bash true ft_test:hardLimit - env: - UTAPI_CACHE_BACKEND: redis - UTAPI_LOG_LEVEL: trace - SETUP_CMD: "run start_v2:server" - services: - redis: - image: ghcr.io/${{ github.repository }}/redis-ci:${{ github.sha }} - ports: - - 6379:6379 - - 9121:9121 - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - redis-replica: - image: ghcr.io/${{ github.repository }}/redis-replica-ci:${{ github.sha }} - ports: - - 6380:6380 - options: >- - --health-cmd "redis-cli -p 6380 ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - redis-sentinel: - image: bitnami/redis-sentinel:6.2 - env: - REDIS_MASTER_SET: scality-s3 - REDIS_SENTINEL_PORT_NUMBER: '16379' - REDIS_SENTINEL_QUORUM: '1' - ports: - - 16379:16379 - options: >- - --health-cmd "redis-cli -p 16379 ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - warp10: - image: ghcr.io/${{ github.repository }}/warp10-ci:${{ github.sha }} - env: - standalone.port: '4802' - warpscript.maxops: '10000000' - ports: - - 4802:4802 - - 8082:8082 - - 9718:9718 - options: >- - --health-cmd "curl localhost:4802/api/v0/check" - --health-interval 10s - --health-timeout 5s - --health-retries 10 - --health-start-period 60s - vault: - image: ghcr.io/${{ github.repository }}/vault-ci:${{ github.sha }} - ports: - - 8500:8500 - - 8600:8600 - - 8700:8700 - - 8800:8800 - options: >- - --health-cmd "curl http://localhost:8500/_/healthcheck" - --health-interval 10s - --health-timeout 5s - --health-retries 10 - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - lfs: true - - uses: actions/setup-node@v2 + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '16.13.2' - cache: yarn - - uses: actions/setup-python@v2 + cache: 'yarn' + - uses: actions/setup-python@v5 with: python-version: '3.9' - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip + cache: pip - name: Install python deps run: | pip install requests From 385e6eb17cc904eb33ca012a81945d2bfc312aa2 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Thu, 18 Apr 2024 15:05:22 +0200 Subject: [PATCH 3/8] Fix caching of python packages Issue: UTAPI-99 (cherry picked from commit 20916c6f0ee5cd69c14f265a294c6126abdc1324) --- .github/workflows/tests.yaml | 4 +--- requirements.txt | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c0df3cbd..6f027527 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -214,9 +214,7 @@ jobs: python-version: '3.9' cache: pip - name: Install python deps - run: | - pip install requests - pip install redis + run: pip install -r requirements.txt - name: install dependencies run: yarn install --frozen-lockfile --network-concurrency 1 - name: Wait for warp10 a little bit diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..d3bf589d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +redis==5.0.3 +requests==2.31.0 \ No newline at end of file From 6c6ef675b233f652f7d34c4ebd35203dd45dcc3a Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Thu, 18 Apr 2024 15:52:47 +0200 Subject: [PATCH 4/8] Merge branch 'improvement/UTAPI-99' into w/7.10/improvement/VAULT-567 (cherry picked from commit bdb483e6b4408a5b9e288f8e7596e9b94d49d467) --- .github/workflows/release.yaml | 31 +++---------------------------- .github/workflows/tests.yaml | 15 +++++---------- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7cb9279f..fb917dd5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,9 +25,8 @@ jobs: uses: scality/workflows/.github/workflows/docker-build.yaml@v1 secrets: inherit with: - registry: registry.scality.com - namespace: utapi - name: utapi + namespace: ${{ github.repository_owner }} + name: ${{ github.event.repository.name }} context: . file: ${{ github.event.inputs.dockerfile}} tag: ${{ github.event.inputs.tag }} @@ -37,31 +36,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildk - uses: docker/setup-buildx-action@v3 - - - name: Login to Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ github.token }} - - - name: Build and push utapi image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}" - - - name: Create Release - uses: softprops/action-gh-release@v2 + - uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6f027527..664a962f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -110,24 +110,19 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: lfs: true - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: node-version: '16.13.2' cache: yarn - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: '3.9' - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip + cache: pip - name: Install python deps - run: | - pip install requests - pip install redis + run: pip install -r requirements.txt - name: install dependencies run: yarn install --frozen-lockfile --network-concurrency 1 - name: ${{ matrix.test.name }} From 239f653b97a7feaab8a12fa5e7e4524ae2811c3d Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 17 Apr 2024 14:55:45 +0200 Subject: [PATCH 5/8] Migrate to ghcr Issue: UTAPI-99 (cherry picked from commit c4e786d6cd5eace2f49d736dbf2afbc9e087f7fe) --- .github/docker/vault/Dockerfile | 3 +-- .github/workflows/build-ci.yaml | 20 ++++---------------- .github/workflows/build-dev.yaml | 9 +++++---- .github/workflows/release-warp10.yaml | 4 +--- .github/workflows/tests.yaml | 3 --- images/nodesvc-base/Dockerfile | 2 +- images/warp10/Dockerfile | 2 +- 7 files changed, 13 insertions(+), 30 deletions(-) diff --git a/.github/docker/vault/Dockerfile b/.github/docker/vault/Dockerfile index 3e2478c9..976af0ce 100644 --- a/.github/docker/vault/Dockerfile +++ b/.github/docker/vault/Dockerfile @@ -1,8 +1,7 @@ -FROM registry.scality.com/vault-dev/vault:c2607856 +FROM ghcr.io/scality/vault:c2607856 ENV VAULT_DB_BACKEND LEVELDB RUN chmod 400 tests/utils/keyfile ENTRYPOINT yarn start - diff --git a/.github/workflows/build-ci.yaml b/.github/workflows/build-ci.yaml index 3310cec5..a687e006 100644 --- a/.github/workflows/build-ci.yaml +++ b/.github/workflows/build-ci.yaml @@ -2,18 +2,13 @@ name: build-ci-images on: workflow_call: - secrets: - REGISTRY_LOGIN: - required: true - REGISTRY_PASSWORD: - required: true jobs: warp10-ci: uses: scality/workflows/.github/workflows/docker-build.yaml@v1 secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} - REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + REGISTRY_PASSWORD: ${{ github.token }} with: name: warp10-ci context: . @@ -24,7 +19,7 @@ jobs: uses: scality/workflows/.github/workflows/docker-build.yaml@v1 secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} - REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + REGISTRY_PASSWORD: ${{ github.token }} with: name: redis-ci context: . @@ -36,7 +31,7 @@ jobs: - redis-ci secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} - REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + REGISTRY_PASSWORD: ${{ github.token }} with: name: redis-replica-ci context: .github/docker/redis-replica @@ -58,14 +53,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Login to Scality Registry - uses: docker/login-action@v1.10.0 - with: - registry: registry.scality.com - username: ${{ secrets.REGISTRY_LOGIN }} - password: ${{ secrets.REGISTRY_PASSWORD }} + password: ${{ github.token }} - name: Build and push vault Image uses: docker/build-push-action@v2.7.0 diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index c6e83638..97ead80f 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -8,8 +8,9 @@ on: jobs: build-dev: uses: scality/workflows/.github/workflows/docker-build.yaml@v1 - secrets: inherit + secrets: + REGISTRY_LOGIN: ${{ github.repository_owner }} + REGISTRY_PASSWORD: ${{ github.token }} with: - registry: registry.scality.com - namespace: utapi-dev - name: utapi + namespace: ${{ github.repository_owner }} + name: ${{ github.event.repository.name }} diff --git a/.github/workflows/release-warp10.yaml b/.github/workflows/release-warp10.yaml index 3da6baab..644fd668 100644 --- a/.github/workflows/release-warp10.yaml +++ b/.github/workflows/release-warp10.yaml @@ -18,8 +18,6 @@ jobs: uses: scality/workflows/.github/workflows/docker-build.yaml@v1 secrets: inherit with: - registry: registry.scality.com - namespace: utapi name: warp10 context: . file: images/warp10/Dockerfile @@ -35,7 +33,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Release registry.scality.com/utapi/warp10:${{ github.event.inputs.tag }}-warp10 + name: Release utapi/warp10:${{ github.event.inputs.tag }}-warp10 tag_name: ${{ github.event.inputs.tag }}-warp10 generate_release_notes: false target_commitish: ${{ github.sha }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 664a962f..cab6e4de 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -9,9 +9,6 @@ on: jobs: build-ci: uses: ./.github/workflows/build-ci.yaml - secrets: - REGISTRY_LOGIN: ${{ secrets.REGISTRY_LOGIN }} - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} lint: runs-on: ubuntu-latest diff --git a/images/nodesvc-base/Dockerfile b/images/nodesvc-base/Dockerfile index 8ac6ed0d..2f0fb3b6 100644 --- a/images/nodesvc-base/Dockerfile +++ b/images/nodesvc-base/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.scality.com/federation/nodesvc-base:7.10.5.0 +FROM ghcr.io/scality/federation/nodesvc-base:7.10.5.0 ENV UTAPI_CONFIG_FILE=${CONF_DIR}/config.json diff --git a/images/warp10/Dockerfile b/images/warp10/Dockerfile index d12feee0..c068914f 100644 --- a/images/warp10/Dockerfile +++ b/images/warp10/Dockerfile @@ -13,7 +13,7 @@ RUN apk add zip unzip build-base \ && cd .. \ && go build -a -o /usr/local/go/warp10_sensision_exporter -FROM registry.scality.com/utapi/warp10:2.8.1-95-g73e7de80 +FROM ghcr.io/scality/utapi/warp10:2.8.1-95-g73e7de80 # Override baked in version # Remove when updating to a numbered release From de18dbd3deef44eabaa628b3e2607833388fb0d3 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 17 Apr 2024 15:35:09 +0200 Subject: [PATCH 6/8] Bump github actions - docker-build@v2 - checkout@v4 - setup-buildx@v3 - setup-node@v4 - setup-python@v5 - login@v3 - build-push@v5 - gh-release@v2 - ssh-to-runner@1.7.0 Issue: UTAPI-99 (cherry picked from commit 4449f44c9af1807e6c881d41eddcf8c77c470f3f) --- .github/workflows/build-ci.yaml | 14 +-- .github/workflows/build-dev.yaml | 2 +- .github/workflows/release-warp10.yaml | 4 +- .github/workflows/release.yaml | 2 +- .github/workflows/tests.yaml | 144 ++++++++++++++++++++++++-- 5 files changed, 149 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-ci.yaml b/.github/workflows/build-ci.yaml index a687e006..3b413590 100644 --- a/.github/workflows/build-ci.yaml +++ b/.github/workflows/build-ci.yaml @@ -5,7 +5,7 @@ on: jobs: warp10-ci: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_PASSWORD: ${{ github.token }} @@ -16,7 +16,7 @@ jobs: lfs: true redis-ci: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_PASSWORD: ${{ github.token }} @@ -26,7 +26,7 @@ jobs: file: images/redis/Dockerfile redis-replica-ci: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 needs: - redis-ci secrets: @@ -42,21 +42,21 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4 with: lfs: true - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Registry - uses: docker/login-action@v1.10.0 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ github.token }} - name: Build and push vault Image - uses: docker/build-push-action@v2.7.0 + uses: docker/build-push-action@v5 with: push: true context: .github/docker/vault diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index 97ead80f..a87555c2 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -7,7 +7,7 @@ on: jobs: build-dev: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 secrets: REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_PASSWORD: ${{ github.token }} diff --git a/.github/workflows/release-warp10.yaml b/.github/workflows/release-warp10.yaml index 644fd668..6b3ac648 100644 --- a/.github/workflows/release-warp10.yaml +++ b/.github/workflows/release-warp10.yaml @@ -15,7 +15,7 @@ on: jobs: build: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 secrets: inherit with: name: warp10 @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: softprops/action-gh-release@v1 + - uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fb917dd5..4ae5a668 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: scality/workflows/.github/workflows/docker-build.yaml@v1 + uses: scality/workflows/.github/workflows/docker-build.yaml@v2 secrets: inherit with: namespace: ${{ github.repository_owner }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cab6e4de..124a6dfc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: lfs: true - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: node-version: '16.13.2' cache: yarn @@ -197,10 +197,135 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + lfs: true - uses: actions/setup-node@v4 with: node-version: '16.13.2' - cache: 'yarn' + cache: yarn + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + cache: pip + - name: Install python deps + run: | + pip install requests + pip install redis + - name: install dependencies + run: yarn install --frozen-lockfile --network-concurrency 1 + - name: Wait for warp10 for 60 seconds + run: sleep 60 + - name: run v2 functional tests + run: bash ./.github/scripts/run_ft_tests.bash true ft_test:v2 + env: + UTAPI_CACHE_BACKEND: redis + UTAPI_SERVICE_USER_ENABLED: 'true' + UTAPI_LOG_LEVEL: trace + SETUP_CMD: "run start_v2:server" + - name: 'Debug: SSH to runner' + uses: scality/actions/action-ssh-to-runner@1.7.0 + timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }} + continue-on-error: true + with: + tmate-server-host: ${{ secrets.TMATE_SERVER_HOST }} + tmate-server-port: ${{ secrets.TMATE_SERVER_PORT }} + tmate-server-rsa-fingerprint: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }} + tmate-server-ed25519-fingerprint: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }} + if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }} + + tests-v2-without-sensision: + needs: + - build-ci + runs-on: ubuntu-latest + env: + REINDEX_PYTHON_INTERPRETER: python3 + name: ${{ matrix.test.name }} + strategy: + fail-fast: false + matrix: + test: + - name: run v2 soft limit test + command: bash ./.github/scripts/run_ft_tests.bash true ft_test:softLimit + env: + UTAPI_CACHE_BACKEND: redis + UTAPI_LOG_LEVEL: trace + SETUP_CMD: "run start_v2:server" + - name: run v2 hard limit test + command: bash ./.github/scripts/run_ft_tests.bash true ft_test:hardLimit + env: + UTAPI_CACHE_BACKEND: redis + UTAPI_LOG_LEVEL: trace + SETUP_CMD: "run start_v2:server" + services: + redis: + image: ghcr.io/${{ github.repository }}/redis-ci:${{ github.sha }} + ports: + - 6379:6379 + - 9121:9121 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + redis-replica: + image: ghcr.io/${{ github.repository }}/redis-replica-ci:${{ github.sha }} + ports: + - 6380:6380 + options: >- + --health-cmd "redis-cli -p 6380 ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + redis-sentinel: + image: bitnami/redis-sentinel:7.2.4 + env: + REDIS_MASTER_SET: scality-s3 + REDIS_SENTINEL_PORT_NUMBER: '16379' + REDIS_SENTINEL_QUORUM: '1' + ports: + - 16379:16379 + options: >- + --health-cmd "redis-cli -p 16379 ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + warp10: + image: ghcr.io/${{ github.repository }}/warp10-ci:${{ github.sha }} + env: + standalone.port: '4802' + warpscript.maxops: '10000000' + ports: + - 4802:4802 + - 8082:8082 + - 9718:9718 + options: >- + --health-cmd "curl localhost:4802/api/v0/check" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + --health-start-period 60s + vault: + image: ghcr.io/${{ github.repository }}/vault-ci:${{ github.sha }} + ports: + - 8500:8500 + - 8600:8600 + - 8700:8700 + - 8800:8800 + options: >- + --health-cmd "curl http://localhost:8500/_/healthcheck" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + - uses: actions/setup-node@v4 + with: + node-version: '16.13.2' + cache: yarn - uses: actions/setup-python@v5 with: python-version: '3.9' @@ -214,6 +339,13 @@ jobs: - name: ${{ matrix.test.name }} run: ${{ matrix.test.command }} env: ${{ matrix.test.env }} - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - if: failure() + - name: 'Debug: SSH to runner' + uses: scality/actions/action-ssh-to-runner@1.7.0 + timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }} + continue-on-error: true + with: + tmate-server-host: ${{ secrets.TMATE_SERVER_HOST }} + tmate-server-port: ${{ secrets.TMATE_SERVER_PORT }} + tmate-server-rsa-fingerprint: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }} + tmate-server-ed25519-fingerprint: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }} + if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }} From a62d3e77a6b7e25f7fa9f89f186fa5928e6ca385 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Thu, 18 Apr 2024 15:05:22 +0200 Subject: [PATCH 7/8] Fix caching of python packages Issue: UTAPI-99 (cherry picked from commit 6e0ec16f00f274d7e134a341cf298e9524559908) --- .github/workflows/tests.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 124a6dfc..99e09e3b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -208,9 +208,7 @@ jobs: python-version: '3.9' cache: pip - name: Install python deps - run: | - pip install requests - pip install redis + run: pip install -r requirements.txt - name: install dependencies run: yarn install --frozen-lockfile --network-concurrency 1 - name: Wait for warp10 for 60 seconds From 686ca6360563ce4c2d2bf49c442881ebed807cf3 Mon Sep 17 00:00:00 2001 From: Mickael Bourgois Date: Tue, 28 May 2024 10:38:51 +0200 Subject: [PATCH 8/8] Revert "UTAPI-98 Bump Redis version" This reverts commit 8804e9ff69a70d6798a1062ff4f5cb98c9507efb. This change was included in merging #1300 on dev/7.10 We don't want it on hotfix branch If we want it we need to cherry-pick the whole commit --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 99e09e3b..475475c0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -275,7 +275,7 @@ jobs: --health-timeout 5s --health-retries 5 redis-sentinel: - image: bitnami/redis-sentinel:7.2.4 + image: bitnami/redis-sentinel:6.2 env: REDIS_MASTER_SET: scality-s3 REDIS_SENTINEL_PORT_NUMBER: '16379'