Skip to content

fix: handle missing connection_pool attribute in RedisCluster (#93) #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2025

Conversation

bsbodden
Copy link
Contributor

RedisCluster doesn't have the connection_pool attribute that standard Redis clients have. This causes an AttributeError when using from_conn_string() context managers with Redis deployments that use proxy layers (like Azure Cache for Redis or Redis Enterprise).

Changes:

  • Add getattr check before accessing connection_pool.disconnect()
  • Applied to all checkpointer implementations (sync and async)
  • Added comprehensive tests for the fix

Fixes #93

RedisCluster doesn't have the connection_pool attribute that standard Redis
clients have. This causes an AttributeError when using from_conn_string()
context managers with Redis deployments that use proxy layers (like Azure
Cache for Redis or Redis Enterprise).

Changes:
- Add getattr check before accessing connection_pool.disconnect()
- Applied to all checkpointer implementations (sync and async)
- Added comprehensive tests for the fix

Fixes #93
@bsbodden bsbodden self-assigned this Aug 15, 2025
@bsbodden bsbodden merged commit 7a0e417 into main Aug 15, 2025
20 of 27 checks passed
@bsbodden bsbodden deleted the bsb/issue-93 branch August 15, 2025 22:30
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.

AttributeError: 'RedisCluster' object has no attribute 'connection_pool'
1 participant