Skip to content

Real tests for Milvus via Milvus Lite (fixes fully-broken store) — #829 - #841

Merged
AmitoVrito merged 3 commits into
mainfrom
feat/issue-829-testcontainers-milvus
Jul 21, 2026
Merged

AmitoVrito merged 3 commits into
mainfrom
feat/issue-829-testcontainers-milvus

Conversation

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Summary

Next in epic #829: Milvus. Milvus standalone needs a 3-container deployment (etcd+minio+milvus); this uses Milvus Lite — the official embedded build of the same real Milvus engine — so it's real vector search without the ops overhead. First-ever test for this store, and it was broken end-to-end (#840).

Bugs found & fixed

  • No primary key in the schema → Milvus rejects every collection (PrimaryKeyException).
  • create_index got a dict where MilvusClient needs an IndexParams object.
  • Metadata never returned (dynamic fields + output_fields=["text"]) — now a JSON field, filtered and returned.
  • Blocked the event loop (sync client in async def) — now asyncio.to_thread.

Verification (real data)

8/8 pass against real Milvus Lite: real inserts, real vector search, JSON-metadata filter, persistence across reopen, async contract. milvus-lite is declared in the integration group so CI actually runs it (not skips).

Commits

  • fix(retrieval): fix MilvusVectorStore against a real Milvus (#840)
  • ci(test): add pymilvus + milvus-lite to the integration group and CI job (#829)

Part of #829.

Only ever MagicMock-tested, which hid a fully-broken store: the schema had no
primary key (Milvus rejects it even with auto_id), create_index was passed a plain
dict instead of an IndexParams object, metadata was stored as dynamic fields that
never came back on search, and the sync MilvusClient was called directly inside
async def (blocking the event loop).

Declare an auto-id INT64 primary key, store metadata in a JSON field (filtered via
metadata["key"] and returned via output_fields), build IndexParams with
prepare_index_params, and offload all client calls via asyncio.to_thread. Adds the
first real tests for this store via Milvus Lite (embedded real engine; standalone
needs etcd+minio).

Part of #829. Closes #840.
…job (#829)

milvus-lite is declared explicitly so the integration CI job actually runs the
Milvus tests (uv sync wouldn't otherwise install it) rather than skipping.

Part of #829.
@AmitoVrito
AmitoVrito merged commit b50c7ad into main Jul 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant