Repository navigation
fix(nodes): send store_milvus metadata as a plain dict for pymilvus 3 - #3032
ptlnextdoor wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
|
CI note: the failing jobs are |
|
@ptlnextdoor Thank you for this fix. #3055 is now merged and makes the same One detail for reference: |
Fixes #3014
Root cause
Store.addChunksinnodes/src/nodes/store_milvus/milvus.pyputchunk.metadata, a pydanticDocMetadata, straight into the JSON fieldmeta. pymilvus 3 serializes JSON fields itself and rejects the model (DataNotMatchException: {meta} field should be a json), so every write failed, starting with the control row thatcreateCollectionwrites. That left an empty collection, which is why later runs raisedCollection does not have control document, found 0. The row now carrieschunk.metadata.model_dump(), the same conversionstore_postgresalready uses. The read path is unchanged because it already handlesmetaas a dict.Tests
The Milvus stub in
nodes/test/test_store_object_batches.pynow readsmetaas a dict, the way a real server returns it. A new test,test_milvus_rows_carry_json_serializable_meta, checks that every upsertedmetasurvivesjson.dumps.Without the source change, the same command gives 5 failed (the new test plus the four Milvus cases).
ruff checkandruff format --checkpass on both files. I ran the tests locally withdepends/engLibstubbed onPYTHONPATH(no built engine) and did not test against a live Milvus server.Summary by CodeRabbit