Repository navigation
Conversation
QdrantClient accepts both REST and gRPC structures and converts automatically, and the gRPC branches do convert update_mode; the REST branches passed the gRPC enum straight into the REST model, where it failed validation as an int.
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
joein
left a comment
There was a problem hiding this comment.
Hey @feiiiiii5
It looks good to me, but could you please simplify / remove the tests, because these ones are too complicated
|
Thanks — I removed the mocked regression test as suggested. The branch now changes only the three REST conversion sites (sync/async remote and Re-ran the local set: I can also collapse the three checks into a small helper if you prefer that shape. |
The REST transport rejects a
grpc.UpdateModeinstead of converting it.QdrantClientdocuments that "All methods in QdrantClient accept both gRPC and REST structures as an input. Conversion will be performed automatically." (qdrant_client.py:32-33), andtypes.UpdateModeisrest.UpdateMode | grpc.UpdateMode. The gRPC branches convert (qdrant_remote.py:1153,uploader/grpc_uploader.py:186), but the REST branches pass the gRPC enum straight into the REST model, where pydantic rejects it as an int:That affects
upsert,upload_pointsandupload_collectionon a REST client, and the same value handed toRestBatchUploaderdirectly. The three sites (and the async twins) now convert when the value is an int and not a bool; REST enums andNoneare left alone.Test:
pytest tests/test_uploader.py -q -k rest_transport_accepts_grpc_update_modefails on dev with that ValidationError atqdrant_remote.py:1186and passes here.pytest qdrant_client/local/tests tests/test_common.py tests/test_uploader.py tests/conversions -q→ 274 passed.ruff format --check --line-length=99on the four files is clean. Not run: the congruence/integration suites (they need a running server); the request bodies are checked withhttpx.MockTransport.All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
pre-commitwithpip3 install pre-commitand set up hooks withpre-commit install?Changes to Core Features: