This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Repository navigation
Talk to Valkey instead of Redis - #224
Merged
Merged
Conversation
The production cache moves to ElastiCache Serverless Valkey. The API now uses the valkey client (with its libvalkey parser) and reads VALKEY_HOST, VALKEY_PORT, and VALKEY_SSL. Tests start a throwaway valkey-server on a free port instead of testing.redis, and CI installs valkey-server from conda-forge and apt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
testing.redis takes the server binary as an argument, so it runs valkey-server in place of the hand-rolled fixture. The fixture overrides VALKEY_HOST and VALKEY_SSL as well as VALKEY_PORT, so a shell pointed at another server cannot leak into the tests. Two tests round-trip the natural-language cache helpers through the live server and check that an unreachable one reads as a miss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
testing.redis pulls in the redis client. The fixture starts valkey-server itself on a free loopback port, in a temporary directory with persistence off, so a dump.rdb in the working tree cannot stop it from starting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
valkey types ping() as Awaitable[Any] | Any, so the cast to Awaitable[bool] and the comment explaining it no longer describe the client. Three docstring lines fit in 88 columns again, and the CI step that installs Valkey says so in its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Changes
valkey[libvalkey]replacesredis[hiredis].get_valkeyreplacesget_redisand readsVALKEY_HOST,VALKEY_PORT, andVALKEY_SSL. The natural-language cache helpers and their timeout are renamed to match.valkey-serveron a free loopback port, in a temporary directory with persistence off, in place oftesting.redis. The fixture pins everyVALKEY_*variable to it.valkey-serverfrom conda-forge besiderdkit-postgresql, and from apt for the app tests, in place ofactions-setup-redis.Testing
pytest: 93 passed, againstvalkey-server9.1.2 from conda-forge.VALKEY_SSL=1 VALKEY_HOST=203.0.113.1 VALKEY_PORT=1in the shell, and with a corruptdump.rdbin the repository root.Notes
VALKEY_*variables on the interface task: merge this first, then deploybackendandinterfacefrom Add "use as template" button or user path #41. Until the interface stack is redeployed, the running image reads its old settings.dump.rdbwritten by Redis 8 stops a localvalkey-server --daemonize yesfrom starting in that directory (Can't handle RDB format version); delete it.🤖 Generated with Claude Code
The PR appears safe to merge; no outstanding findings remain.
Summary
This PR switches search-task state and natural-language caching from Redis to Valkey.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR UI[Search request] --> API[API] API --> DB[(PostgreSQL reaction data)] API --> V[(Valkey task state)] API --> NL[Natural-language translation] NL --> VReviews (5) · Last reviewed commit: "Drop the ping() cast and tighten the cac..."