test: Expand MilvusOnlineStore integration test coverage#6299
Merged
ntkathole merged 1 commit intoApr 22, 2026
Conversation
Contributor
Author
|
The This PR only touches Could a maintainer kick off a rerun of the failed 3.12/ubuntu job? Thanks! |
ntkathole
approved these changes
Apr 22, 2026
Adds three cases to test_retrieve_online_milvus_documents that exercise code paths adjacent to recent MilvusOnlineStore bug fixes (feast-dev#6275): 1. Empty-store query before any writes — verifies the v2 retrieval path returns 0 rows instead of raising when the collection exists but is empty. 2. Oversized top_k (top_k=5 on a 3-row dataset) — verifies the hit-parsing loop handles a result set smaller than the requested top_k and returns all available rows. 3. Cosine-metric variant via a second FeatureView with vector_search_metric="COSINE" — verifies the cosine index path end to end (write, index creation, retrieval). No new imports; all types were already imported in the module. Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Alex Korbonits <[email protected]>
a20d15b to
5eb7471
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Expands
test_retrieve_online_milvus_documents(insdk/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_v2beforewrite_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_kQueries with
top_k=5on 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 (thebytes.fromhex(None)crash on a hit with a missing composite key).3. Cosine-metric variant
Creates a second FeatureView (
item_embeddings_cosine) withvector_search_metric="COSINE", writes the same dataset, and queries withdistance_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
test_retrieve_online_documents_v2universal parametrization: that test asserts a BM25-styletext_rankcontract that Milvus's currentLIKE-based text search does not satisfy. A capability-matrix refactor of the universal v2 test is a larger design question and will be raised separately.🤖 Generated with Claude Code