Skip to content

fix: rename common.proto to qdrant_common.proto to avoid conflicts wi…#1125

Merged
joein merged 1 commit into
devfrom
rename-common-proto
Nov 24, 2025
Merged

fix: rename common.proto to qdrant_common.proto to avoid conflicts wi…#1125
joein merged 1 commit into
devfrom
rename-common-proto

Conversation

@joein

@joein joein commented Nov 20, 2025

Copy link
Copy Markdown
Member

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

@netlify

netlify Bot commented Nov 20, 2025

Copy link
Copy Markdown

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 40ce29d
🔍 Latest deploy log https://app.netlify.com/projects/poetic-froyo-8baba7/deploys/691f4b7a68d3500008c7086c
😎 Deploy Preview https://deploy-preview-1125--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Nov 20, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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

  • Large-scale import and reference substitution affecting 9+ files
  • Systematic pattern changes (homogeneous) reduce individual reasoning per file
  • Deletion of common_pb2.py and creation of qdrant_common_pb2.py require verification of completeness
  • Broad public API surface changes across type hints in .pyi files
  • Need to confirm all downstream references were updated consistently

Areas requiring extra attention:

  • Completeness of proto file imports in collections.proto and points.proto
  • Consistency of type hint updates across VectorInput, GetPoints, SearchPoints, RecommendPoints, PointStruct, and related message classes in points_pb2.pyi
  • Correct descriptor initialization and _serialized_start/_serialized_end offset mappings in both collections_pb2.py and qdrant_common_pb2.py
  • Verification that no residual references to common_pb2 remain in other modules outside this diff

Possibly related PRs

Suggested reviewers

  • tbung
  • generall

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.20% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: renaming common.proto to qdrant_common.proto to resolve import conflicts with pymilvus.
Description check ✅ Passed The description directly relates to the changeset, explaining the rationale for renaming common.proto to qdrant_common.proto and referencing relevant issues and upstream PRs.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rename-common-proto

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
qdrant_client/grpc/qdrant_common_pb2.py (1)

1-5: New qdrant_common_pb2 module looks like clean generated output

This 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9ce7346 and 40ce29d.

📒 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 from qdrant_common_pb2 is correct

Switching the public re-export to qdrant_common_pb2 keeps the qdrant_client.grpc surface aligned with the renamed common proto and matches the existing *_pb2 import pattern here.

qdrant_client/proto/qdrant_common.proto (1)

5-5: Java outer classname rename is safe

Renaming java_outer_classname to "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 to qdrant_common.proto

Updating the import from common.proto to qdrant_common.proto correctly tracks the renamed shared schema file without changing any message structures here.

qdrant_client/proto/collections.proto (1)

7-7: Collections now import qdrant_common.proto

The 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 to qdrant_common_pb2.Filter

The stub now imports qdrant_common_pb2 and annotates ReplicatePoints.filter (property and __init__ arg) with qdrant_common_pb2.Filter, matching the new shared module and the usage pattern in points_pb2.pyi.

Also applies to: 2801-2809

qdrant_client/grpc/collections_pb2.py (1)

15-19: No issues found with collections_pb2.py proto import changes

The verification confirms that all references throughout the codebase have been correctly updated to use qdrant_common.proto and qdrant_common_pb2. No stale references to old proto or module names remain. The import alias qdrant__common__pb2 and the DESCRIPTOR blob referencing qdrant_common.proto are both correct.

qdrant_client/grpc/points_pb2.pyi (1)

14-4707: Rename to qdrant_common_pb2 is consistent across all affected types

The stub cleanly switches from common_pb2 to qdrant_common_pb2 for PointId, Filter, Condition, and GeoPoint (and their repeated containers). The imported symbols exist in qdrant_common_pb2.pyi, there are no leftover common_pb2 references, and the public typing surface of requests/responses remains structurally identical to the previous version. No further changes needed.

@tbung tbung left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@joein

joein commented Nov 24, 2025

Copy link
Copy Markdown
Member Author

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

@joein joein merged commit fbeb023 into dev Nov 24, 2025
14 checks passed
joein added a commit that referenced this pull request Nov 24, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Feb 18, 2026
3 tasks
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.

2 participants