Commit 56aa1bc
authored
fix: use semantic version comparison instead of string comparison (#34)
Version checks in the /healthz endpoint used string comparison
(e.g. lancedb_version >= "0.5") which is lexicographic, not numeric.
This produces incorrect results for certain version numbers:
"0.9" >= "0.16" evaluates to True as a string comparison, but
0.9 is less than 0.16 semantically.
Replaced with packaging.version.parse() which handles semver
correctly. packaging is available as a transitive dependency
of pip/setuptools.
Fixes #201 parent d83e2ec commit 56aa1bc
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
130 | | - | |
| 130 | + | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
0 commit comments