Sorry, something went wrong.
|
The unit-test-python (3.12, ubuntu-latest) failure looks like a flake unrelated to this change. The CI log shows xdist worker gw4 crashing with [gw4] node down: Not properly terminated while running test_registry_apis[kubernetes], which caused test_e2e_local (which had been scheduled on that worker) to be marked as failed. This PR only touches sdk/python/tests/integration/online_store/test_universal_online.py, which has no code path overlap with test_e2e_local (sdk/python/tests/unit/local_feast_tests/) or the Kubernetes auth test. The same unit test suite passed on 3.10/ubuntu, 3.11/ubuntu, 3.11/macOS, and 3.12/macOS. Could a maintainer kick off a rerun of the failed 3.12/ubuntu job? Thanks! |
Sorry, something went wrong.
What does this PR do?
Expands test_retrieve_online_milvus_documents (in sdk/python/tests/integration/online_store/test_universal_online.py) with three additional cases that exercise code paths adjacent to the bug fixes in #6275.
The existing test covered a single L2 vector query on a 3-row dataset with top_k=2. This PR adds:
1. Empty-store query
Queries retrieve_online_documents_v2 before write_to_online_store, so the Milvus collection exists but is empty. Asserts 0 rows returned. Exercises the "no hits" path of the v2 retrieval code.
2. Oversized top_k
Queries with top_k=5 on a 3-row dataset. Asserts all 3 rows are returned. Exercises the hit-parsing loop when the result set is smaller than the requested top_k — adjacent to the territory of bug #4 from #6275 (the bytes.fromhex(None) crash on a hit with a missing composite key).
3. Cosine-metric variant
Creates a second FeatureView (item_embeddings_cosine) with vector_search_metric="COSINE", writes the same dataset, and queries with distance_metric="COSINE". Verifies the cosine index is created and queried end to end. The existing test only covered the L2 path.
Motivation
Bug #4 in #6275 (TypeError: fromhex argument must be str, not None) was caught by a unit test (test_milvus_retrieve_online_documents_v2_missing_entity_key), but the universal integration test for Milvus retrieval did not exercise any of the adjacent edges (empty results, trailing hits, non-L2 metric). This PR closes that gap.
Tests
Verified locally against Milvus Lite:
No new imports are added; all types (FeatureView, Field, Array, Float32, String, timedelta, item) were already imported in the module.
Out of scope
🤖 Generated with Claude Code