Repository navigation
Real testcontainers tests for Weaviate (fixes fully-broken v4 store) — #829 - #839
Merged
Merged
Conversation
) Never tested against a real Weaviate — the only coverage was a MagicMock — so the whole store was broken on the v4 client: it blocked the event loop (sync client in async def), attached no vectors on insert (insert_many misuse), never created the collection (collections.get doesn't raise for a missing one), passed a list where v4 wants MetadataQuery, scored every result 0.0, dropped metadata via return_properties so the filter never matched, and omitted the required gRPC endpoint. Rewritten for weaviate-client v4: offload via asyncio.to_thread, insert DataObject(properties, vector), use collections.exists, derive score from cosine distance, apply a native Filter, and configure gRPC. Adds the first real weaviate testcontainers tests (nearest-neighbour ranking, metadata filter, top_k, reconnect persistence, negatives, async contract). Part of #829. Closes #838.
Closed
18 of 19 tasks
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.
Summary
Next in epic #829: Weaviate (weaviate-client v4). It had no test at all before — the survey only found a MagicMock reference — and deep testing shows the store was broken end-to-end against real Weaviate (#838).
Bugs found & fixed
async def).insert_many(data_objects=, vectors=)misuse; v4 wantsDataObject(properties, vector).collections.getdoesn't raise for a missing collection; usecollections.exists.return_metadatalist instead ofMetadataQuery, and score always 0.0 (near_vector has no score) — now derived from cosine distance.return_properties=["content"]) — now returns all properties + nativeFilter.connect_to_custom(v4 requires it).Verification (real data)
8/8 pass against real
weaviate(http + gRPC): real inserts with vectors, realnear_vectorranking, native filter, reconnect via a second client, async contract. Wired into the CIintegrationjob.Commits
fix(retrieval): fix WeaviateVectorStore against a real Weaviate v4 (#838)ci(test): add weaviate-client to the integration group and CI job (#829)Part of #829.