Details
-
Bug
-
Resolution: Fixed
-
Major
-
master
-
None
-
Untriaged
-
0
-
Unknown
Description
Problem
In tools-common, node versions are compared as strings (e.g. https://github.com/couchbase/tools-common/blob/5105de5e9963241b1e10710d52d4d9640b1ca323/couchbase/value/version.go#L87). This will break when server versions >10 are released e.g. when compared as strings "10.0.0" < "7.6.0". This will lead to the version checks not working.
This problem also affects backup indirectly, from using Older()/Newer()/AtLeast() e.g. https://github.com/couchbase/backup/blob/90b63165f36e815fd8f4c808f37c2f207cf374b3/archive/dir_repo.go#L611
Fix
Don't compare versions as strings. The easiest solution might be to modify the compare() method to parse out the ints separating the major/minor version and compare them properly as ints.
Attachments
Issue Links
- Clones
-
MB-58294 [CLI] Versions are compared as strings
- Resolved
For Gerrit Dashboard: MB-58300 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
203022,4 | MB-58300 Correctly compare semantic versions | master | tools-common | Status: MERGED | +2 | +1 |