docs: add Valkey compatibility notes and CI coverage for redis-backed plugins - #13760
Open
daric93 wants to merge 4 commits into
Open
docs: add Valkey compatibility notes and CI coverage for redis-backed plugins#13760daric93 wants to merge 4 commits into
daric93 wants to merge 4 commits into
Conversation
… plugins Valkey is RESP-compatible, so the redis-backed plugins (limit-count, limit-req, limit-conn, graphql-limit-count, ai-rate-limiting, ai-cache, and openid-connect session storage) already work against it unmodified. This makes the compatibility official: - Add a "Valkey Compatibility" note to each redis-backed plugin doc. The ai-cache note calls out that the semantic (L2) layer needs the RediSearch module, which Valkey does not provide. The openid-connect note references the session.redis.* attributes it actually uses. - Add an apisix_valkey service (valkey/valkey:8) on port 6381 to ci/pod/docker-compose.common.yml. - Add t/plugin/limit-count-valkey.t, mirroring the non-auth subset of limit-count-redis.t against the Valkey service. - Flush port 6381 in the test_redis helper's default port list. Ref apache#13738
Each Valkey Compatibility note now includes a JSON connection example.
The flat-schema plugins (limit-count, limit-req, limit-conn,
graphql-limit-count, ai-rate-limiting) show the redis_* fields; ai-cache
shows an L1-only ("exact") example; openid-connect shows the nested
session.redis.* form it actually uses.
Ref apache#13738
Place apisix_valkey directly after apisix_redis so the two data-store services sit together. Add a comment noting the Valkey service omits the TLS/ACL command and cert volume that apisix_redis carries, because the Valkey tests only exercise the plaintext, non-auth path.
- Check return values of SCRIPT FLUSH / FLUSHALL in TEST 9 so TEST 10's NOSCRIPT-fallback assertion can't pass vacuously on a failed flush - Rename TEST 6 to reflect it only proves rate limiting with the flag set, not degradation behavior (unreachable Valkey is never exercised) - Document why no_shuffle() is required (order-dependent tests)
Closed
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Valkey is a Linux Foundation, BSD-licensed fork of Redis that is protocol (RESP) compatible. APISIX's redis-backed plugins (
limit-count,limit-req,limit-conn,graphql-limit-count,ai-rate-limiting,ai-cacheexact-match layer, andopenid-connectsession storage) therefore already work against Valkey unmodified — and users already run this in production. Until now the repository had no mention of Valkey in docs, tests, or CI, so there was no official signal that this combination is supported. This PR makes the compatibility official. No plugin code changes — documentation + test infrastructure only.Docs — added a "Valkey Compatibility" note to each redis-backed plugin doc:
limit-count,limit-req,limit-conn,graphql-limit-count,ai-rate-limiting: point the existingredis_host/redis_port/redis_passwordattributes at a Valkey deployment.ai-cache: Valkey works as a drop-in for the exact (L1) layer; the note calls out that the semantic (L2) layer requires the RediSearch module (Redis Stack), which Valkey does not provide, so Valkey should be used only whenlayersis["exact"].openid-connect: the note references thesession.redis.*attributes this Plugin actually uses (not the flatredis_*fields used by the limit plugins).Each note includes a JSON connection example.
CI — turns "should work because RESP-compatible" into "verified in CI":
apisix_valkeyservice (valkey/valkey:8) on host port6381toci/pod/docker-compose.common.yml, placed next to the existingapisix_redisservice.t/plugin/limit-count-valkey.t, mirroring the non-auth subset oft/plugin/limit-count-redis.tagainst the Valkey service. Auth/ACL/TLS tests are intentionally omitted since the Valkey service is configured without a password (kept minimal). The file lands in the existingt/plugin/[l-z]*.tmatrix group, so no new CI matrix group is needed.6381to thetest_redishelper's default flush list so counters don't survive CI re-runs.Which issue(s) this PR fixes:
Closes #13738
Checklist