MGET support for Redis protocol with OSS Cluster slot-aware routing #1100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # CI testing includes: | |
| # - Debian versions: 11 (bullseye), 12 (bookworm), 13 (trixie), sid (unstable) | |
| # - Various smoke test images (configurable via repository variables) | |
| # - TLS and no-TLS builds | |
| # - Code coverage and static analysis | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| smoketest-build-distros: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| env: | |
| ARCH: amd64 | |
| # required by ubuntu:bionic | |
| # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ | |
| ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
| DEBIAN_FRONTEND: noninteractive | |
| strategy: | |
| matrix: | |
| image: ${{ fromJSON(vars.SMOKE_TEST_IMAGES) }} | |
| container: ${{ matrix.image }} | |
| name: Build ${{ matrix.image }} | |
| steps: | |
| - name: Checkout Code for ubuntu:bionic | |
| if: matrix.image == 'ubuntu:bionic' | |
| uses: actions/checkout@v6 | |
| - name: Checkout Code for other versions | |
| if: matrix.image != 'ubuntu:bionic' | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| apt-get -qq update -y | |
| apt-get install -y \ | |
| build-essential autoconf automake libevent-dev \ | |
| pkg-config zlib1g-dev libssl-dev libboost-all-dev cmake flex | |
| - name: Build | |
| run: autoreconf -ivf && ./configure && make -j | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| ldd ./memtier_benchmark | grep libevent | |
| ldd ./memtier_benchmark | grep ssl | |
| test-debian-versions: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| strategy: | |
| matrix: | |
| debian_version: | |
| - "debian:bullseye" # Debian 11 (oldstable) | |
| - "debian:bookworm" # Debian 12 (stable) | |
| - "debian:trixie" # Debian 13 (testing) | |
| - "debian:sid" # Debian unstable | |
| container: ${{ matrix.debian_version }} | |
| name: Test ${{ matrix.debian_version }} | |
| steps: | |
| - name: Install git and basic tools | |
| run: | | |
| apt-get update -qq | |
| apt-get install -y git ca-certificates | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update -qq | |
| apt-get install -y \ | |
| build-essential \ | |
| autoconf \ | |
| automake \ | |
| pkg-config \ | |
| libevent-dev \ | |
| zlib1g-dev \ | |
| libssl-dev | |
| - name: Build | |
| run: autoreconf -ivf && ./configure && make -j | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| ldd ./memtier_benchmark | grep libevent | |
| ldd ./memtier_benchmark | grep ssl | |
| build-notls: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install lcov autoconf automake pkg-config libevent-dev | |
| - name: Build without TLS | |
| run: autoreconf -ivf && ./configure --disable-tls && make -j | |
| - name: Verify version, libevent | |
| run: | | |
| ./memtier_benchmark --version | |
| ldd ./memtier_benchmark | grep libevent | |
| build-ubuntu-latest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install lcov autoconf automake pkg-config libevent-dev | |
| - name: Build without TLS | |
| run: autoreconf -ivf && ./configure --disable-tls && make -j | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| ldd ./memtier_benchmark | grep libevent | |
| build-ubuntu: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-22.04] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install lcov autoconf automake pkg-config libevent-dev libssl-dev | |
| - name: Build | |
| # for coverage reports we need to use Ubuntu 22.04 or lower | |
| # (given Ubuntu 24.04 uses lcov >= 2.0 which is not support on autoconf still) | |
| run: autoreconf -ivf && ./configure --enable-code-coverage && make -j | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: memtier-build-${{ matrix.platform }} | |
| path: | | |
| memtier_benchmark | |
| .libs/ | |
| retention-days: 1 | |
| test-ubuntu: | |
| needs: build-ubuntu | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-22.04] | |
| test-config: | |
| - name: "Single Endpoint: TCP Plaintext" | |
| env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "0", VERBOSE: "1" } | |
| tls: false | |
| - name: "Single Endpoint: TCP TLS" | |
| env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1" } | |
| tls: true | |
| - name: "OSS TCP TLS v1.2" | |
| env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.2", VERBOSE: "1" } | |
| tls: true | |
| - name: "OSS TCP TLS v1.3" | |
| env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1" } | |
| tls: true | |
| - name: "OSS-CLUSTER API: TCP Plaintext" | |
| env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", VERBOSE: "1" } | |
| tls: false | |
| - name: "OSS-CLUSTER API: TCP TLS" | |
| env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1" } | |
| tls: true | |
| - name: "OSS-CLUSTER API 49 shards: TCP TLS" | |
| env: { RLTEST_DEBUG: "1", LOG_LEVEL: "notice", OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", SHARDS: "49", TEST: "tests_oss_simple_flow:test_rate_limited_completion_no_hang" } | |
| tls: true | |
| - name: "OSS-CLUSTER API 99 shards: TCP TLS" | |
| env: { RLTEST_DEBUG: "1", LOG_LEVEL: "notice", OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", SHARDS: "99", TEST: "tests_oss_simple_flow:test_rate_limited_completion_no_hang" } | |
| tls: true | |
| runs-on: ${{ matrix.platform }} | |
| name: Test ${{ matrix.test-config.name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: memtier-build-${{ matrix.platform }} | |
| - name: Restore executable permissions | |
| run: chmod +x memtier_benchmark | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install lcov autoconf automake pkg-config libevent-dev libssl-dev | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| architecture: x64 | |
| - name: Install Python dependencies | |
| run: pip install -r ./tests/test_requirements.txt | |
| - name: Install Redis | |
| run: | | |
| curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list | |
| sudo apt-get -qq update | |
| sudo apt-get install redis | |
| sudo service redis-server stop | |
| - name: Increase connection limit | |
| run: | | |
| sudo sysctl -w net.ipv4.tcp_fin_timeout=10 | |
| sudo sysctl -w net.ipv4.tcp_tw_reuse=1 | |
| ulimit -n 40960 | |
| - name: Generate TLS test certificates | |
| if: matrix.test-config.tls | |
| run: | | |
| ./tests/gen-test-certs.sh | |
| - name: Run tests | |
| timeout-minutes: 15 | |
| env: ${{ matrix.test-config.env }} | |
| run: | | |
| ./tests/run_tests.sh | |
| test-statsd: | |
| needs: build-ubuntu | |
| runs-on: ubuntu-22.04 | |
| name: "StatsD: docker-compose Integration" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: memtier-build-ubuntu-22.04 | |
| - name: Restore executable permissions | |
| run: chmod +x memtier_benchmark | |
| - name: Start monitoring stack | |
| run: docker compose -f docker-compose.statsd.yml up -d | |
| - name: Install runtime dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install -y libevent-dev libssl-dev | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| architecture: x64 | |
| - name: Install Python dependencies | |
| run: pip install -r ./tests/test_requirements.txt | |
| - name: Install Redis | |
| run: | | |
| curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list | |
| sudo apt-get -qq update | |
| sudo apt-get install redis | |
| sudo service redis-server stop | |
| - name: Wait for Graphite to be ready | |
| run: | | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:8080/render > /dev/null; then | |
| echo "Graphite ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for Graphite ($i/30)..." && sleep 2 | |
| done | |
| echo "Graphite not ready after 60s" && exit 1 | |
| - name: Run StatsD tests | |
| timeout-minutes: 5 | |
| env: | |
| OSS_STANDALONE: "1" | |
| STATSD_HOST: "localhost" | |
| VERBOSE: "1" | |
| TEST: "test_statsd" | |
| run: | | |
| ./tests/run_tests.sh | |
| - name: Teardown monitoring stack | |
| if: always() | |
| run: docker compose -f docker-compose.statsd.yml down -v | |
| coverage-ubuntu: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get install lcov autoconf automake pkg-config libevent-dev libssl-dev | |
| - name: Build with coverage | |
| # for coverage reports we need to use Ubuntu 22.04 or lower | |
| # (given Ubuntu 24.04 uses lcov >= 2.0 which is not supported on autoconf still) | |
| run: autoreconf -ivf && ./configure --enable-code-coverage && make -j | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| architecture: x64 | |
| - name: Install Python dependencies | |
| run: pip install -r ./tests/test_requirements.txt | |
| - name: Install Redis | |
| run: | | |
| curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list | |
| sudo apt-get -qq update | |
| sudo apt-get install redis | |
| sudo service redis-server stop | |
| - name: Increase connection limit | |
| run: | | |
| sudo sysctl -w net.ipv4.tcp_fin_timeout=10 | |
| sudo sysctl -w net.ipv4.tcp_tw_reuse=1 | |
| ulimit -n 40960 | |
| - name: Run tests for coverage | |
| timeout-minutes: 15 | |
| env: | |
| OSS_STANDALONE: "1" | |
| OSS_CLUSTER: "0" | |
| TLS: "0" | |
| VERBOSE: "1" | |
| run: | | |
| ./tests/run_tests.sh | |
| - name: Capture code coverage | |
| timeout-minutes: 6 | |
| run: | | |
| make code-coverage-capture | |
| bash <(curl -s https://codecov.io/bash) -f memtier_benchmark-*-coverage.info || echo "Codecov did not collect coverage reports" | |
| build-alpine: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| alpine_version: | |
| - "alpine:3.17" | |
| - "alpine:3.18" | |
| - "alpine:3.19" | |
| - "alpine:3.20" | |
| - "alpine:3.21" | |
| - "alpine:latest" | |
| container: ${{ matrix.alpine_version }} | |
| name: Build ${{ matrix.alpine_version }} | |
| steps: | |
| - name: Install git | |
| run: apk add --no-cache git | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install build dependencies | |
| run: | | |
| apk add --no-cache \ | |
| make g++ autoconf automake libtool pkgconfig \ | |
| libevent-dev zlib-dev openssl-dev | |
| - name: Build | |
| run: autoreconf -ivf && ./configure && make -j | |
| - name: Verify version | |
| run: ./memtier_benchmark --version | |
| build-macos: | |
| strategy: | |
| matrix: | |
| openssl: ["3.0"] | |
| runs-on: macos-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: brew install autoconf automake libtool libevent openssl@${{ matrix.openssl }} | |
| - name: Build | |
| run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@${{ matrix.openssl }}`/lib/pkgconfig ./configure && make | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| otool -L ./memtier_benchmark | grep libevent | |
| otool -L ./memtier_benchmark | grep ssl | |
| # macos-13 has been retired as of December 2025, so use macos-14 | |
| # macos-14 details: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md | |
| build-macos-openssl-1-1: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: brew install autoconf automake libtool libevent openssl@1.1 | |
| - name: Build | |
| run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@1.1`/lib/pkgconfig ./configure && make | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| otool -L ./memtier_benchmark | grep libevent | |
| otool -L ./memtier_benchmark | grep ssl | |
| build-macos-openssl-1-0-2: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: brew install autoconf automake libtool libevent pkg-config | |
| - name: Install openssl v1.0.2 | |
| run: brew install rbenv/tap/openssl@1.0 | |
| - name: Build | |
| run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@1.0`/lib/pkgconfig ./configure && make | |
| - name: Verify version, libevent, openssl | |
| run: | | |
| ./memtier_benchmark --version | |
| otool -L ./memtier_benchmark | grep libevent | |
| otool -L ./memtier_benchmark | grep ssl |