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

Open Beginner friendly
#631 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
api, backend

Research direction

Read src/main/java/io/weaviate/client6/v1/internal/VersionSupport.java, especially SemanticVersion.compareTo, and locate the existing tests for VersionSupport. Reproduce the reported results for versions 1.39.13, 2.0.0, 2.5.1, and 10.0.0, then verify that comparison handles major and minor components correctly. Done means 2.x versions are accepted against the 1.32 minimum and the existing 1.x behavior remains correct.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
34
Forks
29
Avg merge
2d 10h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 weaviate/java-client

All issues in weaviate/java-client

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.