IPv6 literal host: QdrantClient builds invalid REST URL and gRPC target

Open Beginner friendly
#1,678 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

  • #1679 by @ivandasch — closed without merging
  • #1703 by @tang-ontheway — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in qdrant_remote.py and connection.py, where the issue shows REST URLs and gRPC targets being assembled; compare how the Go client uses net.JoinHostPort in config.go. Check existing tests for URL parsing and connection targets, then add coverage for bare IPv6 literals with both transports. Done when both client entry points produce valid IPv6 addresses and the relevant tests pass.

Written by the indexing model from the issue text.

Description

Description

QdrantClient cannot connect to a node by its IPv6 address literal, via either entry point:

QdrantClient(url="http://[fd00::1]:6333")   # rest_uri -> "http://fd00::1:6333" (invalid)
QdrantClient(host="fd00::1")                # same for REST + gRPC target "fd00::1:6334"

Root cause

urllib3.util.parse_url().host returns an IPv6 literal without brackets, and the address is then reassembled manually in qdrant_remote.py:

address = f"{self._host}:{self._port}"      # "fd00::1:6333"
base_url = f"{self._scheme}://{address}"    # "http://fd00::1:6333"

and in connection.py:

grpc.insecure_channel(f"{host}:{port}")     # target "fd00::1:6334" — unparsable

Workaround

QdrantClient(host="[fd00::1]", port=6333) — pre-bracketed hosts pass through and work.

Expected

Bare IPv6 literals should work for both transports. The Go client already handles this via net.JoinHostPort (config.go, getAddr).

Dominant language
Python
Stars
1.4k
Forks
409
Avg merge
11d 14h
Merged PRs (30d)
11

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qdrant/qdrant-client

All issues in qdrant/qdrant-client

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.