fix: rename common.proto to qdrant_common.proto to avoid conflicts wi…#1125
Conversation
…th other libraries
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis PR reorganizes gRPC protobuf modules by renaming the common.proto schema to qdrant_common.proto and relocating its generated Python module from common_pb2.py to qdrant_common_pb2.py. The change updates all imports, proto file dependencies, and type hints across collections_pb2, points_pb2, and their .pyi type stub files to reference the new qdrant_common_pb2 module instead of common_pb2. The proto file's Java outer class name option is also adjusted accordingly. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
qdrant_client/grpc/qdrant_common_pb2.py (1)
1-5: Newqdrant_common_pb2module looks like clean generated outputThis file cleanly defines the shared messages (PointId, Filter, geo/datetime helpers, etc.) and wiring via
DESCRIPTOR/builder calls; it matches standard protoc output. I’d keep it exactly as generated and ignore style lints like E712 here rather than hand‑editing generated code.Also applies to: 23-27
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
qdrant_client/grpc/__init__.py(1 hunks)qdrant_client/grpc/collections_pb2.py(2 hunks)qdrant_client/grpc/collections_pb2.pyi(2 hunks)qdrant_client/grpc/common_pb2.py(0 hunks)qdrant_client/grpc/points_pb2.pyi(51 hunks)qdrant_client/grpc/qdrant_common_pb2.py(1 hunks)qdrant_client/proto/collections.proto(1 hunks)qdrant_client/proto/points.proto(1 hunks)qdrant_client/proto/qdrant_common.proto(1 hunks)
💤 Files with no reviewable changes (1)
- qdrant_client/grpc/common_pb2.py
🧰 Additional context used
🧬 Code graph analysis (2)
qdrant_client/grpc/collections_pb2.pyi (2)
qdrant_client/grpc/points_pb2.pyi (13)
filter(1479-1480)filter(1635-1636)filter(1780-1781)filter(1895-1896)filter(2043-2044)filter(2217-2218)filter(2327-2328)filter(2879-2880)filter(2951-2952)filter(3092-3093)filter(3193-3194)filter(3296-3297)filter(4520-4520)qdrant_client/grpc/qdrant_common_pb2.pyi (3)
filter(127-127)filter(216-217)Filter(59-88)
qdrant_client/grpc/points_pb2.pyi (1)
qdrant_client/grpc/qdrant_common_pb2.pyi (6)
PointId(21-38)Filter(59-88)filter(127-127)filter(216-217)Condition(110-147)GeoPoint(42-55)
🪛 Ruff (0.14.5)
qdrant_client/grpc/qdrant_common_pb2.py
23-23: Avoid equality comparisons to False; use not _descriptor._USE_C_DESCRIPTORS: for false checks
Replace with not _descriptor._USE_C_DESCRIPTORS
(E712)
qdrant_client/grpc/__init__.py
3-3: from .qdrant_common_pb2 import * used; unable to detect undefined names
(F403)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Redirect rules - poetic-froyo-8baba7
- GitHub Check: Header rules - poetic-froyo-8baba7
- GitHub Check: Pages changed - poetic-froyo-8baba7
- GitHub Check: Python 3.9.x on ubuntu-latest test
- GitHub Check: Python 3.12.x on ubuntu-latest test
- GitHub Check: Python 3.11.x on ubuntu-latest test
- GitHub Check: Python 3.10.x on ubuntu-latest test
- GitHub Check: Python 3.13.x on ubuntu-latest test
🔇 Additional comments (7)
qdrant_client/grpc/__init__.py (1)
3-3: Re-exporting fromqdrant_common_pb2is correctSwitching the public re-export to
qdrant_common_pb2keeps theqdrant_client.grpcsurface aligned with the renamed common proto and matches the existing*_pb2import pattern here.qdrant_client/proto/qdrant_common.proto (1)
5-5: Java outer classname rename is safeRenaming
java_outer_classnameto"Common"only affects Java codegen class naming and does not change the proto schema or on-the-wire compatibility.qdrant_client/proto/points.proto (1)
7-7: Import now points toqdrant_common.protoUpdating the import from
common.prototoqdrant_common.protocorrectly tracks the renamed shared schema file without changing any message structures here.qdrant_client/proto/collections.proto (1)
7-7: Collections now importqdrant_common.protoThe shared dependency is correctly updated to
qdrant_common.proto, matching the new common schema name and keeping the package namespace unchanged.qdrant_client/grpc/collections_pb2.pyi (1)
12-12: Type hints correctly switched toqdrant_common_pb2.FilterThe stub now imports
qdrant_common_pb2and annotatesReplicatePoints.filter(property and__init__arg) withqdrant_common_pb2.Filter, matching the new shared module and the usage pattern inpoints_pb2.pyi.Also applies to: 2801-2809
qdrant_client/grpc/collections_pb2.py (1)
15-19: No issues found withcollections_pb2.pyproto import changesThe verification confirms that all references throughout the codebase have been correctly updated to use
qdrant_common.protoandqdrant_common_pb2. No stale references to old proto or module names remain. The import aliasqdrant__common__pb2and the DESCRIPTOR blob referencingqdrant_common.protoare both correct.qdrant_client/grpc/points_pb2.pyi (1)
14-4707: Rename toqdrant_common_pb2is consistent across all affected typesThe stub cleanly switches from
common_pb2toqdrant_common_pb2forPointId,Filter,Condition, andGeoPoint(and their repeated containers). The imported symbols exist inqdrant_common_pb2.pyi, there are no leftovercommon_pb2references, and the public typing surface of requests/responses remains structurally identical to the previous version. No further changes needed.
tbung
left a comment
There was a problem hiding this comment.
Are we setting ourselves up to do this again because other generic names like points.proto and collections.proto might also collide? Shouldn't they all be "namespaced"?
I guess we can do that if it comes up again.
We could, but we didn't do that to avoid backward compatibility problems in the clients |
Apparently, pymilvus also has a common.proto file, which after generation didn't allow to import both qdrant_client and pymilvus in the same environment
qdrant/qdrant#7571
#1119
I can confirm that after installing qdrant-client from this branch, I was able to import both libraries in a single environment