Skip to content

Conversation

@abrookins
Copy link
Contributor

Adds support for Redis Cluster to the RedisSaver and AsyncRedisSaver similar to that added for the "store" classes.

Fixes #55

@abrookins abrookins requested a review from Copilot June 10, 2025 23:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Redis Cluster to both synchronous and asynchronous checkpoint savers, enabling cluster-aware TTL, deletion, and index setup operations.

  • Updated tests in both sync and async modules to validate cluster vs. non-cluster behaviors.
  • Modified type annotations and client detection in RedisSaver and AsyncRedisSaver to support both standalone and cluster clients.
  • Refactored TTL application and key deletion logic to account for cluster-specific operation differences.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_cluster_mode.py Added fixture and tests for verifying cluster mode behavior in RedisSaver.
tests/test_async_cluster_mode.py Added async fixture and tests for verifying cluster mode in AsyncRedisSaver.
langgraph/store/redis/base.py Removed unused imports and cleaned up type usage.
langgraph/checkpoint/redis/types.py Extended RedisClientType union to include cluster clients.
langgraph/checkpoint/redis/base.py Updated TTL handling to differentiate between cluster and non-cluster modes.
langgraph/checkpoint/redis/aio.py Enhanced AsyncRedisSaver with cluster detection and separated logic.
langgraph/checkpoint/redis/init.py Modified RedisSaver to support both standalone and cluster clients.

@bsbodden bsbodden self-requested a review June 11, 2025 13:45
@bsbodden bsbodden changed the title Support cluster clients in saver fix: Support cluster clients in saver Jun 11, 2025
Copy link
Contributor

@bsbodden bsbodden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM! 🚀

@bsbodden bsbodden merged commit b4fad1c into main Jun 11, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AsyncRedisSaver fails to aput

3 participants