chore(release): Upgrade self-hosted Weaviate to 1.39 - #38214
chore(release): Upgrade self-hosted Weaviate to 1.39#38214dudanogueira wants to merge 2 commits into
Conversation
|
Hi, thanks for your contribution! Would you like to add some migration docs to docs ? Since this upgrade spans multiple versions, I think having a migration guide is necessary. |
|
hi there! Sure thing. I will still run some tests, but I do not expect and breaking change. We advise to no jump versions. For 1.27 -> 1.27.latest -> 1.28.latest -> etc etc I will mark it as draft while I work on those tests. Also, I am working on exposing some other options, such as compression, different index options and multi tenant support. This can help reducing resource consumption and large scale scenarios. Also, an integration for memory with our recently launched memory layer. Thanks! |
Add a migration guide for the self-hosted Weaviate upgrade (server 1.27→1.38, client 4.20.5→4.22.0), as requested in review of langgenius#38214. Validated end-to-end against a Weaviate instance configured like Dify's `weaviate` service: Dify-shaped data (Vector_index_*_Node, self-provided named vector `default`, cosine, BYO vectors) seeded on 1.27.0 survives the full incremental upgrade ladder 1.27.27 → 1.28.16 → … → 1.38.2 on the same volume — object count, exact properties, exact vectors, near_vector and BM25 all preserved at every rung. Findings captured in the guide: - Upgrade one minor version at a time (latest patch each), matching Weaviate's official guidance; do not skip minors. - Always run the latest patch and stay near the newest minor: patch releases carry the most relevant fixes, and Weaviate backports them to the latest patch of the newest minor and ~3 minors before it — drifting further behind falls out of that fix window. - Stop Weaviate gracefully before each upgrade. A hard kill (SIGKILL) leaves the HNSW commitlog incomplete on reload — objects and vectors survive in the durable object store, but near_vector recall drops until the index rebuilds; a graceful SIGTERM stop preserves the vector index fully. - Newer versions (~1.33+) mount the per-class index a moment after /v1/meta reports ready; a query in that window fails with "non-existing index". Wait/retry after each restart before relying on search. Also bump the bundled pin 1.38.1 → 1.38.2 (latest 1.38 patch) across the three compose files to match the guide.
|
@41tair thanks for the nudge — migration guide added: I validated the upgrade end-to-end rather than just documenting it. Seeded Dify-shaped data (a
At each step the object count, exact properties, exact vectors, Key things the guide calls out (all surfaced during testing):
Also bumped the bundled pin to the latest |
594e56f to
4476fc7
Compare
Add a migration guide for the self-hosted Weaviate upgrade (server 1.27→1.38, client 4.20.5→4.22.0), as requested in review of langgenius#38214. Validated end-to-end against a Weaviate instance configured like Dify's `weaviate` service: Dify-shaped data (Vector_index_*_Node, self-provided named vector `default`, cosine, BYO vectors) seeded on 1.27.0 survives the full incremental upgrade ladder 1.27.27 → 1.28.16 → … → 1.38.2 on the same volume — object count, exact properties, exact vectors, near_vector and BM25 all preserved at every rung. Findings captured in the guide: - Upgrade one minor version at a time (latest patch each), matching Weaviate's official guidance; do not skip minors. - Always run the latest patch and stay near the newest minor: patch releases carry the most relevant fixes, and Weaviate backports them to the latest patch of the newest minor and ~3 minors before it — drifting further behind falls out of that fix window. - Stop Weaviate gracefully before each upgrade. A hard kill (SIGKILL) leaves the HNSW commitlog incomplete on reload — objects and vectors survive in the durable object store, but near_vector recall drops until the index rebuilds; a graceful SIGTERM stop preserves the vector index fully. - Newer versions (~1.33+) mount the per-class index a moment after /v1/meta reports ready; a query in that window fails with "non-existing index". Wait/retry after each restart before relying on search. Also bump the bundled pin 1.38.1 → 1.38.2 (latest 1.38 patch) across the three compose files to match the guide.
Add a migration guide for the self-hosted Weaviate upgrade (server 1.27→1.38, client 4.20.5→4.22.0), as requested in review of langgenius#38214. Validated end-to-end against a Weaviate instance configured like Dify's `weaviate` service: Dify-shaped data (Vector_index_*_Node, self-provided named vector `default`, cosine, BYO vectors) seeded on 1.27.0 survives the full incremental upgrade ladder 1.27.27 → 1.28.16 → … → 1.38.2 on the same volume — object count, exact properties, exact vectors, near_vector and BM25 all preserved at every rung. Findings captured in the guide: - Upgrade one minor version at a time (latest patch each), matching Weaviate's official guidance; do not skip minors. - Always run the latest patch and stay near the newest minor: patch releases carry the most relevant fixes, and Weaviate backports them to the latest patch of the newest minor and ~3 minors before it — drifting further behind falls out of that fix window. - Stop Weaviate gracefully before each upgrade. A hard kill (SIGKILL) leaves the HNSW commitlog incomplete on reload — objects and vectors survive in the durable object store, but near_vector recall drops until the index rebuilds; a graceful SIGTERM stop preserves the vector index fully. - Newer versions (~1.33+) mount the per-class index a moment after /v1/meta reports ready; a query in that window fails with "non-existing index". Wait/retry after each restart before relying on search. Also bump the bundled pin 1.38.1 → 1.38.2 (latest 1.38 patch) across the three compose files to match the guide.
4476fc7 to
f0b185a
Compare
f0b185a to
a9213cc
Compare
Add a migration guide for the self-hosted Weaviate upgrade (server 1.27→1.38, client 4.20.5→4.22.0), as requested in review of langgenius#38214. Validated end-to-end against a Weaviate instance configured like Dify's `weaviate` service: Dify-shaped data (Vector_index_*_Node, self-provided named vector `default`, cosine, BYO vectors) seeded on 1.27.0 survives the full incremental upgrade ladder 1.27.27 → 1.28.16 → … → 1.38.2 on the same volume — object count, exact properties, exact vectors, near_vector and BM25 all preserved at every rung. Findings captured in the guide: - Upgrade one minor version at a time (latest patch each), matching Weaviate's official guidance; do not skip minors. - Always run the latest patch and stay near the newest minor: patch releases carry the most relevant fixes, and Weaviate backports them to the latest patch of the newest minor and ~3 minors before it — drifting further behind falls out of that fix window. - Stop Weaviate gracefully before each upgrade. A hard kill (SIGKILL) leaves the HNSW commitlog incomplete on reload — objects and vectors survive in the durable object store, but near_vector recall drops until the index rebuilds; a graceful SIGTERM stop preserves the vector index fully. - Newer versions (~1.33+) mount the per-class index a moment after /v1/meta reports ready; a query in that window fails with "non-existing index". Wait/retry after each restart before relying on search. Also bump the bundled pin 1.38.1 → 1.38.2 (latest 1.38 patch) across the three compose files to match the guide.
|
hi @41tair !! Can we merge this? Thanks! |
3ee9d3c to
cb0ae64
Compare
Add a migration guide for the self-hosted Weaviate upgrade (server 1.27→1.38, client 4.20.5→4.22.0), as requested in review of langgenius#38214. Validated end-to-end against a Weaviate instance configured like Dify's `weaviate` service: Dify-shaped data (Vector_index_*_Node, self-provided named vector `default`, cosine, BYO vectors) seeded on 1.27.0 survives the full incremental upgrade ladder 1.27.27 → 1.28.16 → … → 1.38.2 on the same volume — object count, exact properties, exact vectors, near_vector and BM25 all preserved at every rung. Findings captured in the guide: - Upgrade one minor version at a time (latest patch each), matching Weaviate's official guidance; do not skip minors. - Always run the latest patch and stay near the newest minor: patch releases carry the most relevant fixes, and Weaviate backports them to the latest patch of the newest minor and ~3 minors before it — drifting further behind falls out of that fix window. - Stop Weaviate gracefully before each upgrade. A hard kill (SIGKILL) leaves the HNSW commitlog incomplete on reload — objects and vectors survive in the durable object store, but near_vector recall drops until the index rebuilds; a graceful SIGTERM stop preserves the vector index fully. - Newer versions (~1.33+) mount the per-class index a moment after /v1/meta reports ready; a query in that window fails with "non-existing index". Wait/retry after each restart before relying on search. Also bump the bundled pin 1.38.1 → 1.38.2 (latest 1.38 patch) across the three compose files to match the guide.
cb0ae64 to
4c2662c
Compare
|
Docs follow-up is up: langgenius/dify-docs#940. It adds That covers the upgrade path for existing self-hosted deployments, so this PR stays a pure deployment-config change. Fresh deployments are unaffected either way. |
The bundled self-hosted Weaviate was pinned to 1.27.0, twelve minors behind the current release. Weaviate backports fixes to the latest patch of roughly the newest four minors, so 1.27 no longer receives them. 1.39.0 ships no breaking changes, and neither the storage format nor Dify's collection layout (Vector_index_<dataset_id>_Node, self-provided named vector "default", cosine) changes, so existing data stays forward compatible with no re-indexing. Also pulls from cr.weaviate.io, the registry Weaviate publishes to directly, and documents WEAVIATE_GRPC_ENDPOINT / EXPOSE_WEAVIATE_GRPC_PORT in the env examples — gRPC has been required since 1.27 but was never spelled out. Existing 1.27 deployments must upgrade one minor at a time; jumping straight to 1.39 is untested upstream.
Sends X-Weaviate-Client-Integration: dify/<version> on both HTTP and gRPC requests, matching the identifier other official Weaviate integrations emit, so the server can attribute traffic to Dify in its telemetry. Registration is best-effort: any failure, including client versions without the integrations API, is swallowed so telemetry can never break client init.
4c2662c to
22471b9
Compare
Summary
Upgrades the bundled self-hosted Weaviate server from
1.27.0to 1.39.0 (the current stable release). Deployment config + a telemetry header; no behavior change to the VDB code path.cr.weaviate.io/semitechnologies/weaviate:1.39.0indocker/docker-compose.yaml,docker/docker-compose.middleware.yaml, anddocker/docker-compose-template.yaml. This also moves the pull from Docker Hub tocr.weaviate.io, the registry Weaviate publishes to directly (the tag Weaviate's own docs point at).WEAVIATE_GRPC_ENDPOINT/EXPOSE_WEAVIATE_GRPC_PORTentries toapi/.env.example, the integration-test env, andmiddleware.env.example. gRPC (50051) has been required since1.27; the examples never documented it.X-Weaviate-Client-Integration: dify/<version>header so Weaviate can attribute traffic to Dify in its server-side telemetry, matching what other official Weaviate integrations emit. Best-effort — any failure (including client versions without theintegrationsAPI) is swallowed and never breaks client init.Why 1.39.0
1.39.0ships no breaking changes (release notes) and is the newest minor, which is where Weaviate's bug and security backports land — deployments more than ~3 minors behind the newest release fall out of that window, and1.27is 12 minors behind. The storage format and Dify's collection layout (Vector_index_<dataset_id>_Node, self-provided named vectordefault, cosine) are unchanged, so existing data is forward compatible with no re-indexing.Upgrade path for existing deployments
Fresh deployments are unaffected. Existing self-hosted
1.27users cannot jump straight to1.39— skipping minors is untested upstream. The supported path is one minor at a time, landing on the latest patch of each, with a graceful stop between rungs (a hard kill leaves the HNSW commit log truncated: objects survive, butnear_vectorrecall silently drops until the index rebuilds).That procedure is user-facing documentation, not repo documentation, so it belongs in dify-docs alongside the existing Weaviate migration guide — whose compatibility matrix currently stops at "tested up to 1.33.1". I'm happy to open that PR (en + zh + ja) and link it here; say the word if you'd rather it land before or alongside this one.
Testing
weaviate-client 4.22.0(the version onmain) verified against a live1.39.0server with a Dify-shaped collection: batch insert,near_vector, BM25, hybrid, byte-exact vector round-trip and delete all pass, over both HTTP and gRPC.providers/vdb/vdb-weaviateunit tests: 47 passed.docker-compose.yamlregenerated fromdocker-compose-template.yamland verified in sync.1.27.0volume through1.38.2— object count, byte-exact vectors,near_vectorrecall and BM25 checked at every rung, plus a hard-kill test that reproduces the truncated-HNSW failure described above. That run predates1.39.0.Screenshots
Checklist
make lint && make type-check(backend) — both pass. Frontendpnpm exec vp stagedN/A (no frontend changes).Fixes #38211