[SERVER-48558] Make arguments of setup_multiversion_mongodb.py clear Created: 03/Jun/20  Updated: 06/Dec/22  Resolved: 28/Oct/21

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

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Done Votes: 1
Labels: neweng, tig-multiversion
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 Description   

It's unclear what arguments the script takes. The examples in the help of setup_multiversion_mongodb.py are out-of-date.

Usage: setup_multiversion_mongodb.py [options] ver1 [vers2 ...]
 
Ex: setup_multiversion_mongodb.py --installDir ./install
                                  --linkDir ./link
                                  --edition base
                                  --platform Linux 2.0.6 2.0.3-rc0
                                  --architecture x86_64
                                  2.0 2.2 2.3
Ex: setup_multiversion_mongodb.py --installDir ./install
                                  --linkDir ./link
                                  --edition enterprise
                                  --platform osx
                                  2.4 2.2

To install the latest 4.2 on my ubuntu, I've tried:

  • --edition base --platform ubuntu 4.2
  • --edition base --platform linux 4.2
  • --edition base --platform ubuntu-16.04 4.2
  • --edition base --platform ubuntu-1604 4.2
  • --edition base --platform ubuntu1604 4.2
  • --edition base --platform ubuntu1604 4.2.7
  • --target ubuntu1604 4.2
  • --platform ubuntu1604 4.2

Finally --edition targeted --platform ubuntu1604 4.2.7 worked after reading the python script and running jq on https://downloads.mongodb.org/full.json

Ideally, the script should print out available platforms and versions. The difference between edition "base"/"enterprise"/"targeted" is unclear either. I understand the artifact lists may not be maintained by STM team, but most of the issue is of the usability of setup_multiversion_mongodb.py, so I start with STM team.

Finally, the error message isn't helpful.

$ python3 ./buildscripts/setup_multiversion_mongodb.py --installDir ~/Software/install/ --linkDir ~/Software/link/ --edition base --platform ubuntu1604 4.2.7
Cannot find a link for version 4.2.7, versions {} found.
Traceback (most recent call last):
  File "./buildscripts/setup_multiversion_mongodb.py", line 444, in <module>
    main()
  File "./buildscripts/setup_multiversion_mongodb.py", line 440, in main
    downloader.download_install(version)
  File "./buildscripts/setup_multiversion_mongodb.py", line 185, in download_install
    dl_file = self.download_version(version)
  File "./buildscripts/setup_multiversion_mongodb.py", line 234, in download_version
    "No fall-back generic link available or version {}.".format(version))
Exception: No fall-back generic link available or version 4.2.7.



 Comments   
Comment by Robert Guo (Inactive) [ 28/Oct/21 ]

This request should be fully satisfied by various improvements over the past year. The required arguments (--installDir and --linkDir) are now clearly printed out and the possible variant names etc. are printed if an invalid value is specified; see example below. Additionally, non-required arguments are no longer needed for common Linux platforms and macOS.

(venv) ➜  mongo git:(s61065) ✗ python buildscripts/resmoke.py setup-multiversion -v aasfd -i install -l link master
[2021-10-27 21:50:06,821 - buildscripts.resmokelib.setup_multiversion.setup_multiversion - INFO] 2021-10-27 21:50.06 Setting up version.            version=master
[2021-10-27 21:50:06,821 - buildscripts.resmokelib.setup_multiversion.setup_multiversion - INFO] 2021-10-27 21:50.06 Fetching download URL from Evergreen.
[2021-10-27 21:50:06,821 - buildscripts.resmokelib.setup_multiversion.setup_multiversion - WARNING] 2021-10-27 21:50.06 Latest URL is not available or not requested, falling back to getting the URL for a specific version.
[2021-10-27 21:50:51,004 - buildscripts.resmokelib.setup_multiversion.setup_multiversion - INFO] 2021-10-27 21:50.51 Found git attributes.          commit_hash=772419f3e25c974d9b96e58f3b837ff4e54acd4c git_tag=None
Traceback (most recent call last):
  File "/Users/guo/mongo/buildscripts/resmoke.py", line 14, in <module>
    cli.main(sys.argv)
  File "/Users/guo/mongo/buildscripts/resmokelib/cli.py", line 21, in main
    subcommand.execute()
  File "/Users/guo/mongo/buildscripts/resmokelib/setup_multiversion/setup_multiversion.py", line 181, in execute
    urls_info = self.get_urls(version, self.variant)
  File "/Users/guo/mongo/buildscripts/resmokelib/setup_multiversion/setup_multiversion.py", line 332, in get_urls
    raise ValueError(
ValueError: Buildvariant aasfd not found in evergreen. Available buildvariants can be found in buildscripts/resmokeconfig/setup_multiversion/setup_multiversion_config.yml.

Comment by Brooke Miller [ 08/Jun/20 ]

Whoever picks this up on STM should update the Help message with a link to https://downloads.mongodb.org/full.json. 

Generated at Thu Feb 08 05:17:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.