Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26104

setup_multiversion_mongodb.py doesn't handle downloading a particular minor version correctly

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      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)...
      

      Show
      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
    • 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))
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: