From 22c9f6e490f39a2c0687e134b175a91bb27134c1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 2 Mar 2022 22:41:44 -0800 Subject: [PATCH 1/4] Fix redis on master.yml Signed-off-by: Kevin Zhang --- .github/workflows/master_only.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/master_only.yml b/.github/workflows/master_only.yml index 8bb4dafa34..e7a89815fe 100644 --- a/.github/workflows/master_only.yml +++ b/.github/workflows/master_only.yml @@ -65,16 +65,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 - name: Setup Python @@ -120,6 +110,11 @@ jobs: run: pip install pip-tools - name: Install dependencies run: make install-python-ci-dependencies + - name: Start Redis + uses: supercharge/redis-github-action@1.4.0 + with: + redis-version: ${{ matrix.redis-version }} + redis-port: 12345 - name: Setup Redis Cluster run: | docker pull vishnunair/docker-redis-cluster:latest From deb3e187443dd7cd8943cb8026c646e0937f3373 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 3 Mar 2022 14:18:08 -0800 Subject: [PATCH 2/4] Remove hack in make_feature_store_yaml Signed-off-by: Kevin Zhang --- sdk/python/tests/integration/registration/test_cli.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sdk/python/tests/integration/registration/test_cli.py b/sdk/python/tests/integration/registration/test_cli.py index a2c4a9a8e5..d13d8d341a 100644 --- a/sdk/python/tests/integration/registration/test_cli.py +++ b/sdk/python/tests/integration/registration/test_cli.py @@ -130,11 +130,6 @@ def make_feature_store_yaml(project, test_repo_config, repo_dir_name: Path): repo_path=str(Path(repo_dir_name)), ) config_dict = config.dict() - if ( - isinstance(config_dict["online_store"], dict) - and "redis_type" in config_dict["online_store"] - ): - del config_dict["online_store"]["redis_type"] config_dict["repo_path"] = str(config_dict["repo_path"]) return yaml.safe_dump(config_dict) From dfad4342801069a384e65e387e9cd9408c5842b1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 3 Mar 2022 14:36:44 -0800 Subject: [PATCH 3/4] Fix error Signed-off-by: Kevin Zhang --- sdk/python/tests/integration/registration/test_cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/python/tests/integration/registration/test_cli.py b/sdk/python/tests/integration/registration/test_cli.py index d13d8d341a..08cb030c00 100644 --- a/sdk/python/tests/integration/registration/test_cli.py +++ b/sdk/python/tests/integration/registration/test_cli.py @@ -130,6 +130,11 @@ def make_feature_store_yaml(project, test_repo_config, repo_dir_name: Path): repo_path=str(Path(repo_dir_name)), ) config_dict = config.dict() + if ( + isinstance(config_dict["online_store"], dict) + and "redis_type" in config_dict["online_store"] + ): + config_dict["online_store"]["redis_type"] = "redis_cluster" config_dict["repo_path"] = str(config_dict["repo_path"]) return yaml.safe_dump(config_dict) From 84fef3c97bea114744ea3ec1e6e1f18e3f5545b3 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 3 Mar 2022 14:57:04 -0800 Subject: [PATCH 4/4] Fix tests Signed-off-by: Kevin Zhang --- sdk/python/tests/integration/registration/test_cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/python/tests/integration/registration/test_cli.py b/sdk/python/tests/integration/registration/test_cli.py index 08cb030c00..25f0ae4841 100644 --- a/sdk/python/tests/integration/registration/test_cli.py +++ b/sdk/python/tests/integration/registration/test_cli.py @@ -134,9 +134,11 @@ def make_feature_store_yaml(project, test_repo_config, repo_dir_name: Path): isinstance(config_dict["online_store"], dict) and "redis_type" in config_dict["online_store"] ): - config_dict["online_store"]["redis_type"] = "redis_cluster" + if str(config_dict["online_store"]["redis_type"]) == "RedisType.redis_cluster": + config_dict["online_store"]["redis_type"] = "redis_cluster" + elif str(config_dict["online_store"]["redis_type"]) == "RedisType.redis": + config_dict["online_store"]["redis_type"] = "redis" config_dict["repo_path"] = str(config_dict["repo_path"]) - return yaml.safe_dump(config_dict)