feat: enhance RedisClusterTemplate for CI and hybrid environments#211
Merged
joshrotenberg merged 2 commits intomainfrom Jan 5, 2026
Merged
feat: enhance RedisClusterTemplate for CI and hybrid environments#211joshrotenberg merged 2 commits intomainfrom
joshrotenberg merged 2 commits intomainfrom
Conversation
Add new features to improve usability in CI environments and hybrid local/CI setups: RedisClusterConnection (#207): - Add new() constructor for direct node list creation - Add with_password() for authenticated connections - Add nodes() getter for accessing node list Environment configuration (#208): - Add from_env() to configure templates via environment variables - Supports REDIS_CLUSTER_PORT_BASE, REDIS_CLUSTER_NUM_MASTERS, REDIS_CLUSTER_NUM_REPLICAS, REDIS_CLUSTER_PASSWORD - Add get_port_base(), get_num_masters(), get_num_replicas() getters Health check helpers (#209): - Add is_ready() to check if cluster state is ok - Add wait_until_ready(timeout) for polling until ready - Add TemplateError::Timeout variant for timeout errors Hybrid setup support (#210): - Add detect_existing() to find running clusters at configured ports - Add start_or_detect(timeout) for best-of-both-worlds CI/local support Closes #207, #208, #209, #210
Merged
This was referenced Jan 5, 2026
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.
Summary
This PR adds features to improve
RedisClusterTemplateusability in CI environments and hybrid local/CI setups, addressing issues #207, #208, #209, and #210.Changes
RedisClusterConnection (#207)
new()constructor for direct node list creation without needing a templatewith_password()for authenticated connectionsnodes()getter for accessing the node listEnvironment Configuration (#208)
from_env()to configure templates via environment variables:REDIS_CLUSTER_PORT_BASE: Base port (default: 7000)REDIS_CLUSTER_NUM_MASTERS: Number of masters (default: 3)REDIS_CLUSTER_NUM_REPLICAS: Replicas per master (default: 0)REDIS_CLUSTER_PASSWORD: Optional passwordget_port_base(),get_num_masters(),get_num_replicas()Health Check Helpers (#209)
is_ready()to check if cluster state is "ok"wait_until_ready(timeout)for polling until cluster is readyTemplateError::Timeoutvariant for timeout errorsHybrid Setup Support (#210)
detect_existing()to find running clusters at configured portsstart_or_detect(timeout)- uses existing cluster if available, otherwise starts new oneUsage Example
Testing
Closes #207, #208, #209, #210