[SERVER-26104] setup_multiversion_mongodb.py doesn't handle downloading a particular minor version correctly Created: 14/Sep/16  Updated: 21/Nov/16  Resolved: 14/Sep/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.2.10, 3.3.14

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

python buildscripts/setup_multiversion_mongodb.py /data/install /data/multiversion "base" "Linux/x86_64" "3.0.1"

Output

Downloading data for version 3.0.1 (3.0.12)...
Download url is https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.12.tgz
Uncompressing data for version 3.0.1 (3.0.12)...

Sprint: Query 2016-09-19
Participants:
Linked BF Score: 0

 Description   

The link_version.startswith(version) condition is flawed because it doesn't ensure the minor versions of link_version and version are the same.

urls = []
for link_version, link_url in self.links.iteritems():
    if link_version.startswith(version) or link_version == "v%s-latest" % (version):
        # The 'link_version' is a candidate for the requested 'version' if
        #   (a) it is a prefix of the requested version, or if
        #   (b) it is the "<branchname>-latest" version and the requested version is for a
        #       particular major release.
        if "-" in version:
            # The requested 'version' contains a hyphen, so we only consider exact matches
            # to that version.
            if link_version != version:
                continue
        urls.append((link_version, link_url))



 Comments   
Comment by Michael Cahill (Inactive) [ 20/Sep/16 ]

I jumped in and did the backport, since it applied cleanly – we ran into this after bumping WiredTiger in v3.2 (after the 3.2.10-rc0 label was created).

Comment by Githook User [ 20/Sep/16 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-26104 Compare requested version to link's version component-wise.

(cherry picked from commit 9e47e13caf848485a753ade87c0e9d07712835cb)
Branch: v3.2
https://github.com/mongodb/mongo/commit/98327c6718bfb62e8fe8c29fda2d12f4cb4d962d

Comment by Daniel Pasette (Inactive) [ 15/Sep/16 ]

approved for backport

Comment by Max Hirschhorn [ 14/Sep/16 ]

ramon.fernandez, pasette, requesting backport to the 3.2 branch because we also attempt to download a particular minor version of MongoDB (specifically 3.2.1), so we'll actually end up downloading 3.2.10-rc0.

Comment by Githook User [ 14/Sep/16 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-26104 Compare requested version to link's version component-wise.
Branch: master
https://github.com/mongodb/mongo/commit/9e47e13caf848485a753ade87c0e9d07712835cb

Generated at Thu Feb 08 04:11:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.