Add Redis 8.x/Valkey CI test matrix and optional Valkey loadtests (#47180)

This commit is contained in:
Tim Lee
2026-06-12 07:26:22 -06:00
committed by GitHub
parent d80e2e95f9
commit 60cd943643
8 changed files with 128 additions and 18 deletions
+21
View File
@@ -47,6 +47,24 @@ on:
type: string
default: 3
required: true
fleet_redis_engine:
description: "Elasticache engine to deploy"
type: choice
options:
- redis
- valkey
default: redis
required: false
fleet_redis_engine_version:
description: "Elasticache engine version (must match the engine, e.g. 7.1 for redis, 8.0 for valkey)"
type: string
default: "7.1"
required: false
fleet_redis_parameter_group_family:
description: "Elasticache parameter group family (must match engine+version, e.g. redis7, valkey7, valkey8)"
type: string
default: "redis7"
required: false
terraform_action:
description: Dry run only? No "terraform apply"
type: choice
@@ -79,6 +97,9 @@ env:
TF_VAR_database_instance_count: "${{ inputs.fleet_database_instance_count }}"
TF_VAR_redis_instance_size: "${{ inputs.fleet_redis_instance_size }}"
TF_VAR_redis_instance_count: "${{ inputs.fleet_redis_instance_count }}"
TF_VAR_redis_engine: "${{ inputs.fleet_redis_engine }}"
TF_VAR_redis_engine_version: "${{ inputs.fleet_redis_engine_version }}"
TF_VAR_redis_parameter_group_family: "${{ inputs.fleet_redis_parameter_group_family }}"
permissions:
id-token: write
+17 -5
View File
@@ -14,6 +14,11 @@ on:
required: false
type: string
default: ''
redis:
description: 'Redis/Valkey Docker image (e.g., "redis:8.0", "valkey/valkey:8.0"). Leave empty to use the docker-compose default (redis:6.2).'
required: false
type: string
default: ''
cover_pkg:
description: 'Go coverage package pattern (e.g., "github.com/fleetdm/fleet/v4/server/activity/..."). Defaults to all fleet packages.'
required: false
@@ -101,12 +106,19 @@ jobs:
- name: Compute artifact prefix
run: |
PREFIX="${{ inputs.suite }}"
if [[ -n "${{ inputs.mysql }}" ]]; then
MYSQL_ID=$(echo "${{ inputs.mysql }}" | tr -d ':')
echo "ARTIFACT_PREFIX=${{ inputs.suite }}-${MYSQL_ID}" >> $GITHUB_ENV
else
echo "ARTIFACT_PREFIX=${{ inputs.suite }}" >> $GITHUB_ENV
PREFIX="${PREFIX}-${MYSQL_ID}"
fi
# Append the Redis/Valkey id only when an explicit image is requested, so the
# default callers keep their existing artifact names and matrix legs that vary
# only by Redis image don't collide on artifact upload.
if [[ -n "${{ inputs.redis }}" ]]; then
REDIS_ID=$(echo "${{ inputs.redis }}" | tr -d ':/')
PREFIX="${PREFIX}-${REDIS_ID}"
fi
echo "ARTIFACT_PREFIX=${PREFIX}" >> $GITHUB_ENV
- name: Set Go race setting on schedule
if: ${{ inputs.is_cron }}
@@ -131,7 +143,7 @@ jobs:
- name: Start Infra Dependencies
if: ${{ env.NEED_DOCKER }}
# Use & to background this
run: FLEET_MYSQL_IMAGE=${{ inputs.mysql }} $DOCKER_COMMAND &
run: FLEET_REDIS_IMAGE=${{ inputs.redis }} FLEET_MYSQL_IMAGE=${{ inputs.mysql }} $DOCKER_COMMAND &
- name: Add TLS certificate for SMTP Tests
if: ${{ env.NEED_DOCKER }}
@@ -199,7 +211,7 @@ jobs:
docker compose down
echo "Restarting containers..."
FLEET_MYSQL_IMAGE=${{ inputs.mysql }} $DOCKER_COMMAND &
FLEET_REDIS_IMAGE=${{ inputs.redis }} FLEET_MYSQL_IMAGE=${{ inputs.mysql }} $DOCKER_COMMAND &
# Give containers a moment to start
sleep 10
+26 -2
View File
@@ -105,6 +105,30 @@ jobs:
FLEET_RELEASE_GITHUB_PAT: ${{ secrets.FLEET_RELEASE_GITHUB_PAT }}
SLACK_G_HELP_ENGINEERING_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }}
# ──────────────────────────────────────────────────────────────────────────
# Extended Redis/Valkey coverage: only on the nightly cron schedule.
# Runs the Redis-touching suites against newer Redis versions and Valkey, in
# both standalone and cluster mode. MySQL is pinned to the always-run version
# (single DB dimension, not NxM). Redis 6.2 is already covered by the always-run
# test-go job above, so it's omitted here.
# make sure to update supported versions docs when Redis/Valkey versions change
# ──────────────────────────────────────────────────────────────────────────
test-go-extended-redis:
if: github.event_name == 'schedule'
strategy:
matrix:
suite: ["integration-core", "integration-enterprise", "integration-mdm", "main", "service"]
redis: ["redis:7.4", "redis:8.0", "valkey/valkey:7.2", "valkey/valkey:8.0"]
uses: ./.github/workflows/test-go-suite.yaml
with:
suite: ${{ matrix.suite }}
mysql: "mysql:8.0.44"
redis: ${{ matrix.redis }}
is_cron: true
secrets:
FLEET_RELEASE_GITHUB_PAT: ${{ secrets.FLEET_RELEASE_GITHUB_PAT }}
SLACK_G_HELP_ENGINEERING_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }}
# Based on https://github.com/micromdm/nanomdm/blob/main/.github/workflows/on-push-pr.yml#L87
test-go-nanomdm:
runs-on: 'ubuntu-latest'
@@ -224,7 +248,7 @@ jobs:
# We upload all backend coverage in one step so that we're less like to end up in a situation with a partial coverage report.
upload-coverage:
needs: [test-go-no-db, test-go, test-go-extended-mysql, test-go-nanomdm]
needs: [test-go-no-db, test-go, test-go-extended-mysql, test-go-extended-redis, test-go-nanomdm]
# Run even if extended-mysql was skipped (non-cron) or individual suites failed.
if: always()
runs-on: ubuntu-latest
@@ -251,7 +275,7 @@ jobs:
# Our Go test suites are run with continue-on-error: true, so they don't contribute to the workflow pass/fail.
# This job explicitly checks if any Go test suites have failed and marks the overall workflow with the proper pass/fail status.
aggregate-result:
needs: [test-go-no-db, test-go, test-go-extended-mysql]
needs: [test-go-no-db, test-go, test-go-extended-mysql, test-go-extended-redis]
# Run even if extended-mysql was skipped (non-cron) or individual suites failed.
if: always()
runs-on: ubuntu-latest