Skip to content

Commit c47fa2a

Browse files
kevjumbafelixwang9817
authored andcommitted
fix: Update RedisCluster to use redis-py official implementation (#2554)
* switch to using redis cluster in redis-py Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix dependencies Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Update py3.7-ci-requirements.txt Signed-off-by: Felix Wang <wangfelix98@gmail.com> * update 3.10 requirements Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix dependencies to address issues Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> Co-authored-by: Felix Wang <wangfelix98@gmail.com>
1 parent 5539c51 commit c47fa2a

9 files changed

+425
-685
lines changed

sdk/python/feast/infra/online_stores/redis.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
try:
4444
from redis import Redis
45-
from rediscluster import RedisCluster
45+
from redis.cluster import ClusterNode, RedisCluster
4646
except ImportError as e:
4747
from feast.errors import FeastExtrasDependencyImportError
4848

@@ -164,7 +164,9 @@ def _get_client(self, online_store_config: RedisOnlineStoreConfig):
164164
online_store_config.connection_string
165165
)
166166
if online_store_config.redis_type == RedisType.redis_cluster:
167-
kwargs["startup_nodes"] = startup_nodes
167+
kwargs["startup_nodes"] = [
168+
ClusterNode(**node) for node in startup_nodes
169+
]
168170
self._client = RedisCluster(**kwargs)
169171
else:
170172
kwargs["host"] = startup_nodes[0]["host"]

0 commit comments

Comments
 (0)