← 返回首页
test: Expand MilvusOnlineStore integration test coverage by korbonits · Pull Request #6299 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

test: Expand MilvusOnlineStore integration test coverage#6299

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
korbonits:test/milvus-integration-coverage
Apr 22, 2026
Merged

test: Expand MilvusOnlineStore integration test coverage#6299
ntkathole merged 1 commit into
feast-dev:masterfrom
korbonits:test/milvus-integration-coverage

Conversation

Copy link
Copy Markdown
Contributor

korbonits commented Apr 20, 2026
edited by devin-ai-integration Bot
Loading

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:

FEAST_LOCAL_ONLINE_CONTAINER=True pytest --integration \ sdk/python/tests/integration/online_store/test_universal_online.py::test_retrieve_online_milvus_documents 1 passed, 5 warnings in 1.79s

No new imports are added; all types (FeatureView, Field, Array, Float32, String, timedelta, item) were already imported in the module.

Out of scope

  • Adding Milvus to the test_retrieve_online_documents_v2 universal parametrization: that test asserts a BM25-style text_rank contract that Milvus's current LIKE-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

korbonits requested a review from a team as a code owner April 20, 2026 18:13
Copy link
Copy Markdown
Contributor

devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

korbonits changed the title test: expand MilvusOnlineStore integration test coverage test: Expand MilvusOnlineStore integration test coverage Apr 20, 2026
Copy link
Copy Markdown
Contributor Author

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!

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 <noreply@anthropic.com> Signed-off-by: Alex Korbonits <alex@korbonits.com>
ntkathole force-pushed the test/milvus-integration-coverage branch from a20d15b to 5eb7471 Compare April 22, 2026 13:05
Hide details View details ntkathole merged commit 8fc01a4 into feast-dev:master Apr 22, 2026
18 of 26 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Footer

© 2026 GitHub, Inc.