From 006583bb0b0c63b4f164dd045b6f3918ed651797 Mon Sep 17 00:00:00 2001 From: Petya Slavova Date: Tue, 11 Feb 2025 10:15:00 +0200 Subject: [PATCH] Replacing the redis image with redis-libs-tests image in test infrastructure --- .github/actions/run-tests/action.yml | 5 --- .github/workflows/integration.yaml | 4 +-- .gitignore | 2 ++ docker-compose.yml | 51 ++++++++++------------------ setup.py | 2 +- 5 files changed, 22 insertions(+), 42 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 1f9332fb86..282647bdcd 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -31,14 +31,9 @@ runs: - name: Setup Test environment env: REDIS_VERSION: ${{ inputs.redis-version }} - REDIS_IMAGE: "redis:${{ inputs.redis-version }}" CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ inputs.redis-version }}" run: | set -e - - if [ "${{inputs.redis-version}}" == "8.0-M04-pre" ]; then - export REDIS_IMAGE=redis:8.0-M03 - fi echo "::group::Installing dependencies" pip install -U setuptools wheel diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index c4548c21ef..6056119aab 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -27,7 +27,7 @@ env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665 COVERAGE_CORE: sysmon - REDIS_IMAGE: redis:latest + # REDIS_IMAGE: redis:latest REDIS_STACK_IMAGE: redis/redis-stack-server:latest CURRENT_REDIS_VERSION: '7.4.2' @@ -181,7 +181,7 @@ jobs: - name: Run installed unit tests env: REDIS_VERSION: ${{ env.CURRENT_REDIS_VERSION }} - REDIS_IMAGE: "redis:${{ env.CURRENT_REDIS_VERSION }}" + # REDIS_IMAGE: "redis:${{ env.CURRENT_REDIS_VERSION }}" CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ env.CURRENT_REDIS_VERSION }}" run: | bash .github/workflows/install_and_test.sh ${{ matrix.extension }} diff --git a/.gitignore b/.gitignore index ee1bda0fa5..04814346c0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ docker/stunnel/keys /dockers/*/tls/* /dockers/standalone/ /dockers/cluster/ +/dockers/replica/ +/dockers/sentinel/ diff --git a/docker-compose.yml b/docker-compose.yml index 60657d5653..a96d5fc991 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,13 +24,19 @@ services: - all replica: - image: ${REDIS_IMAGE:-redis:7.4.1} + image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:7.4.1} container_name: redis-replica depends_on: - redis - command: redis-server --replicaof redis 6379 --protected-mode no --save "" + environment: + - TLS_ENABLED=no + - REDIS_CLUSTER=no + - PORT=6380 + command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --replicaof redis 6379 --protected-mode no --save ""} ports: - - 6380:6379 + - 6380:6380 + volumes: + - "./dockers/replica:/redis/work" profiles: - replica - all-stack @@ -58,45 +64,22 @@ services: - all sentinel: - image: ${REDIS_IMAGE:-redis:7.4.1} + image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:7.4.1} container_name: redis-sentinel depends_on: - redis - entrypoint: "redis-sentinel /redis.conf --port 26379" + environment: + - REDIS_CLUSTER=no + - NODES=3 + - PORT=26379 + command: ${REDIS_EXTRA_ARGS:---sentinel} ports: - 26379:26379 - volumes: - - "./dockers/sentinel.conf:/redis.conf" - profiles: - - sentinel - - all-stack - - all - - sentinel2: - image: ${REDIS_IMAGE:-redis:7.4.1} - container_name: redis-sentinel2 - depends_on: - - redis - entrypoint: "redis-sentinel /redis.conf --port 26380" - ports: - 26380:26380 - volumes: - - "./dockers/sentinel.conf:/redis.conf" - profiles: - - sentinel - - all-stack - - all - - sentinel3: - image: ${REDIS_IMAGE:-redis:7.4.1} - container_name: redis-sentinel3 - depends_on: - - redis - entrypoint: "redis-sentinel /redis.conf --port 26381" - ports: - 26381:26381 volumes: - - "./dockers/sentinel.conf:/redis.conf" + - "./dockers/sentinel.conf:/redis/config-default/redis.conf" + - "./dockers/sentinel:/redis/work" profiles: - sentinel - all-stack diff --git a/setup.py b/setup.py index 02853251b2..6c2dbb6cd2 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ long_description_content_type="text/markdown", keywords=["Redis", "key-value store", "database"], license="MIT", - version="5.1.1", + version="5.3.0", packages=find_packages( include=[ "redis",