-
Notifications
You must be signed in to change notification settings - Fork 65
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
DRIVERS-3002 Use mongodl.py in download-mongodb.sh with starts-with version comparison #529
Conversation
The "starts-with" pattern also addresses the handling of version numbers without a patch version number (e.g. |
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.
LGTM, thank you!
Some error messages added in 9142b70#diff-10255c591aa6273801d14cd261ba71498474b9b21ba02aee1df67e6e9cd60a2fR470 (relating to the The missing |
New error:
|
I think they need to be added to this list: drivers-evergreen-tools/.evergreen/mongodl.py Line 426 in 1f2e86e
|
Ah, I see your comment. I agree, let's merge and iterate. Thank you! |
Reattempt of #525.
Extends the version comparison operator in the DB query of matching download entries from an exact string comparison (
version=:version
) to include a "starts-with" pattern match expression using the LIKE operator. This permitsversion="5.1"
to match"5.1.Z"
, but it will not match a hypothetical"X.5.0"
or"5.10.Z"
. Similarly,version="5"
will matchversion="5.Y.Z"
, but will not match a hypoethetical"50.Y.Z"
. A full version numberversion=5.1.0
will still match"5.1.0"
exactly using the existing exact comparison operator.The extra
version_pattern=f'{version}.%
argument is necessary to workaround syntax errors when the%
is embedded in the query string itself, e.g. writingversion=:version OR version LIKE :version.%
in the query string itself raises an exception (various attempts to escape the%
character failed):