Skip to content

Fix: keep Milvus Lite paths out of MILVUS_URI - #179

Merged
zc277584121 merged 3 commits into
zilliztech:mainfrom
code2tan:fix/milvus-lite-env-conflict
Jul 31, 2026
Merged

zc277584121 merged 3 commits into
zilliztech:mainfrom
code2tan:fix/milvus-lite-env-conflict

Conversation

@code2tan

@code2tan code2tan commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

resolve #178

Summary

Docker Compose crashed on the default Milvus Lite path because it exported
MILVUS_URI=/data/milvus.db. pymilvus 3.x parses that environment variable
during import as a remote HTTP(S) URI and rejects the local file path before
MFS can create MilvusClient.

This keeps the fix at the deployment boundary and does not add another public
configuration namespace:

  • Compose no longer sets a Milvus URI by default. MFS_HOME=/data makes the
    existing fallback resolve to /data/milvus.db.
  • Remote MILVUS_URI / MILVUS_TOKEN entries remain available as commented,
    opt-in Compose settings. MILVUS_URI is documented as remote-only.
  • Helm now injects the existing MILVUS_URI / MILVUS_TOKEN variables and
    requires search.uri, since API and worker pods must share a remote vector
    database rather than create separate pod-local Lite files.
  • The server configuration and setup wizard remain unchanged. No
    MFS_MILVUS_* environment variables are introduced.

Verification

  • docker compose config renders without MILVUS_URI or MILVUS_TOKEN in
    the default service environment.
  • helm lint deployments/helm/mfs --set search.uri=https://example.zillizcloud.com
    passes.
  • Helm renders MILVUS_URI and MILVUS_TOKEN for both API and worker pods.
  • Helm rendering without search.uri fails with the intended validation
    message.
  • The default configuration resolves Milvus Lite to $MFS_HOME/milvus.db.
  • Remote MILVUS_URI=https://... still resolves normally.
  • ruff format --check and ruff check pass.
  • 23 configuration and setup-wizard tests pass.

code2t and others added 2 commits July 24, 2026 11:37
…e-only

pymilvus 3.x's orm.connections parses the MILVUS_URI env var at import time
and rejects non-http values, so mfs reusing it to carry a Milvus Lite local
path (e.g. /data/milvus.db) crashed on startup before MilvusClient ran.

Stop using MILVUS_URI for Lite paths:
- Lite: <MFS_HOME>/milvus.db default, or MFS_MILVUS_URI (mfs namespace,
  pymilvus does not read it - the only override safe for a local path)
- Remote: ZILLIZ_URI / MILVUS_URI (pymilvus parses http fine)
- docker-compose passes ZILLIZ_* directly instead of MILVUS_URI
- config reads MFS_MILVUS_URI/MFS_MILVUS_TOKEN as top priority, which also
  fixes Helm: it always injected MFS_MILVUS_* but the server never read them,
  so Helm's Milvus config was silently ignored

No regression: any env that starts today has no MILVUS_URI=<local path>
(it would already crash); docker-compose users are unaffected (default path
is still /data/milvus.db).
@zc277584121 zc277584121 changed the title Fix: use MFS_MILVUS_URI for Milvus Lite paths, keep MILVUS_URI remote-only Fix: keep Milvus Lite paths out of MILVUS_URI Jul 31, 2026
@zc277584121
zc277584121 merged commit a6abe4e into zilliztech:main Jul 31, 2026
10 checks passed
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.

Bug: docker compose failed to start locally

2 participants