-
Notifications
You must be signed in to change notification settings - Fork 1k
remove semver #1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove semver #1028
Conversation
Why is TestCompareServerVersions failing? |
Looks like it won't parse Side note: MySQL versions are not really semantic: 8.0.11 has 8.0 as major version and not 8 for example. However that shouldn't really matter much. MySQL versions for MariaDB, TiDB, Vitess, etc can be a bit weird: e.g. And Percona versions and MySQL Enterprise and Cloud versions can also have all kinds of suffixes. (e.g. |
Maybe we could/should do version parsing in a way that would be useful to users of the library as well. For example to extract the implementation (MariaDB, TiDB, etc) and the version |
Offering convention checks is unfortunately inconsistent. Noticed semver package being unsupported while investigating what eventually resulted in PeerDB-io/peerdb#2897 since RDS MariaDB returns something like I think keeping scope to the small existing scope is good. Users who want tag info can use Updated PR to remove semver dependency, since we don't really want more than basic triplex comparison |
This change can be an issue if consumers specify only 8.0 instead of 8.0.0 to compare function But hard to define behavior. Likely it should behave as 8.0.x not 8.0.0, skipping patch check. Would only require checking third return value of Cut (or whether numeric string is empty) & returning 0 whenever number missing If that's desirable I can implement with a few test cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
https://github.com/Masterminds/semver we are using v1 which is unmaintained
v3 fails tests since it does not accept tags (
x.y.z-tag
)mysql versions aren't semantic. replace comparison logic to not use semver package