Conversation
The rate limit service reaches its counter store over the Redis protocol, through radix. Valkey serves that protocol, so it should work in that position unchanged, but nothing in the repo demonstrated it, and Redis and Valkey have developed independently since Redis 7.2. Parameterize the integration target over the store's server and CLI binaries and add a Valkey run alongside the Redis one: - tests_with_redis and the new tests_with_valkey share one recipe, tests_with_store, selected by STORE_SERVER and STORE_CLI. The Redis run is unchanged. - make docker_tests_valkey runs that target in the integration image, and a CI job runs it on every pull request. - Dockerfile.integration installs valkey-server and valkey-tools. Debian trixie main, already the base of that image, packages Valkey 8.1, so this needs no third-party apt repository. - README states that Valkey can be used in place of Redis with no configuration change, and which version and topologies back that claim. No change to src/: the same client, protocol, and settings serve both stores. Redis stays the default in docker-compose, in the examples, and in the test target CI already ran. Signed-off-by: Daria Korenieva <daric2612@gmail.com>
|
Thanks for adding Valkey coverage. The Valkey CI job is green, including the sentinel, cluster, and TLS paths. One gap before I approve: |
|
Fixed in 3f65129 — Verified locally with The workflow runs need maintainer approval to start, so |
The Makefile parameterization only covered the servers the recipe starts itself. Tests that stand up their own servers via WithMultiRedis still launched redis-server, so ten integration tests ran against Redis during the Valkey job. WithMultiRedis now reads STORE_SERVER from the environment, defaulting to redis-server, and the Makefile exports it so the target-specific value set by tests_with_valkey reaches go test. Signed-off-by: Daria Korenieva <daric2612@gmail.com>
2d1377c to
3f65129
Compare
Description
The rate limit service reaches its counter store over the Redis protocol, through radix. Valkey serves that protocol, so it should work in that position unchanged — but nothing in the repo demonstrated it, and Redis and Valkey have developed independently since Redis 7.2, so command-level behavior can drift. This adds a Valkey run to the existing integration suite so the answer is a test rather than an assumption.
The integration target is parameterized over the store's server and CLI binaries, and the Redis and Valkey runs share one recipe:
Makefiletests_with_redisand the newtests_with_valkeyboth delegate totests_with_store, selected bySTORE_SERVER/STORE_CLI. The Redis recipe is unchanged apart from the substitution.Makefilemake docker_tests_valkeyruns that target in the integration image, as a separate container frommake docker_tests.Dockerfile.integrationvalkey-serverandvalkey-tools. Debian trixie main, already the base of this image, packages Valkey 8.1, so no third-party apt repository or binary download is needed, and the packages install alongsiderediswithout conflicting.build-valkeyjob runsmake docker_tests_valkeyon every pull request, next to the existingbuildjob.README.mdValkeysection underRedis: Valkey can be used in place of Redis with no configuration change, plus the version and topologies that back the claim.No change to
src/. The same client, protocol, and settings serve both stores. Redis stays the default indocker-compose.yml, in the examples, and in the target CI already ran.Related Issues/PRs (if applicable)
Related issue: #1247
This comes from the Envoy AI Gateway / Agent Router side. theagentrouter/agent-router#2522 asked whether validating Valkey against the documented token-rate-limit and quota paths was welcome there; in theagentrouter/agent-router#2719 the maintainer's answer was that the gateway is the wrong abstraction layer for testing Redis-protocol compatibility and that it belongs here. I agree, so that PR is being withdrawn in favor of this one.
The original Valkey work is by @atao2004, on the gateway side. This PR is a different change at a different layer, so it is not a port of that patch, but the idea is theirs.
Special notes for reviewers (if applicable)
tests_with_storeuses fixed ports and directories, so onemakeinvocation can serve only one store —make tests_with_redis tests_with_valkeywould run the recipe once, not twice. There is a comment saying so, anddocker_tests_valkeyuses a separate container. If you would rather have the duplication and the independence, say so and I will split them.build-valkeyis a separate job, not a matrix. A matrix over the store would have been tidier, but the two runs differ only in one make target, and a matrix would have renamed the existingbuildjob and any branch protection attached to it. Happy to convert it if you would prefer.Dockerfile.integration.Testing
Both runs were executed locally in the integration image, and both passed:
make tests_with_valkey— the whole suite green, includingtest/integrationat 94s, which is the sentinel, cluster, and stunnel TLS coverage.valkey-cli --cluster createformed both 3-primary clusters, all 16384 slots covered, and noredis-serverprocess was started in that run.make tests_with_redis— green, and novalkey-serverprocess was started, confirming the refactor left the Redis path alone.make check_formatand the doctoc and prettier pre-commit hooks are clean.One local deviation worth naming: this machine cannot reach
proxy.golang.org, so rather thanmake docker_tests_valkeyend to end I built the same image without thego mod downloadlayer and mounted a prepopulated module cache. The apt layer, the Makefile targets, and the suite itself are exactly what CI will run; only the module fetch differed.AI usage disclosure
Claude was used to write these changes, run the two suites, and draft this description. I reviewed all of it, and the results above are from runs I have the logs for.