Skip to content

Commit

Permalink
fix: Rollback Redis-py to Redis-py-cluster (#2347)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
kevjumba authored and adchia committed Mar 4, 2022
1 parent bd6b44b commit 003819b
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 196 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/pr_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ jobs:
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ vendor
.terraform/
*.tfvars

# python
# python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -107,6 +107,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
infra/scripts/*.conf

# Translations
*.mo
Expand Down
6 changes: 2 additions & 4 deletions sdk/python/feast/infra/online_stores/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

try:
from redis import Redis
from redis.cluster import ClusterNode, RedisCluster
from rediscluster import RedisCluster
except ImportError as e:
from feast.errors import FeastExtrasDependencyImportError

Expand Down Expand Up @@ -163,9 +163,7 @@ def _get_client(self, online_store_config: RedisOnlineStoreConfig):
online_store_config.connection_string
)
if online_store_config.redis_type == RedisType.redis_cluster:
kwargs["startup_nodes"] = [
ClusterNode(**node) for node in startup_nodes
]
kwargs["startup_nodes"] = startup_nodes
self._client = RedisCluster(**kwargs)
else:
kwargs["host"] = startup_nodes[0]["host"]
Expand Down
Loading

0 comments on commit 003819b

Please sign in to comment.