Skip to content

fix(rag): name the Qdrant server by host and port - #2733

Merged
dan-petty merged 6 commits into
mainfrom
fix/2709-qdrant-log-host-label
Oct 30, 2026
Merged

dan-petty merged 6 commits into
mainfrom
fix/2709-qdrant-log-host-label

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The configured Qdrant URL can hold userinfo, which the client sends as Basic authentication, and a path. Four places and one error class wrote the whole URL. Each now names the server by host[:port], as the AI client does.

  • qdrant_server_label(url) and QdrantClient.server_label give host[:port] for an http or https URL (server_label of fix(ai): the benchmarks name each server by host and port, never by a configured URL with its password #2481). A k8s:// address gives <service>.<namespace>, plus :<port> when the port is a number. A text with no origin gives unknown.
  • The list_collections debug line and the investigator "unreachable" debug line use the label.
  • InvalidURLError never holds the URL. Its message is Invalid URL for server <label>: <reason>, or Invalid URL: <reason> when the URL has no origin, so the kind of problem stays. The Qdrant reason names qdrant.url. Two reason texts of validate_url no longer repeat the URL.
  • The retriever cache key is (label, sha256 of the base URL, collection). Servers that differ only in scheme or path prefix keep two keys. The key holds no URL.

Change: openspec/changes/archive/2026-10-30-2709-qdrant-log-host-label/

Closes #2709

@dan-petty dan-petty added scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/security Type security: a vulnerability or a leak labels Oct 30, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Targeted tests: 265 passed (tests/test_rag_qdrant_server_label.py, test_exceptions, test_rag_indexer_retriever, test_rag_retriever_filters, test_rag_qdrant, test_rag_qdrant_span, test_rag_investigator, test_validation, test_http, test_pydantic_ai_ollama, test_ai_client_security, test_http_broker, test_qdrant_cluster_addressing).

Fail-to-pass (devops ci fail-to-pass --base origin/main):

ℹ Quality gate root: /workspaces/devops-cli/.data/agent/worktrees/w-2709
  passed on base: tests.test_exceptions::test_config_exceptions
  passed on base: tests.test_exceptions::test_no_error_class_has_an_init_that_only_forwards_to_its_base
  passed on base: tests.test_exceptions::test_one_error_code_maps_to_one_exit_status
  passed on base: tests.test_exceptions::test_ssrf_blocked_error_credentials_and_length_bounded
  passed on base: tests.test_exceptions::test_ssrf_blocked_error
  passed on base: tests.test_exceptions::test_each_error_class_declares_the_codes_of_its_catalog_row
  passed on base: tests.test_exceptions::test_an_error_built_without_an_override_carries_its_class_codes
  passed on base: tests.test_exceptions::test_tool_exceptions
  passed on base: tests.test_exceptions::test_base_devops_cli_error
  passed on base: tests.test_exceptions::test_keyring_unavailable_error
  failed on base: tests.test_exceptions::test_validation_exceptions (assert "Invalid URL ...ported scheme" == 'Invalid URL ...ported scheme')
  passed on base: tests.test_exceptions::test_git_exceptions
  failed on base: tests.test_rag_qdrant_server_label::test_the_search_cache_key_names_the_server_by_label_and_digest[k8s] (ValueError: not enough values to unpack (expected 3, got 2))
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[empty] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kkba/tree/
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[user-only-default-port] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/
  failed on base: tests.test_rag_qdrant_server_label::test_the_error_for_an_invalid_url_names_no_userinfo_and_no_path[host-syntax] (assert "Invalid URL ...me 'a..b.com'" == "Invalid URL ...me 'a..b.com'")
  failed on base: tests.test_rag_qdrant_server_label::test_the_investigator_warning_names_the_server_by_host_and_port[http] (AssertionError: assert 'Qdrant vecto...investigation' == 'Qdrant vecto...investigation')
  failed on base: tests.test_rag_qdrant_server_label::test_the_error_for_an_invalid_url_names_no_userinfo_and_no_path[scheme] (assert "Invalid URL ...http or https" == 'Invalid URL ...http or https')
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[port] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kkba/tree/s
  passed on base: tests.test_rag_qdrant_server_label::test_two_servers_with_one_label_keep_two_cache_keys[scheme]
  failed on base: tests.test_rag_qdrant_server_label::test_the_error_for_an_invalid_url_names_no_userinfo_and_no_path[no-scheme] (assert "Invalid URL ...cheme or host" == 'Invalid URL:...in qdrant.url')
  passed on base: tests.test_rag_qdrant_server_label::test_two_malformed_addresses_that_both_show_unknown_keep_two_cache_keys
  failed on base: tests.test_rag_qdrant_server_label::test_the_broker_veto_of_a_scheme_says_which_problem_it_is (assert "Invalid URL ... be requested" == 'Invalid URL:... be requested')
  failed on base: tests.test_rag_qdrant_server_label::test_the_client_log_line_of_list_collections_names_the_server_by_host_and_port[http] (AssertionError: assert 'Failed to li...ction refused' == 'Failed to li...ction r
  passed on base: tests.test_rag_qdrant_server_label::test_two_servers_with_one_label_keep_two_cache_keys[path-prefix]
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[k8s] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kkba/tree/sr
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[no-scheme] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kkba/t
  failed on base: tests.test_rag_qdrant_server_label::test_the_error_for_a_label_with_no_origin_does_not_read_as_a_url (assert "Invalid URL ... be requested" == 'Invalid URL:... be requested')
  failed on base: tests.test_rag_qdrant_server_label::test_the_error_for_an_invalid_url_names_no_userinfo_and_no_path[no-host] (assert "Invalid URL ...alid hostname" == 'Invalid URL:...alid hostname')
  failed on base: tests.test_rag_qdrant_server_label::test_the_investigator_warning_names_the_server_by_host_and_port[k8s] (AssertionError: assert 'Qdrant vecto...investigation' == 'Qdrant vecto...investigation')
  failed on base: tests.test_rag_qdrant_server_label::test_the_client_log_line_of_list_collections_names_the_server_by_host_and_port[k8s] (AssertionError: assert 'Failed to li...ction refused' == 'Failed to li...ction re
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[k8s-malformed] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kk
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[userinfo-and-path] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyx
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[k8s-userinfo] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_kkb
  failed on base: tests.test_rag_qdrant_server_label::test_the_search_cache_key_names_the_server_by_label_and_digest[http] (ValueError: not enough values to unpack (expected 3, got 2))
  failed on base: tests.test_rag_qdrant_server_label::test_the_label_names_the_server_by_host_and_port[k8s-named-port] (ImportError: cannot import name 'qdrant_server_label' from 'devops_cli.ai.rag.qdrant' (/tmp/tmpyxe_k
22 failed on base (22 failed and 14 passed in tests/test_exceptions.py, tests/test_rag_qdrant_server_label.py; 0 errored).
Elapsed: 29s

@dan-petty
dan-petty marked this pull request as ready for review October 30, 2026 01:41
@dan-petty
dan-petty merged commit 39aca9d into main Oct 30, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2709-qdrant-log-host-label branch October 30, 2026 01:42
dan-petty pushed a commit that referenced this pull request Oct 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.21.4](v0.21.3...v0.21.4)
(2026-10-30)


### Bug Fixes

* **ai:** name each prewarm server by host and port
([#2737](#2737))
([2e2e4fa](2e2e4fa)),
closes [#2676](#2676)
* **ai:** the mcp benchmark tool takes no file path
([#2738](#2738))
([5d5da15](5d5da15)),
closes [#2704](#2704)
* **config:** redact a removed credential in the config copies
([#2734](#2734))
([f663344](f663344)),
closes [#2645](#2645)
* **rag:** name the Qdrant server by host and port
([#2733](#2733))
([39aca9d](39aca9d)),
closes [#2709](#2709)
* **roadmap:** tick turn and kept diff for implement steps
([#2744](#2744))
([890d2a6](890d2a6)),
closes [#2721](#2721)
* **security:** refuse the gh and kubectl keys that run a program
([#2732](#2732))
([ad0bdf1](ad0bdf1)),
closes [#2672](#2672)
* **security:** refuse the keys that make a child write a file
([#2746](#2746))
([1cd187e](1cd187e)),
closes [#2674](#2674)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/security Type security: a vulnerability or a leak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(rag): Qdrant log lines, errors and cache key name the server by host and port, never by the URL with its userinfo

1 participant