From c95c4859ece38f2d42bf9b9984e7791532a17ff7 Mon Sep 17 00:00:00 2001 From: Dmitry Rybakov Date: Thu, 29 Jun 2023 18:17:21 +0200 Subject: [PATCH] Add Ruby 3.2 support (#5644) (#5648) * Add Ruby 3.2 support (#5644) * Bring egos back * Revert "Bring egos back" This reverts commit 6367f1f91a0a4572b47abbfe52454c4e60668191. * Bump shared * Remove mentions of Bignum and Fixnum. These were combined into Integer in Ruby 2.4 (#5470) Co-authored-by: shields * Remove rspec-mock-diag * Update specs --------- Co-authored-by: Johnny Shields Co-authored-by: shields --- .evergreen/config.yml | 143 ++-- .evergreen/config/axes.yml.erb | 47 +- .evergreen/config/variants.yml.erb | 82 +- .evergreen/download-mongodb.sh | 787 ++++++++++++++++++ .github/workflows/test.yml | 189 +---- docs/reference/compatibility.txt | 10 + gemfiles/standard.rb | 4 +- lib/mongoid/criteria/queryable/key.rb | 2 +- spec/mongoid/config_spec.rb | 38 +- spec/mongoid/copyable_spec.rb | 2 +- .../queryable/extensions/bignum_spec.rb | 60 -- .../queryable/extensions/fixnum_spec.rb | 60 -- spec/mongoid_spec.rb | 2 +- spec/shared | 2 +- 14 files changed, 1036 insertions(+), 392 deletions(-) create mode 100755 .evergreen/download-mongodb.sh delete mode 100644 spec/mongoid/criteria/queryable/extensions/bignum_spec.rb delete mode 100644 spec/mongoid/criteria/queryable/extensions/fixnum_spec.rb diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 3a7b98985d..1eda42aa3a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -38,16 +38,6 @@ functions: git submodule update --init --recursive - "fetch egos": - - command: shell.exec - params: - working_dir: "src" - script: | - set -ex - - curl -sfLo egos https://raw.githubusercontent.com/p-mongo/egos/master/egos - chmod +x ./egos - "create expansions": # Make an evergreen exapanstion file with dynamic values - command: shell.exec @@ -282,7 +272,8 @@ functions: DRIVER="${DRIVER}" \ I18N="${I18N}" \ TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \ - ./egos .evergreen/run-tests-docker.sh + FLE="${FLE}" \ + .evergreen/run-tests-docker.sh "fix absolute paths": - command: shell.exec @@ -305,7 +296,6 @@ functions: pre: - func: "fetch source" - - func: "fetch egos" - func: "create expansions" - func: "fix absolute paths" - func: "install dependencies" @@ -325,10 +315,18 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: + - id: "latest" + display_name: "MongoDB Latest" + variables: + VERSION: "latest" + - id: "7.0" + display_name: "MongoDB 7.0" + variables: + VERSION: "7.0" - id: "6.0" display_name: "MongoDB 6.0" variables: - VERSION: "5.0" + VERSION: "6.0" - id: "5.3" display_name: "MongoDB 5.3" variables: @@ -414,6 +412,10 @@ axes: display_name: ruby-3.1 variables: RVM_RUBY: "ruby-3.1" + - id: "ruby-3.2" + display_name: ruby-3.2 + variables: + RVM_RUBY: "ruby-3.2" - id: "ruby-head" display_name: ruby-head variables: @@ -430,29 +432,24 @@ axes: - id: "os" display_name: OS values: - - id: ubuntu-16.04 - display_name: "Ubuntu 16.04" - run_on: ubuntu1604-small - variables: - DOCKER_DISTRO: ubuntu1604 - id: ubuntu-18.04 display_name: "Ubuntu 18.04" - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: DOCKER_DISTRO: ubuntu1804 - - id: ubuntu-20.04 + - id: ubuntu-22.04 display_name: "Ubuntu 20.04" run_on: ubuntu2004-small variables: - DOCKER_DISTRO: ubuntu2004 - - id: rhel70 - display_name: "RHEL 7.0" - run_on: rhel70-small + DOCKER_DISTRO: ubuntu2204 + - id: debian11 + display_name: "Debian 11" + run_on: ubuntu2004-small variables: - DOCKER_DISTRO: rhel70 + DOCKER_DISTRO: debian11 - id: rhel80 display_name: "RHEL 8.0" - run_on: rhel80-small + run_on: ubuntu2004-small variables: DOCKER_DISTRO: rhel80 @@ -553,25 +550,48 @@ axes: display_name: Yes variables: APP_TESTS: yes + + - id: "fle" + display_name: FLE + values: + - id: "helper" + display_name: via LMC helper + variables: + FLE: helper + - id: "path" + display_name: via LMC path + variables: + FLE: path buildvariants: -- matrix_name: "ruby-3.1" +- matrix_name: "ruby-3.2" matrix_spec: - ruby: ["ruby-3.1"] + ruby: ["ruby-3.2"] driver: ["current"] topology: '*' mongodb-version: ['6.0'] - os: ubuntu-20.04 + os: debian11 + display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" + tasks: + - name: "test" + +- matrix_name: "mongodb-latest" + matrix_spec: + ruby: ["ruby-3.2"] + driver: ["current"] + topology: '*' + mongodb-version: ['latest'] + os: debian11 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" -- matrix_name: "mongodb-5.3" +- matrix_name: "ruby-3.1" matrix_spec: ruby: ["ruby-3.1"] driver: ["current"] topology: '*' - mongodb-version: ['5.3'] - os: ubuntu-20.04 + mongodb-version: ['6.0'] + os: ubuntu-22.04 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -582,7 +602,7 @@ buildvariants: driver: ["current"] topology: ['replica-set'] mongodb-version: ['5.0'] - os: ubuntu-20.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -593,7 +613,7 @@ buildvariants: driver: ["current"] topology: ['replica-set', 'sharded-cluster'] mongodb-version: '5.0' - os: ubuntu-18.04 + os: rhel80 display_name: "${jruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -604,7 +624,7 @@ buildvariants: driver: ["current"] topology: '*' mongodb-version: ['4.4'] - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -615,7 +635,7 @@ buildvariants: driver: ["current"] topology: ['replica-set'] mongodb-version: ['4.0'] - os: ubuntu-16.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -623,10 +643,10 @@ buildvariants: - matrix_name: "driver-upcoming" matrix_spec: driver: [master, stable] - ruby: ["ruby-3.1"] - mongodb-version: "5.0" + ruby: ["ruby-3.2"] + mongodb-version: "6.0" topology: ['replica-set', 'sharded-cluster'] - os: ubuntu-20.04 + os: debian11 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -637,7 +657,7 @@ buildvariants: ruby: ["ruby-2.6"] mongodb-version: "4.0" topology: ['replica-set', 'sharded-cluster'] - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -648,19 +668,19 @@ buildvariants: ruby: ["ruby-2.6"] mongodb-version: "3.6" topology: "standalone" - os: ubuntu-16.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" - matrix_name: "rails-7" matrix_spec: - ruby: ["ruby-3.0"] + ruby: ["ruby-3.2"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" rails: ['7.0'] - os: ubuntu-20.04 + os: debian11 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -671,7 +691,7 @@ buildvariants: ruby: ["ruby-2.7"] mongodb-version: "5.0" topology: "standalone" - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -682,7 +702,7 @@ buildvariants: ruby: ["ruby-3.0"] mongodb-version: "5.0" topology: "standalone" - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -692,10 +712,10 @@ buildvariants: matrix_spec: ruby: ["ruby-3.0"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" rails: ['6.0', '6.1'] - os: ubuntu-20.04 + os: rhel80 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -707,7 +727,7 @@ buildvariants: mongodb-version: "4.0" topology: "standalone" rails: ['5.2'] - os: ubuntu-18.04 + os: rhel80 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -719,7 +739,7 @@ buildvariants: mongodb-version: "4.4" topology: "standalone" i18n: '1.0' - os: ubuntu-18.04 + os: rhel80 display_name: "i18n-1.0 ${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -732,20 +752,20 @@ buildvariants: topology: "standalone" i18n: '*' test-i18n-fallbacks: yes - os: ubuntu-18.04 + os: rhel80 display_name: "i18n fallbacks ${rails}, ${driver}, ${mongodb-version}, ${i18n}" tasks: - name: "test" - matrix_name: app-tests-ruby-3 matrix_spec: - ruby: ["ruby-3.0", "ruby-3.1"] + ruby: ["ruby-3.0", "ruby-3.1", "ruby-3.2"] driver: ["current"] - mongodb-version: '5.0' + mongodb-version: '6.0' topology: standalone app-tests: yes rails: ['6.0', '6.1', '7.0'] - os: ubuntu-20.04 + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -758,7 +778,7 @@ buildvariants: topology: standalone app-tests: yes rails: ['5.2'] - os: ubuntu-18.04 + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -775,3 +795,16 @@ buildvariants: display_name: "app tests ${driver}, ${jruby}" tasks: - name: "test" + +- matrix_name: "auto-encryption" + matrix_spec: + ruby: ruby-3.1 + driver: current + topology: replica-set + mongodb-version: ['6.0'] + os: ubuntu-22.04 + rails: ['7.0'] + fle: helper + display_name: "FLE: ${rails}, ${driver}, ${mongodb-version}" + tasks: + - name: "test" diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 1ca62621cc..c5e8b8f878 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -2,10 +2,18 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: + - id: "latest" + display_name: "MongoDB Latest" + variables: + VERSION: "latest" + - id: "7.0" + display_name: "MongoDB 7.0" + variables: + VERSION: "7.0" - id: "6.0" display_name: "MongoDB 6.0" variables: - VERSION: "5.0" + VERSION: "6.0" - id: "5.3" display_name: "MongoDB 5.3" variables: @@ -91,6 +99,10 @@ axes: display_name: ruby-3.1 variables: RVM_RUBY: "ruby-3.1" + - id: "ruby-3.2" + display_name: ruby-3.2 + variables: + RVM_RUBY: "ruby-3.2" - id: "ruby-head" display_name: ruby-head variables: @@ -107,29 +119,24 @@ axes: - id: "os" display_name: OS values: - - id: ubuntu-16.04 - display_name: "Ubuntu 16.04" - run_on: ubuntu1604-small - variables: - DOCKER_DISTRO: ubuntu1604 - id: ubuntu-18.04 display_name: "Ubuntu 18.04" - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: DOCKER_DISTRO: ubuntu1804 - - id: ubuntu-20.04 + - id: ubuntu-22.04 display_name: "Ubuntu 20.04" run_on: ubuntu2004-small variables: - DOCKER_DISTRO: ubuntu2004 - - id: rhel70 - display_name: "RHEL 7.0" - run_on: rhel70-small + DOCKER_DISTRO: ubuntu2204 + - id: debian11 + display_name: "Debian 11" + run_on: ubuntu2004-small variables: - DOCKER_DISTRO: rhel70 + DOCKER_DISTRO: debian11 - id: rhel80 display_name: "RHEL 8.0" - run_on: rhel80-small + run_on: ubuntu2004-small variables: DOCKER_DISTRO: rhel80 @@ -230,3 +237,15 @@ axes: display_name: Yes variables: APP_TESTS: yes + + - id: "fle" + display_name: FLE + values: + - id: "helper" + display_name: via LMC helper + variables: + FLE: helper + - id: "path" + display_name: via LMC path + variables: + FLE: path diff --git a/.evergreen/config/variants.yml.erb b/.evergreen/config/variants.yml.erb index 754dce68cf..43098d9f1f 100644 --- a/.evergreen/config/variants.yml.erb +++ b/.evergreen/config/variants.yml.erb @@ -1,22 +1,33 @@ buildvariants: -- matrix_name: "ruby-3.1" +- matrix_name: "ruby-3.2" matrix_spec: - ruby: ["ruby-3.1"] + ruby: ["ruby-3.2"] driver: ["current"] topology: '*' mongodb-version: ['6.0'] - os: ubuntu-20.04 + os: debian11 + display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" + tasks: + - name: "test" + +- matrix_name: "mongodb-latest" + matrix_spec: + ruby: ["ruby-3.2"] + driver: ["current"] + topology: '*' + mongodb-version: ['latest'] + os: debian11 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" -- matrix_name: "mongodb-5.3" +- matrix_name: "ruby-3.1" matrix_spec: ruby: ["ruby-3.1"] driver: ["current"] topology: '*' - mongodb-version: ['5.3'] - os: ubuntu-20.04 + mongodb-version: ['6.0'] + os: ubuntu-22.04 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -27,7 +38,7 @@ buildvariants: driver: ["current"] topology: ['replica-set'] mongodb-version: ['5.0'] - os: ubuntu-20.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -38,7 +49,7 @@ buildvariants: driver: ["current"] topology: ['replica-set', 'sharded-cluster'] mongodb-version: '5.0' - os: ubuntu-18.04 + os: rhel80 display_name: "${jruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -49,7 +60,7 @@ buildvariants: driver: ["current"] topology: '*' mongodb-version: ['4.4'] - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -60,7 +71,7 @@ buildvariants: driver: ["current"] topology: ['replica-set'] mongodb-version: ['4.0'] - os: ubuntu-16.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -68,10 +79,10 @@ buildvariants: - matrix_name: "driver-upcoming" matrix_spec: driver: [master, stable] - ruby: ["ruby-3.1"] - mongodb-version: "5.0" + ruby: ["ruby-3.2"] + mongodb-version: "6.0" topology: ['replica-set', 'sharded-cluster'] - os: ubuntu-20.04 + os: debian11 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -82,7 +93,7 @@ buildvariants: ruby: ["ruby-2.6"] mongodb-version: "4.0" topology: ['replica-set', 'sharded-cluster'] - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -93,19 +104,19 @@ buildvariants: ruby: ["ruby-2.6"] mongodb-version: "3.6" topology: "standalone" - os: ubuntu-16.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" - matrix_name: "rails-7" matrix_spec: - ruby: ["ruby-3.0"] + ruby: ["ruby-3.2"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" rails: ['7.0'] - os: ubuntu-20.04 + os: debian11 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -116,7 +127,7 @@ buildvariants: ruby: ["ruby-2.7"] mongodb-version: "5.0" topology: "standalone" - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -127,7 +138,7 @@ buildvariants: ruby: ["ruby-3.0"] mongodb-version: "5.0" topology: "standalone" - os: ubuntu-18.04 + os: rhel80 display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}" tasks: - name: "test" @@ -137,10 +148,10 @@ buildvariants: matrix_spec: ruby: ["ruby-3.0"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" rails: ['6.0', '6.1'] - os: ubuntu-20.04 + os: rhel80 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -152,7 +163,7 @@ buildvariants: mongodb-version: "4.0" topology: "standalone" rails: ['5.2'] - os: ubuntu-18.04 + os: rhel80 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -164,7 +175,7 @@ buildvariants: mongodb-version: "4.4" topology: "standalone" i18n: '1.0' - os: ubuntu-18.04 + os: rhel80 display_name: "i18n-1.0 ${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -177,20 +188,20 @@ buildvariants: topology: "standalone" i18n: '*' test-i18n-fallbacks: yes - os: ubuntu-18.04 + os: rhel80 display_name: "i18n fallbacks ${rails}, ${driver}, ${mongodb-version}, ${i18n}" tasks: - name: "test" - matrix_name: app-tests-ruby-3 matrix_spec: - ruby: ["ruby-3.0", "ruby-3.1"] + ruby: ["ruby-3.0", "ruby-3.1", "ruby-3.2"] driver: ["current"] - mongodb-version: '5.0' + mongodb-version: '6.0' topology: standalone app-tests: yes rails: ['6.0', '6.1', '7.0'] - os: ubuntu-20.04 + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -203,7 +214,7 @@ buildvariants: topology: standalone app-tests: yes rails: ['5.2'] - os: ubuntu-18.04 + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -220,3 +231,16 @@ buildvariants: display_name: "app tests ${driver}, ${jruby}" tasks: - name: "test" + +- matrix_name: "auto-encryption" + matrix_spec: + ruby: ruby-3.1 + driver: current + topology: replica-set + mongodb-version: ['6.0'] + os: ubuntu-22.04 + rails: ['7.0'] + fle: helper + display_name: "FLE: ${rails}, ${driver}, ${mongodb-version}" + tasks: + - name: "test" diff --git a/.evergreen/download-mongodb.sh b/.evergreen/download-mongodb.sh new file mode 100755 index 0000000000..437152bf4c --- /dev/null +++ b/.evergreen/download-mongodb.sh @@ -0,0 +1,787 @@ +#!/bin/sh + +#For future use the feed to get full list of distros : http://downloads.mongodb.org/full.json + +set -o errexit # Exit the script with error if any of the commands fail + +get_distro () +{ + if [ -f /etc/os-release ]; then + . /etc/os-release + DISTRO="${ID}-${VERSION_ID}" + elif [ -f /etc/centos-release ]; then + version=$(cat /etc/centos-release | tr -dc '0-9.' | cut -d '.' -f1) + DISTRO="centos-${version}" + elif command -v lsb_release >/dev/null 2>&1; then + name=$(lsb_release -s -i) + if [ "$name" = "RedHatEnterpriseServer" ]; then # RHEL 6.2 at least + name="rhel" + fi + version=$(lsb_release -s -r) + DISTRO="${name}-${version}" + elif [ -f /etc/redhat-release ]; then + release=$(cat /etc/redhat-release) + + if [[ "$release" =~ "Red Hat" ]]; then + name="rhel" + elif [[ "$release" =~ "Fedora" ]]; then + name="fedora" + fi + version=$(echo $release | sed 's/.*\([[:digit:]]\).*/\1/g') + DISTRO="${name}-${version}" + elif [ -f /etc/lsb-release ]; then + . /etc/lsb-release + DISTRO="${DISTRIB_ID}-${DISTRIB_RELEASE}" + elif grep -R "Amazon Linux" "/etc/system-release" >/dev/null 2>&1; then + DISTRO="amzn64" + fi + + OS_NAME=$(uname -s) + MARCH=$(uname -m) + DISTRO=$(echo "$OS_NAME-$DISTRO-$MARCH" | tr '[:upper:]' '[:lower:]') + + echo $DISTRO +} + +# get_mongodb_download_url_for "linux-distro-version-architecture" "latest|44|42|40|36|34|32|30|28|26|24" +# Sets EXTRACT to appropriate extract command +# Sets MONGODB_DOWNLOAD_URL to the appropriate download url +# Sets MONGO_CRYPT_SHARED_DOWNLOAD_URL to the corresponding URL to a crypt_shared library archive +get_mongodb_download_url_for () +{ + _DISTRO=$1 + _VERSION=$2 + + VERSION_MONGOSH="1.8.1" + # Set VERSION_RAPID to the latest rapid release each quarter. + VERSION_RAPID="6.3.1" + VERSION_70="7.0.0-rc3" + VERSION_60_LATEST="v6.0-latest" + VERSION_60="6.0.6" + # The perf version must always remain pinned to the same patch + VERSION_60_PERF="6.0.6" + VERSION_50="5.0.17" + VERSION_44="4.4.21" + VERSION_42="4.2.24" + VERSION_40="4.0.28" + VERSION_36="3.6.23" + VERSION_34="3.4.24" + VERSION_32="3.2.22" + VERSION_30="3.0.15" + VERSION_26="2.6.12" + VERSION_24="2.4.14" + + EXTRACT="tar zxf" + EXTRACT_MONGOSH=$EXTRACT + # getdata matrix on: + # https://evergreen.mongodb.com/version/5797f0493ff12235e5001f05 + case "$_DISTRO" in + darwin--arm64) + EXTRACT_MONGOSH="unzip -q" + MONGODB_LATEST="http://downloads.10gen.com/osx/mongodb-macos-arm64-enterprise-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-darwin-arm64.zip" + MONGODB_RAPID="http://downloads.10gen.com/osx/mongodb-macos-arm64-enterprise-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/osx/mongodb-macos-arm64-enterprise-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/osx/mongodb-macos-arm64-enterprise-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/osx/mongodb-macos-arm64-enterprise-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_32}.tgz" + MONGODB_30="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_30}.tgz" + MONGODB_26="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_26}.tgz" + MONGODB_24="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_24}.tgz" + ;; + darwin--x86_64) + EXTRACT_MONGOSH="unzip -q" + MONGODB_LATEST="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-darwin-x64.zip" + MONGODB_RAPID="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/osx/mongodb-osx-x86_64-enterprise-${VERSION_32}.tgz" + MONGODB_30="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_30}.tgz" + MONGODB_26="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_26}.tgz" + MONGODB_24="https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-${VERSION_24}.tgz" + ;; + sunos*i86pc) + MONGODB_LATEST="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-latest.tgz" + MONGODB_34="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-3.4.5.tgz" + MONGODB_32="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-3.2.14.tgz" + MONGODB_30="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-${VERSION_30}.tgz" + MONGODB_26="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-${VERSION_26}.tgz" + MONGODB_24="https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-${VERSION_24}.tgz" + ;; + linux-rhel-9*-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel90-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel90-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel90-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel90-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel90-${VERSION_60}.tgz" + ;; + linux-rhel-9*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-${VERSION_60_LATEST}.tgz" + MONGODB_60_PERF="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-${VERSION_60_PERF}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel90-${VERSION_60}.tgz" + ;; + linux-rhel-8.1-ppc64le) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-ppc64le.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel81-${VERSION_42}.tgz" + ;; + linux-rhel-8*-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel83-${VERSION_50}.tgz" + # SERVER-44074 Added support for RHEL 8 (zSeries) in 5.0.8 and 6.0.0-rc0. + ;; + linux-rhel-8.2-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-${VERSION_RAPID}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-rhel82-${VERSION_44}.tgz" + # SERVER-48282 Added support for RHEL 8 ARM in 4.4.2. + ;; + linux-rocky-8*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_36}.tgz" + ;; + linux-rhel-8*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel80-${VERSION_36}.tgz" + ;; + linux-rhel-7*-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${MONGODB_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-3.6.4.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-3.4.14.tgz" + ;; + linux-rhel-7.1-ppc64le) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-ppc64le.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-${VERSION_32}.tgz" + ;; + linux-rhel-7.*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_32}.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel70-${VERSION_26}.tgz" + ;; + linux-rhel-6*-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + # SERVER-53726 removed support for s390x (zSeries) on RHEL6. + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-4.4.6.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-4.2.18.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-4.0.28.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel67-${VERSION_34}.tgz" + ;; + linux-rhel-6.2*|linux-centos-6*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_32}.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-rhel62-${VERSION_26}.tgz" + MONGODB_24="http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-rhel62-${VERSION_24}.tgz" + ;; + linux-rhel-5.5*) + MONGODB_LATEST="http://downloads.mongodb.org/linux/mongodb-linux-x86_64-rhel55-latest.tgz" + MONGODB_32="http://downloads.mongodb.org/linux/mongodb-linux-x86_64-rhel55-${VERSION_32}.tgz" + MONGODB_30="http://downloads.mongodb.org/linux/mongodb-linux-x86_64-rhel55-${VERSION_30}.tgz" + ;; + linux-sles-11*-x86_64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-latest.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-${VERSION_32}.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse11-${VERSION_26}.tgz" + MONGODB_24="http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-suse11-${VERSION_24}.tgz" + ;; + linux-sles-12*-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-3.6.3.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-suse12-3.4.13.tgz" + ;; + linux-sles-12*-x86_64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-suse12-${VERSION_32}.tgz" + ;; + linux-amzn-2018*-x86_64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_RAPID}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_60_LATEST}.tgz" + # SERVER-50564 Removed support for Amazon Linux (v1) in 6.0.0-rc1. + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-6.0.0-rc0.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_32}.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amzn64-${VERSION_26}.tgz" + MONGODB_24="http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-amzn64-${VERSION_24}.tgz" + ;; + linux-amzn-2-x86_64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-amazon2-${VERSION_40}.tgz" + ;; + linux-amzn-2-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-latest.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-amazon2-${VERSION_42}.tgz" + ;; + linux-debian-7*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-latest.tgz" + # SERVER-32999 removed support for Debian 7. + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-3.6.5.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-3.4.15.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-3.2.20.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian71-${VERSION_26}.tgz" + ;; + linux-debian-8*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian81-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + # SERVER-37767 Removed support for Debian 8 + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian81-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian81-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian81-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian81-${VERSION_32}.tgz" + ;; + linux-debian-9*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + # SERVER-62308 Removed support for Debian 9 in server version 6.0.0-rc5. + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian92-${VERSION_36}.tgz" + ;; + linux-debian-10*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian10-${VERSION_44}.tgz" + ;; + linux-debian-11*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-debian11-${VERSION_50}.tgz" + # SERVER-62299 Added support for Debian 11 in 5.0.8 and 6.0.0-rc0 + ;; + linux-ubuntu-22.04-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2204-${VERSION_44}.tgz" + ;; + linux-ubuntu-22.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-${VERSION_44}.tgz" + ;; + + linux-ubuntu-20.04-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu2004-${VERSION_44}.tgz" + ;; + linux-ubuntu-20.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2004-${VERSION_44}.tgz" + ;; + linux-ubuntu-18.04-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1804-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + # SERVER-32999 removed support for s390x (zSeries) on Ubuntu 18.04. + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1804-4.4.6.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1804-4.2.14.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1804-4.0.25.tgz" + ;; + linux-ubuntu-18.04-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1804-${VERSION_42}.tgz" + ;; + linux-ubuntu-18.04-ppc64le) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1804-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-ppc64le.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1804-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1804-${VERSION_42}.tgz" + ;; + linux-ubuntu-18.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_RAPID="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_RAPID}.tgz" + MONGODB_70="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_70}.tgz" + MONGODB_60_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_60_LATEST}.tgz" + MONGODB_60="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_60}.tgz" + MONGODB_50="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_50}.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1804-${VERSION_36}.tgz" + ;; + linux-ubuntu-16.04-s390x) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1604-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-s390x.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1604-v4.0-latest.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1604-3.6.4.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-ubuntu1604-3.4.14.tgz" + ;; + linux-ubuntu-16.04-ppc64le) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1604-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-ppc64le.tgz" + # SERVER-37774 Removed support for Ubuntu 16.04 PPCLE + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1604-4.0.9.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1604-3.6.12.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-ubuntu1604-3.4.20.tgz" + ;; + linux-ubuntu-16.04-aarch64) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1604-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-arm64.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1604-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-aarch64-enterprise-ubuntu1604-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-arm64-enterprise-ubuntu1604-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-arm64-enterprise-ubuntu1604-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-arm64-enterprise-ubuntu1604-${VERSION_34}.tgz" + ;; + linux-ubuntu-16.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + MONGODB_44="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_44}.tgz" + MONGODB_42="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_42}.tgz" + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_40}.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_36}.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_34}.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1604-${VERSION_32}.tgz" + ;; + linux-ubuntu-14.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + # SERVER-37765 Removed support for Ubuntu 14.04 + MONGODB_40="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-4.0.9.tgz" + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-3.6.12.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.20.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-${VERSION_32}.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-${VERSION_26}.tgz" + ;; + linux-ubuntu-12.04*) + MONGODB_LATEST="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-latest.tgz" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + # SERVER-31535 removed support for Ubuntu 12. + MONGODB_36="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-3.6.3.tgz" + MONGODB_34="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-3.4.14.tgz" + MONGODB_32="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-3.2.19.tgz" + MONGODB_30="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-${VERSION_30}.tgz" + MONGODB_26="http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1204-${VERSION_26}.tgz" + MONGODB_24="http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-ubuntu1204-${VERSION_24}.tgz" + ;; + windows32*) + EXTRACT="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + EXTRACT_MONGOSH="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + MONGODB_32="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_32}.zip" + MONGODB_30="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_30}.zip" + MONGODB_26="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_26}.zip" + MONGODB_24="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_24}.zip" + ;; + windows64*) + # same as cygwin*-86-64 + EXTRACT="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + EXTRACT_MONGOSH="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + MONGODB_LATEST="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-latest.zip" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-win32-x64.zip" + MONGODB_RAPID="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_RAPID}.zip" + MONGODB_70="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_70}.zip" + MONGODB_60_LATEST="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_60_LATEST}.zip" + MONGODB_60="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_60}.zip" + MONGODB_50="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_50}.zip" + MONGODB_44="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_44}.zip" + MONGODB_42="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_42}.zip" + MONGODB_40="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_40}.zip" + MONGODB_36="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_36}.zip" + MONGODB_34="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_34}.zip" + MONGODB_32="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_32}.zip" + MONGODB_30="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_30}.zip" + MONGODB_26="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_26}.zip" + MONGODB_24="https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-${VERSION_24}.zip" + ;; + cygwin*-x86_64) + EXTRACT="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + EXTRACT_MONGOSH="/cygdrive/c/Progra~2/7-Zip/7z.exe x" + MONGODB_LATEST="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-latest.zip" + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-win32-x64.zip" + MONGODB_RAPID="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_RAPID}.zip" + MONGODB_70="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_70}.zip" + MONGODB_60_LATEST="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_60_LATEST}.zip" + MONGODB_60="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_60}.zip" + MONGODB_50="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_50}.zip" + MONGODB_44="http://downloads.10gen.com/windows/mongodb-windows-x86_64-enterprise-${VERSION_44}.zip" + MONGODB_42="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_42}.zip" + MONGODB_40="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_40}.zip" + MONGODB_36="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_36}.zip" + MONGODB_34="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_34}.zip" + MONGODB_32="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_32}.zip" + MONGODB_30="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_30}.zip" + MONGODB_26="http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${VERSION_26}.zip" + MONGODB_24="https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-${VERSION_24}.zip" + ;; + cygwin*-i686) + EXTRACT="/cygdrive/c/Progra~1/7-Zip/7z.exe x" + EXTRACT_MONGOSH="/cygdrive/c/Progra~1/7-Zip/7z.exe x" + MONGODB_32="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_32}.zip" + MONGODB_30="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_30}.zip" + MONGODB_26="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_26}.zip" + MONGODB_24="https://fastdl.mongodb.org/win32/mongodb-win32-i386-${VERSION_24}.zip" + ;; + esac + + # Fallback to generic Linux x86_64 builds (without SSL) when no platform specific link is available. + case "$_DISTRO" in + *linux*x86_64) + MONGODB_LATEST=${MONGODB_LATEST:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-latest.tgz"} + MONGOSH="https://downloads.mongodb.com/compass/mongosh-${VERSION_MONGOSH}-linux-x64.tgz" + # SERVER-37316 Removed support for generic linux builds. + MONGODB_42=${MONGODB_42:-""} + MONGODB_40=${MONGODB_40:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_40}.tgz"} + MONGODB_36=${MONGODB_36:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_36}.tgz"} + MONGODB_34=${MONGODB_34:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_34}.tgz"} + MONGODB_32=${MONGODB_32:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_32}.tgz"} + MONGODB_30=${MONGODB_30:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_30}.tgz"} + MONGODB_26=${MONGODB_26:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_26}.tgz"} + MONGODB_24=${MONGODB_24:-"http://downloads.mongodb.org/linux/mongodb-linux-x86_64-${VERSION_24}.tgz"} + ;; + esac + + # PYTHON-2238 On Archlinux MongoDB <= 3.2 requires LC_ALL=C. + case "$_DISTRO" in + linux-arch-*) + case "$_VERSION" in + 3.2) export LC_ALL=C ;; + 3.0) export LC_ALL=C ;; + 2.6) export LC_ALL=C ;; + 2.4) export LC_ALL=C ;; + esac + ;; + esac + + MONGOSH_DOWNLOAD_URL=$MONGOSH + case "$_VERSION" in + latest) MONGODB_DOWNLOAD_URL=$MONGODB_LATEST ;; + rapid) MONGODB_DOWNLOAD_URL=$MONGODB_RAPID ;; + 7.0) MONGODB_DOWNLOAD_URL=$MONGODB_70 ;; + v6.0-latest) MONGODB_DOWNLOAD_URL=$MONGODB_60_LATEST ;; + v6.0-perf) MONGODB_DOWNLOAD_URL=$MONGODB_60_PERF ;; + 6.0) MONGODB_DOWNLOAD_URL=$MONGODB_60 ;; + 5.0) MONGODB_DOWNLOAD_URL=$MONGODB_50 ;; + 4.4) MONGODB_DOWNLOAD_URL=$MONGODB_44 ;; + 4.2) MONGODB_DOWNLOAD_URL=$MONGODB_42 ;; + 4.0) MONGODB_DOWNLOAD_URL=$MONGODB_40 ;; + 3.6) MONGODB_DOWNLOAD_URL=$MONGODB_36 ;; + 3.4) MONGODB_DOWNLOAD_URL=$MONGODB_34 ;; + 3.2) MONGODB_DOWNLOAD_URL=$MONGODB_32 ;; + 3.0) MONGODB_DOWNLOAD_URL=$MONGODB_30 ;; + 2.6) MONGODB_DOWNLOAD_URL=$MONGODB_26 ;; + 2.4) MONGODB_DOWNLOAD_URL=$MONGODB_24 ;; + esac + + if [ -z "$MONGODB_DOWNLOAD_URL" ]; then + echo "Unknown version: $_VERSION for $_DISTRO" + exit 1 + fi + + # Get the download URL for crypt_shared. + # The crypt_shared package is available on server 6.0 and newer. + # Try to download a version of crypt_shared matching the server version. + # If no matching version is available, try to download the latest Major release of crypt_shared. + case "$_VERSION" in + latest) + # If latest is not at least 6.0 on this OS, the crypt_shared package will not be available. + if [ -n "$MONGODB_60" ]; then + MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_LATEST + fi ;; + rapid) MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_RAPID ;; + 7.0) MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_70 ;; + v6.0-latest) MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_60_LATEST ;; + v6.0-perf) MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_60_PERF ;; + 6.0) MONGO_CRYPT_SHARED_DOWNLOAD_URL=$MONGODB_60 ;; + 5.0 | 4.4 | 4.2 | 4.0 | 3.6 | 3.4 | 3.2 | 3.0 | 2.6 | 2.4) + # Default to using the latest Major release. Major releases are expected yearly. + # MONGODB_60 may be empty if there is no 6.0 download available for this platform. + MONGO_CRYPT_SHARED_DOWNLOAD_URL="$MONGODB_60" + ;; + *) echo "Unknown version '$_VERSION'"; + exit 1; + ;; + esac + + if [ -n "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then + # The crypt_shared package is simply the same file URL with the "mongodb-" + # prefix replaced with "mongo_crypt_shared_v1-" + MONGO_CRYPT_SHARED_DOWNLOAD_URL="$(printf '%s' "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" | sed 's|/mongodb-|/mongo_crypt_shared_v1-|')" + fi + + echo $MONGODB_DOWNLOAD_URL +} + +# curl_retry runs curl with up to three retries, retrying any error. +curl_retry () +{ + for i in 1 2 3; do curl --fail -sS --max-time 300 "$@" && break || sleep 5; + done +} + +# download_and_extract_package downloads a MongoDB server package. +download_and_extract_package () +{ + MONGODB_DOWNLOAD_URL=$1 + EXTRACT=$2 + + cd $DRIVERS_TOOLS + curl_retry $MONGODB_DOWNLOAD_URL --output mongodb-binaries.tgz + $EXTRACT mongodb-binaries.tgz + + rm -f mongodb-binaries.tgz + mv mongodb* mongodb + chmod -R +x mongodb + find . -name vcredist_x64.exe -exec {} /install /quiet \; + ./mongodb/bin/mongod --version + cd - +} + +download_and_extract_mongosh () +{ + MONGOSH_DOWNLOAD_URL=$1 + EXTRACT_MONGOSH=$2 + + cd $DRIVERS_TOOLS + curl_retry $MONGOSH_DOWNLOAD_URL --output mongosh.tgz + $EXTRACT_MONGOSH mongosh.tgz + + rm -f mongosh.tgz + mv mongosh-* mongosh + mv mongosh/bin/* mongodb/bin + chmod -R +x mongodb/bin + echo "MongoDB shell installed. Version:" + ./mongodb/bin/mongosh --version + cd - +} + +# download_and_extract downloads a requested MongoDB server package. +# If the legacy shell is not included in the download, the legacy shell is also downloaded from the 5.0 package. +download_and_extract () +{ + MONGODB_DOWNLOAD_URL=$1 + EXTRACT=$2 + MONGOSH_DOWNLOAD_URL=$3 + EXTRACT_MONGOSH=$4 + + download_and_extract_package "$MONGODB_DOWNLOAD_URL" "$EXTRACT" + + if [ "$MONGOSH_DOWNLOAD_URL" ]; then + download_and_extract_mongosh "$MONGOSH_DOWNLOAD_URL" "$EXTRACT_MONGOSH" + fi + + # Deprecated: this will be removed once drivers have updated to mongosh + if [ -z "${SKIP_LEGACY_SHELL:-}" -a ! -e $DRIVERS_TOOLS/mongodb/bin/mongo -a ! -e $DRIVERS_TOOLS/mongodb/bin/mongo.exe ]; then + # The legacy mongo shell is not included in server downloads of 6.0.0-rc6 or later. Refer: SERVER-64352. + # Some test scripts use the mongo shell for setup. + # Download 5.0 package to get the legacy mongo shell as a workaround until DRIVERS-2328 is addressed. + echo "Legacy 'mongo' shell not detected." + echo "Download legacy shell from 5.0 ... begin" + # Use a subshell to avoid overwriting MONGODB_DOWNLOAD_URL and MONGO_CRYPT_SHARED_DOWNLOAD_URL. + MONGODB50_DOWNLOAD_URL=$( + get_mongodb_download_url_for "$DISTRO" "5.0" > /dev/null + echo $MONGODB_DOWNLOAD_URL + ) + + SAVED_DRIVERS_TOOLS=$DRIVERS_TOOLS + mkdir $DRIVERS_TOOLS/legacy-shell-download + DRIVERS_TOOLS=$DRIVERS_TOOLS/legacy-shell-download + download_and_extract_package "$MONGODB50_DOWNLOAD_URL" "$EXTRACT" + if [ -e $DRIVERS_TOOLS/mongodb/bin/mongo ]; then + cp $DRIVERS_TOOLS/mongodb/bin/mongo $SAVED_DRIVERS_TOOLS/mongodb/bin + elif [ -e $DRIVERS_TOOLS/mongodb/bin/mongo.exe ]; then + cp $DRIVERS_TOOLS/mongodb/bin/mongo.exe $SAVED_DRIVERS_TOOLS/mongodb/bin + fi + DRIVERS_TOOLS=$SAVED_DRIVERS_TOOLS + rm -rf $DRIVERS_TOOLS/legacy-shell-download + echo "Download legacy shell from 5.0 ... end" + fi +} + +# download_and_extract_crypt_shared downloads and extracts a crypt_shared package into the current directory. +# Use get_mongodb_download_url_for to get a MONGO_CRYPT_SHARED_DOWNLOAD_URL. +download_and_extract_crypt_shared () +{ + MONGO_CRYPT_SHARED_DOWNLOAD_URL=$1 + EXTRACT=$2 + __CRYPT_SHARED_LIB_PATH=${3:-CRYPT_SHARED_LIB_PATH} + mkdir crypt_shared_download + cd crypt_shared_download + curl_retry $MONGO_CRYPT_SHARED_DOWNLOAD_URL --output crypt_shared-binaries.tgz + $EXTRACT crypt_shared-binaries.tgz + + LIBRARY_NAME="mongo_crypt_v1" + # Windows package includes .dll in 'bin' directory. + if [ -d ./bin ]; then + cp bin/$LIBRARY_NAME.* .. + else + cp lib/$LIBRARY_NAME.* .. + fi + cd .. + rm -rf crypt_shared_download + + RELATIVE_CRYPT_SHARED_LIB_PATH="$(find . -maxdepth 1 -type f \( -name "$LIBRARY_NAME.dll" -o -name "$LIBRARY_NAME.so" -o -name "$LIBRARY_NAME.dylib" \))" + ABSOLUTE_CRYPT_SHARED_LIB_PATH=$(pwd)/$(basename $RELATIVE_CRYPT_SHARED_LIB_PATH) + if [ "Windows_NT" = "$OS" ]; then + # If we're on Windows, convert the "cygdrive" path to Windows-style paths. + ABSOLUTE_CRYPT_SHARED_LIB_PATH=$(cygpath -m $ABSOLUTE_CRYPT_SHARED_LIB_PATH) + fi + eval $__CRYPT_SHARED_LIB_PATH=$ABSOLUTE_CRYPT_SHARED_LIB_PATH +} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e9ea00fe2..70285f0cab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,9 @@ jobs: fail-fast: false matrix: include: - - mongodb: '5.0' - ruby: ruby-3.1 - topology: server + - mongodb: '6.0' + ruby: ruby-3.2 + topology: replica_set os: ubuntu-20.04 task: test driver: current @@ -28,7 +28,7 @@ jobs: i18n: gemfile: Gemfile experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.1 topology: replica_set os: ubuntu-20.04 @@ -38,17 +38,7 @@ jobs: i18n: gemfile: Gemfile experimental: false - - mongodb: '5.0' - ruby: ruby-3.0 - topology: server - os: ubuntu-20.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.0 topology: replica_set os: ubuntu-20.04 @@ -58,77 +48,7 @@ jobs: i18n: gemfile: Gemfile experimental: false - - mongodb: '5.0' - ruby: jruby-9.3 - topology: replica_set - os: ubuntu-20.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '4.4' - ruby: ruby-2.7 - topology: server - os: ubuntu-20.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '4.4' - ruby: ruby-2.7 - topology: replica_set - os: ubuntu-20.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '4.0' - ruby: ruby-2.6 - topology: server - os: ubuntu-18.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '4.0' - ruby: ruby-2.6 - topology: replica_set - os: ubuntu-18.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '3.6' - ruby: ruby-2.6 - topology: server - os: ubuntu-18.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '3.6' - ruby: ruby-2.6 - topology: replica_set - os: ubuntu-18.04 - task: test - driver: current - rails: - i18n: - gemfile: Gemfile - experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.1 topology: replica_set os: ubuntu-20.04 @@ -138,7 +58,7 @@ jobs: i18n: gemfile: gemfiles/driver_master.gemfile experimental: true - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.0 topology: replica_set os: ubuntu-20.04 @@ -148,37 +68,7 @@ jobs: i18n: gemfile: gemfiles/driver_stable.gemfile experimental: false - - mongodb: '4.0' - ruby: ruby-2.6 - topology: replica_set - os: ubuntu-18.04 - task: test - driver: oldstable - rails: - i18n: - gemfile: gemfiles/driver_oldstable.gemfile - experimental: false - - mongodb: '4.0' - ruby: ruby-2.6 - topology: replica_set - os: ubuntu-18.04 - task: test - driver: min - rails: - i18n: - gemfile: gemfiles/driver_min.gemfile - experimental: false - - mongodb: '3.6' - ruby: ruby-2.6 - topology: server - os: ubuntu-18.04 - task: test - driver: min - rails: - i18n: - gemfile: gemfiles/driver_min.gemfile - experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.1 topology: server os: ubuntu-20.04 @@ -188,7 +78,7 @@ jobs: i18n: gemfile: gemfiles/rails-7.0.gemfile experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.1 topology: server os: ubuntu-20.04 @@ -198,7 +88,7 @@ jobs: i18n: gemfile: gemfiles/rails-6.1.gemfile experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.0 topology: server os: ubuntu-20.04 @@ -208,7 +98,7 @@ jobs: i18n: gemfile: gemfiles/rails-7.0.gemfile experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.0 topology: server os: ubuntu-20.04 @@ -218,7 +108,7 @@ jobs: i18n: gemfile: gemfiles/rails-6.1.gemfile experimental: false - - mongodb: '5.0' + - mongodb: '6.0' ruby: ruby-3.0 topology: server os: ubuntu-20.04 @@ -228,66 +118,67 @@ jobs: i18n: gemfile: gemfiles/rails-6.0.gemfile experimental: false - - mongodb: '4.0' + - mongodb: '6.0' ruby: ruby-2.7 topology: server - os: ubuntu-18.04 + os: ubuntu-20.04 task: test driver: current rails: '5.2' i18n: gemfile: gemfiles/rails-5.2.gemfile experimental: false - - mongodb: '4.4' - ruby: ruby-2.6 + - mongodb: '6.0' + ruby: jruby-9.3 topology: server os: ubuntu-20.04 task: test driver: current - rails: - i18n: '1.0' - gemfile: gemfiles/i18n-1.0.gemfile + rails: '6.0' + i18n: + gemfile: gemfiles/rails-6.0.gemfile experimental: false - - mongodb: '4.2' - ruby: ruby-2.6 - topology: server - os: ubuntu-18.04 + - mongodb: '5.0' + ruby: ruby-3.1 + topology: replica_set + os: ubuntu-20.04 task: test driver: current rails: - i18n: '1.0' - gemfile: gemfiles/i18n-1.0.gemfile + i18n: + gemfile: Gemfile experimental: false - - mongodb: '4.2' - ruby: ruby-2.6 - topology: server - os: ubuntu-18.04 + - mongodb: '4.4' + ruby: ruby-2.7 + topology: replica_set + os: ubuntu-20.04 task: test driver: current rails: - i18n: current + i18n: gemfile: Gemfile experimental: false - - mongodb: '5.0' + - mongodb: '4.0' ruby: ruby-2.7 - topology: server + topology: replica_set os: ubuntu-20.04 task: test driver: current - rails: '5.2' + rails: i18n: - gemfile: gemfiles/rails-5.2.gemfile + gemfile: Gemfile experimental: false - - mongodb: '5.0' - ruby: jruby-9.3 - topology: server + - mongodb: '3.6' + ruby: ruby-2.7 + topology: replica_set os: ubuntu-20.04 task: test driver: current - rails: '6.0' + rails: i18n: - gemfile: gemfiles/rails-6.0.gemfile + gemfile: Gemfile experimental: false + steps: - name: repo checkout uses: actions/checkout@v2 diff --git a/docs/reference/compatibility.txt b/docs/reference/compatibility.txt index 1fea9daa55..85b4bbf4b2 100644 --- a/docs/reference/compatibility.txt +++ b/docs/reference/compatibility.txt @@ -93,6 +93,7 @@ is deprecated. :class: compatibility-large no-padding * - Mongoid + - Ruby 3.2 - Ruby 3.1 - Ruby 3.0 - Ruby 2.7 @@ -109,6 +110,7 @@ is deprecated. - |checkmark| - |checkmark| - |checkmark| + - |checkmark| - - - @@ -118,6 +120,7 @@ is deprecated. * - 8.0 + - - |checkmark| - |checkmark| - |checkmark| @@ -130,6 +133,7 @@ is deprecated. - |checkmark| * - 7.5 + - - |checkmark| - |checkmark| - |checkmark| @@ -142,6 +146,7 @@ is deprecated. - |checkmark| * - 7.4 + - - |checkmark| - |checkmark| - |checkmark| @@ -154,6 +159,7 @@ is deprecated. - * - 7.3 + - - |checkmark| [#mongoid-7.3-ruby-3.0]_ - |checkmark| [#mongoid-7.3-ruby-3.0]_ - |checkmark| @@ -166,6 +172,7 @@ is deprecated. - * - 7.2 + - - |checkmark| [#mongoid-7.2-ruby-3.0]_ - |checkmark| [#mongoid-7.2-ruby-3.0]_ - |checkmark| @@ -178,6 +185,7 @@ is deprecated. - * - 7.1 + - - |checkmark| [#mongoid-7.1-ruby-3.0]_ - |checkmark| [#mongoid-7.1-ruby-3.0]_ - |checkmark| @@ -190,6 +198,7 @@ is deprecated. - * - 7.0 + - - - - |checkmark| @@ -205,6 +214,7 @@ is deprecated. - - - + - - |checkmark| - |checkmark| - |checkmark| [#ruby-2.4]_ diff --git a/gemfiles/standard.rb b/gemfiles/standard.rb index 59c42467b0..d90351cc67 100644 --- a/gemfiles/standard.rb +++ b/gemfiles/standard.rb @@ -18,7 +18,7 @@ def standard_dependencies end group :development, :test do - gem 'rspec-core', '~> 3.10' + gem 'rspec', '~> 3.12' platform :mri do gem 'byebug' @@ -33,8 +33,6 @@ def standard_dependencies gem 'timecop' gem 'rspec-retry' gem 'benchmark-ips' - gem 'rspec-expectations', '~> 3.7', '>= 3.8.4' - gem 'rspec-mocks-diag', '~> 3.0' gem 'fuubar' gem 'rfc' gem 'childprocess' diff --git a/lib/mongoid/criteria/queryable/key.rb b/lib/mongoid/criteria/queryable/key.rb index ebd28cc0d2..1f0ab40b1c 100644 --- a/lib/mongoid/criteria/queryable/key.rb +++ b/lib/mongoid/criteria/queryable/key.rb @@ -91,7 +91,7 @@ def ==(other) # Calculate the hash code for a key. # - # @return [ Fixnum ] The hash code for the key. + # @return [ Integer ] The hash code for the key. def hash [name, operator, expanded].hash end diff --git a/spec/mongoid/config_spec.rb b/spec/mongoid/config_spec.rb index 87ec716efe..a63a125975 100644 --- a/spec/mongoid/config_spec.rb +++ b/spec/mongoid/config_spec.rb @@ -679,24 +679,26 @@ def self.logger it 'passes uuid to driver' do Mongo::Client.should receive(:new).with(SpecConfig.instance.addresses, - auto_encryption_options: { - 'key_vault_namespace' => 'admin.datakeys', - 'kms_providers' => {'local' => {'key' => 'z7iYiYKLuYymEWtk4kfny1ESBwwFdA58qMqff96A8ghiOcIK75lJGPUIocku8LOFjQuEgeIP4xlln3s7r93FV9J5sAE7zg8U'}}, - 'schema_map' => {'blog_development.comments' => { - 'bsonType' => 'object', - 'properties' => { - 'message' => {'encrypt' => { - 'algorithm' => 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic', - 'bsonType' => 'string', - 'keyId' => [BSON::Binary.new("G\xF0 5\xCC@HX\xA2%b\x97\xA9a\xA8\xE7", :uuid)], - }}, - }, - }}}, - database: 'mongoid_test', - platform: "mongoid-#{Mongoid::VERSION}", - wrapping_libraries: [ - {'name' => 'Mongoid', 'version' => Mongoid::VERSION}, - ], + { + auto_encryption_options: { + 'key_vault_namespace' => 'admin.datakeys', + 'kms_providers' => { 'local' => { 'key' => 'z7iYiYKLuYymEWtk4kfny1ESBwwFdA58qMqff96A8ghiOcIK75lJGPUIocku8LOFjQuEgeIP4xlln3s7r93FV9J5sAE7zg8U' } }, + 'schema_map' => { 'blog_development.comments' => { + 'bsonType' => 'object', + 'properties' => { + 'message' => { 'encrypt' => { + 'algorithm' => 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic', + 'bsonType' => 'string', + 'keyId' => [BSON::Binary.new("G\xF0 5\xCC@HX\xA2%b\x97\xA9a\xA8\xE7", :uuid)], + } }, + }, + } } }, + database: 'mongoid_test', + platform: "mongoid-#{Mongoid::VERSION}", + wrapping_libraries: [ + { 'name' => 'Mongoid', 'version' => Mongoid::VERSION }, + ], + } ) client diff --git a/spec/mongoid/copyable_spec.rb b/spec/mongoid/copyable_spec.rb index 412a5c131d..ee6af6c781 100644 --- a/spec/mongoid/copyable_spec.rb +++ b/spec/mongoid/copyable_spec.rb @@ -90,7 +90,7 @@ end it 'calls constructor with explicitly declared attributes only' do - expect(Mongoid::Factory).to receive(:build).with(cls, 'name' => 'test').and_call_original + expect(Mongoid::Factory).to receive(:build).with(cls, { 'name' => 'test' }).and_call_original cloned end end diff --git a/spec/mongoid/criteria/queryable/extensions/bignum_spec.rb b/spec/mongoid/criteria/queryable/extensions/bignum_spec.rb deleted file mode 100644 index 0da6112ee6..0000000000 --- a/spec/mongoid/criteria/queryable/extensions/bignum_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -describe Bignum do - - describe ".evolve" do - - context "when provided a string" do - - context "when the string is a number" do - - context "when the string is an bignum" do - - it "returns an bignum" do - expect(described_class.evolve("1")).to eq(1) - end - end - - context "when the string is a float" do - - it "converts it to a float" do - expect(described_class.evolve("2.23")).to eq(2.23) - end - end - end - - context "when the string is not a number" do - - it "returns the string" do - expect(described_class.evolve("testing")).to eq("testing") - end - end - end - end - - context "when provided a number" do - - context "when the number is an bignum" do - - it "returns an bignum" do - expect(described_class.evolve(1)).to eq(1) - end - end - - context "when the number is a float" do - - it "returns the float" do - expect(described_class.evolve(2.23)).to eq(2.23) - end - end - end - - context "when provided nil" do - - it "returns nil" do - expect(described_class.evolve(nil)).to be_nil - end - end -end diff --git a/spec/mongoid/criteria/queryable/extensions/fixnum_spec.rb b/spec/mongoid/criteria/queryable/extensions/fixnum_spec.rb deleted file mode 100644 index 17a4de06ad..0000000000 --- a/spec/mongoid/criteria/queryable/extensions/fixnum_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -describe Fixnum do - - describe ".evolve" do - - context "when provided a string" do - - context "when the string is a number" do - - context "when the string is an fixnum" do - - it "returns an fixnum" do - expect(described_class.evolve("1")).to eq(1) - end - end - - context "when the string is a float" do - - it "converts it to a float" do - expect(described_class.evolve("2.23")).to eq(2.23) - end - end - end - - context "when the string is not a number" do - - it "returns the string" do - expect(described_class.evolve("testing")).to eq("testing") - end - end - end - end - - context "when provided a number" do - - context "when the number is an fixnum" do - - it "returns an fixnum" do - expect(described_class.evolve(1)).to eq(1) - end - end - - context "when the number is a float" do - - it "returns the float" do - expect(described_class.evolve(2.23)).to eq(2.23) - end - end - end - - context "when provided nil" do - - it "returns nil" do - expect(described_class.evolve(nil)).to be_nil - end - end -end diff --git a/spec/mongoid_spec.rb b/spec/mongoid_spec.rb index 64473fa564..f021a4b5f3 100644 --- a/spec/mongoid_spec.rb +++ b/spec/mongoid_spec.rb @@ -75,7 +75,7 @@ end it "disconnects from all active clients" do - pending "https://jira.mongodb.org/browse/MONGOID-5621" + pending 'https://jira.mongodb.org/browse/MONGOID-5621' clients.each do |client| expect(client.cluster).to receive(:disconnect!).and_call_original diff --git a/spec/shared b/spec/shared index 30e2f1bcab..7b749e36f5 160000 --- a/spec/shared +++ b/spec/shared @@ -1 +1 @@ -Subproject commit 30e2f1bcabe957f76dc412dac3e91077b3cb3715 +Subproject commit 7b749e36f5dede5ad44a7573c88421c34fbef419