From 30ed749940ad1095c2f0c8db5cbeb083024e4bb0 Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Fri, 27 Dec 2024 22:49:03 -0500 Subject: [PATCH] chore: Fixing testing in Milvus, Makefile, and repo_configuration (#4881) * chore: Fixing testing in Milvus, Makefile, and repo_configuration Signed-off-by: Francisco Javier Arceo * adjusted variable name Signed-off-by: Francisco Javier Arceo * linter Signed-off-by: Francisco Javier Arceo * removed connection_string argument in config definition Signed-off-by: Francisco Javier Arceo --------- Signed-off-by: Francisco Javier Arceo --- Makefile | 2 +- .../tests/integration/feature_repos/repo_configuration.py | 5 +++++ .../integration/online_store/test_universal_online.py | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 446e93eb1cf..79628169218 100644 --- a/Makefile +++ b/Makefile @@ -367,7 +367,7 @@ test-python-universal-milvus-online: FULL_REPO_CONFIGS_MODULE=sdk.python.feast.infra.online_stores.milvus_online_store.milvus_repo_configuration \ PYTEST_PLUGINS=sdk.python.tests.integration.feature_repos.universal.online_store.milvus \ python -m pytest -n 8 --integration \ - -k "test_retrieve_online_milvus_ocuments" \ + -k "test_retrieve_online_milvus_documents" \ sdk/python/tests --ignore=sdk/python/tests/integration/offline_store/test_dqm_validation.py test-python-universal-singlestore-online: diff --git a/sdk/python/tests/integration/feature_repos/repo_configuration.py b/sdk/python/tests/integration/feature_repos/repo_configuration.py index bf464681600..74bada19274 100644 --- a/sdk/python/tests/integration/feature_repos/repo_configuration.py +++ b/sdk/python/tests/integration/feature_repos/repo_configuration.py @@ -86,6 +86,7 @@ ) DYNAMO_CONFIG = {"type": "dynamodb", "region": "us-west-2"} +MILVUS_CONFIG = {"type": "milvus"} REDIS_CONFIG = {"type": "redis", "connection_string": "localhost:6379,db=0"} REDIS_CLUSTER_CONFIG = { "type": "redis", @@ -162,6 +163,7 @@ AVAILABLE_ONLINE_STORES["datastore"] = ("datastore", None) AVAILABLE_ONLINE_STORES["snowflake"] = (SNOWFLAKE_CONFIG, None) AVAILABLE_ONLINE_STORES["bigtable"] = (BIGTABLE_CONFIG, None) + AVAILABLE_ONLINE_STORES["milvus"] = (MILVUS_CONFIG, None) # Uncomment to test using private IKV account. Currently not enabled as # there is no dedicated IKV instance for CI testing and there is no @@ -559,6 +561,9 @@ def construct_test_environment( cache_ttl_seconds=1, ) + if test_repo_config.online_store in ["milvus", "pgvector", "qdrant"]: + entity_key_serialization_version = 3 + environment_params = { "name": project, "provider": test_repo_config.provider, diff --git a/sdk/python/tests/integration/online_store/test_universal_online.py b/sdk/python/tests/integration/online_store/test_universal_online.py index d337d365e9b..64122d2c861 100644 --- a/sdk/python/tests/integration/online_store/test_universal_online.py +++ b/sdk/python/tests/integration/online_store/test_universal_online.py @@ -862,8 +862,8 @@ def assert_feature_service_entity_mapping_correctness( @pytest.mark.integration @pytest.mark.universal_online_stores(only=["pgvector", "elasticsearch", "qdrant"]) -def test_retrieve_online_documents(vectordb_environment, fake_document_data): - fs = vectordb_environment.feature_store +def test_retrieve_online_documents(environment, fake_document_data): + fs = environment.feature_store df, data_source = fake_document_data item_embeddings_feature_view = create_item_embeddings_feature_view(data_source) fs.apply([item_embeddings_feature_view, item()]) @@ -899,8 +899,8 @@ def test_retrieve_online_documents(vectordb_environment, fake_document_data): @pytest.mark.integration @pytest.mark.universal_online_stores(only=["milvus"]) -def test_retrieve_online_milvus_documents(vectordb_environment, fake_document_data): - fs = vectordb_environment.feature_store +def test_retrieve_online_milvus_documents(environment, fake_document_data): + fs = environment.feature_store df, data_source = fake_document_data item_embeddings_feature_view = create_item_embeddings_feature_view(data_source) fs.apply([item_embeddings_feature_view, item()])