From 43a1bd438bb39f76841c110c92d3f4d967f49aa8 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 3 Mar 2022 15:15:58 -0800 Subject: [PATCH] fix: Remove redis service to prevent more conflicts and add redis node to master_only (#2354) * Fix redis on master.yml Signed-off-by: Kevin Zhang * Remove hack in make_feature_store_yaml Signed-off-by: Kevin Zhang * Fix error Signed-off-by: Kevin Zhang * Fix tests Signed-off-by: Kevin Zhang --- .github/workflows/master_only.yml | 15 +++++---------- .../tests/integration/registration/test_cli.py | 6 ++++-- 2 files changed, 9 insertions(+), 12 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 diff --git a/sdk/python/tests/integration/registration/test_cli.py b/sdk/python/tests/integration/registration/test_cli.py index bba12056ce..d602648adb 100644 --- a/sdk/python/tests/integration/registration/test_cli.py +++ b/sdk/python/tests/integration/registration/test_cli.py @@ -135,9 +135,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"] ): - del config_dict["online_store"]["redis_type"] + 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)