v6: VersionSupport rejects every 2.x server (major and minor are concatenated)

未關閉 適合新手
#631 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@Ashlesha-17 已經在處理了。

開始於 2026年11月10日。

  • #636 來自 @Ashlesha-17 —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
java
領域
api, backend

研究方向

閱讀 src/main/java/io/weaviate/client6/v1/internal/VersionSupport.java,尤其是 SemanticVersion.compareTo,並找出 VersionSupport 的既有測試。重現針對版本 1.39.13、2.0.0、2.5.1 和 10.0.0 回報的結果,接著確認比較能正確處理 major 和 minor 部分。完成標準是:相對於最低版本 1.32,2.x 版本會被接受,且既有的 1.x 行為仍然正確。

由索引模型根據 Issue 內容生成。

描述

Summary

VersionSupport.SemanticVersion.compareTo builds an integer by concatenating major and minor ("%d%d"), so 1.32 becomes 132 and 2.0 becomes 20. Any 2.x server is therefore judged older than the 1.32 minimum, and the client refuses to connect with WeaviateUnsupportedVersionException.

https://github.com/weaviate/java-client/blob/ff57caed14df5778ef715132d618383da559c1cc/src/main/java/io/weaviate/client6/v1/internal/VersionSupport.java#L42-L46

Reproduction (client 6.3.2)

VersionSupport.isSupported("1.39.13"); // true
VersionSupport.isSupported("1.100.0"); // true
VersionSupport.isSupported("2.0.0");   // false
VersionSupport.isSupported("2.5.1");   // false
VersionSupport.isSupported("10.0.0");  // false

Expected

Compare major first, then minor (e.g. Comparator.comparingInt(SemanticVersion::major).thenComparingInt(SemanticVersion::minor)). This is latent until a 2.0 server ships, but then every deployed client would refuse to connect.

主要語言
Java
星號
34
分支
29
平均合併
2 天 10 小時
30 天內合併 PR
2

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

weaviate/java-client 的其他 Issue

查看 weaviate/java-client 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。