Skip to content

Commit 003819b

Browse files
kevjumbaadchia
authored andcommitted
fix: Rollback Redis-py to Redis-py-cluster (#2347)
* Roll back redis config and add tests back Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * lint Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix autogenerated import Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix lint Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Add redis-py-cluster back Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix dask ci Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Regenerate using respective python 3 versions Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Change test_entity_ttl test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix lint Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Change integration workflow Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Temporarily disable for testing Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Continue making work Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Continue making work Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix workflow Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix workflow Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Update port numbers Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Update pr integration tests Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Reenable rest of tests Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Update data source creator Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix integration test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Clean up code Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Somehow removed the key components -,- Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
1 parent bd6b44b commit 003819b

File tree

10 files changed

+151
-196
lines changed

10 files changed

+151
-196
lines changed

.github/workflows/pr_integration_tests.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,6 @@ jobs:
8484
env:
8585
OS: ${{ matrix.os }}
8686
PYTHON: ${{ matrix.python-version }}
87-
services:
88-
redis:
89-
image: redis
90-
ports:
91-
- 6379:6379
92-
options: >-
93-
--health-cmd "redis-cli ping"
94-
--health-interval 10s
95-
--health-timeout 5s
96-
--health-retries 5
9787
steps:
9888
- uses: actions/checkout@v2
9989
with:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ vendor
5454
.terraform/
5555
*.tfvars
5656

57-
# python
57+
# python
5858
# Byte-compiled / optimized / DLL files
5959
__pycache__/
6060
*.py[cod]
@@ -107,6 +107,7 @@ coverage.xml
107107
*.cover
108108
.hypothesis/
109109
.pytest_cache/
110+
infra/scripts/*.conf
110111

111112
# Translations
112113
*.mo

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

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

@@ -163,9 +163,7 @@ def _get_client(self, online_store_config: RedisOnlineStoreConfig):
163163
online_store_config.connection_string
164164
)
165165
if online_store_config.redis_type == RedisType.redis_cluster:
166-
kwargs["startup_nodes"] = [
167-
ClusterNode(**node) for node in startup_nodes
168-
]
166+
kwargs["startup_nodes"] = startup_nodes
169167
self._client = RedisCluster(**kwargs)
170168
else:
171169
kwargs["host"] = startup_nodes[0]["host"]

0 commit comments

Comments
 (0)