From e52036b8804278a539d3fc7b36b63467e27657a2 Mon Sep 17 00:00:00 2001 From: Dmitry Rybakov Date: Wed, 11 Oct 2023 16:38:29 +0200 Subject: [PATCH] MONGOID-5689 Add Rails 7.1 support (#5730) --- .evergreen/config.yml | 106 ++-- .evergreen/config/axes.yml.erb | 41 +- .evergreen/config/commands.yml.erb | 4 +- .evergreen/config/variants.yml.erb | 61 +-- .evergreen/download-mongodb.sh | 787 +++++++++++++++++++++++++++++ .evergreen/run-tests.sh | 2 +- docs/reference/compatibility.txt | 11 + gemfiles/rails-7.1.gemfile | 10 + gemfiles/standard.rb | 3 +- lib/mongoid/deprecable.rb | 5 +- lib/mongoid/deprecation.rb | 6 +- lib/mongoid/interceptable.rb | 8 +- mongoid.gemspec | 2 +- spec/mongoid/config_spec.rb | 4 +- spec/mongoid/copyable_spec.rb | 2 +- spec/shared | 2 +- 16 files changed, 940 insertions(+), 114 deletions(-) create mode 100755 .evergreen/download-mongodb.sh create mode 100644 gemfiles/rails-7.1.gemfile diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 0f734bc039..27649a8e58 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -282,7 +282,9 @@ functions: DRIVER="${DRIVER}" \ I18N="${I18N}" \ TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \ - ./egos .evergreen/run-tests.sh + FLE="${FLE}" \ + APP_TESTS="${APP_TESTS}" \ + .evergreen/run-tests-docker.sh "fix absolute paths": - command: shell.exec @@ -325,10 +327,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: @@ -430,29 +440,19 @@ 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 - variables: - DOCKER_DISTRO: ubuntu1804 - - id: ubuntu-20.04 - display_name: "Ubuntu 20.04" + - id: ubuntu-22.04 + display_name: "Ubuntu 22.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 @@ -527,6 +527,10 @@ axes: display_name: "Rails 7.0" variables: RAILS: "7.0" + - id: "7.1" + display_name: "Rails 7.1" + variables: + RAILS: "7.1" - id: "i18n" display_name: I18n version @@ -553,25 +557,26 @@ axes: display_name: Yes variables: APP_TESTS: yes + buildvariants: -- matrix_name: "ruby-3.1" +- matrix_name: "mongodb-latest" matrix_spec: ruby: ["ruby-3.1"] driver: ["current"] topology: '*' - mongodb-version: ['6.0'] - os: ubuntu-20.04 + 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 +587,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 +598,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 +609,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 +620,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" @@ -624,9 +629,9 @@ buildvariants: matrix_spec: driver: [master, stable] ruby: ["ruby-3.1"] - mongodb-version: "5.0" + 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 +642,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 +653,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.1"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" - rails: ['7.0'] - os: ubuntu-20.04 + rails: ['7.0', '7.1'] + os: ubuntu-22.04 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -671,7 +676,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 +687,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 +697,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 +712,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 +724,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,7 +737,7 @@ 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" @@ -741,11 +746,11 @@ buildvariants: matrix_spec: ruby: ["ruby-3.0", "ruby-3.1"] 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 + rails: ['6.0', '6.1', '7.0', '7.1'] + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -758,7 +763,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" @@ -771,7 +776,8 @@ buildvariants: topology: standalone app-tests: yes rails: ['6.0'] - os: ubuntu-18.04 + os: ubuntu-22.04 display_name: "app tests ${driver}, ${jruby}" tasks: - name: "test" + diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 1ca62621cc..2e0e092ee6 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: @@ -107,29 +115,19 @@ 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 - variables: - DOCKER_DISTRO: ubuntu1804 - - id: ubuntu-20.04 - display_name: "Ubuntu 20.04" + - id: ubuntu-22.04 + display_name: "Ubuntu 22.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 @@ -204,6 +202,10 @@ axes: display_name: "Rails 7.0" variables: RAILS: "7.0" + - id: "7.1" + display_name: "Rails 7.1" + variables: + RAILS: "7.1" - id: "i18n" display_name: I18n version @@ -230,3 +232,4 @@ axes: display_name: Yes variables: APP_TESTS: yes + diff --git a/.evergreen/config/commands.yml.erb b/.evergreen/config/commands.yml.erb index 311c3bfe0b..eee7cf31c3 100644 --- a/.evergreen/config/commands.yml.erb +++ b/.evergreen/config/commands.yml.erb @@ -256,7 +256,9 @@ functions: DRIVER="${DRIVER}" \ I18N="${I18N}" \ TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \ - ./egos .evergreen/run-tests.sh + FLE="${FLE}" \ + APP_TESTS="${APP_TESTS}" \ + .evergreen/run-tests-docker.sh "fix absolute paths": - command: shell.exec diff --git a/.evergreen/config/variants.yml.erb b/.evergreen/config/variants.yml.erb index 754dce68cf..5ac616b168 100644 --- a/.evergreen/config/variants.yml.erb +++ b/.evergreen/config/variants.yml.erb @@ -1,22 +1,22 @@ buildvariants: -- matrix_name: "ruby-3.1" +- matrix_name: "mongodb-latest" matrix_spec: ruby: ["ruby-3.1"] driver: ["current"] topology: '*' - mongodb-version: ['6.0'] - os: ubuntu-20.04 + 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 +27,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 +38,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 +49,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 +60,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" @@ -69,9 +69,9 @@ buildvariants: matrix_spec: driver: [master, stable] ruby: ["ruby-3.1"] - mongodb-version: "5.0" + 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 +82,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 +93,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.1"] driver: ["current"] - mongodb-version: "5.0" + mongodb-version: "6.0" topology: "standalone" - rails: ['7.0'] - os: ubuntu-20.04 + rails: ['7.0', '7.1'] + os: ubuntu-22.04 display_name: "${rails}, ${driver}, ${mongodb-version}" tasks: - name: "test" @@ -116,7 +116,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 +127,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 +137,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 +152,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 +164,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,7 +177,7 @@ 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" @@ -186,11 +186,11 @@ buildvariants: matrix_spec: ruby: ["ruby-3.0", "ruby-3.1"] 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 + rails: ['6.0', '6.1', '7.0', '7.1'] + os: rhel80 display_name: "app tests ${driver}, ${ruby}, ${rails}" tasks: - name: "test" @@ -203,7 +203,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" @@ -216,7 +216,8 @@ buildvariants: topology: standalone app-tests: yes rails: ['6.0'] - os: ubuntu-18.04 + os: ubuntu-22.04 display_name: "app tests ${driver}, ${jruby}" 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/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 250be7a1bc..23d421b759 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -26,7 +26,7 @@ fi prepare_server $arch -install_mlaunch_virtualenv +install_mlaunch_venv # Launching mongod under $MONGO_ORCHESTRATION_HOME # makes its log available through log collecting machinery diff --git a/docs/reference/compatibility.txt b/docs/reference/compatibility.txt index ee631db94b..9e61611341 100644 --- a/docs/reference/compatibility.txt +++ b/docs/reference/compatibility.txt @@ -349,6 +349,7 @@ are supported by Mongoid. :class: compatibility-large no-padding * - Mongoid + - Rails 7.1 - Rails 7.0 - Rails 6.1 - Rails 6.0 @@ -356,6 +357,7 @@ are supported by Mongoid. - Rails 5.1 * - 8.0 + - |checkmark| [#rails-7.1]_ - |checkmark| - |checkmark| - |checkmark| @@ -363,6 +365,7 @@ are supported by Mongoid. - * - 7.5 + - - |checkmark| - |checkmark| - |checkmark| @@ -370,6 +373,7 @@ are supported by Mongoid. - D * - 7.4 + - - |checkmark| - |checkmark| - |checkmark| @@ -377,6 +381,7 @@ are supported by Mongoid. - |checkmark| [#rails-5-ruby-3.0]_ * - 7.3 + - - |checkmark| [#rails-7-Mongoid-7.3]_ - |checkmark| - |checkmark| @@ -384,6 +389,7 @@ are supported by Mongoid. - |checkmark| [#rails-5-ruby-3.0]_ * - 7.2 + - - - |checkmark| [#rails-6.1]_ - |checkmark| @@ -391,6 +397,7 @@ are supported by Mongoid. - |checkmark| [#rails-5-ruby-3.0]_ * - 7.1 + - - - |checkmark| [#rails-6.1]_ - |checkmark| @@ -398,6 +405,7 @@ are supported by Mongoid. - |checkmark| * - 7.0 + - - - |checkmark| [#rails-6.1]_ - |checkmark| [#rails-6]_ @@ -408,6 +416,7 @@ are supported by Mongoid. - - - + - - |checkmark| - |checkmark| @@ -420,4 +429,6 @@ are supported by Mongoid. .. [#rails-7-Mongoid-7.3] Rails 7.x requires Mongoid 7.3.4 or later. +.. [#rails-7.1] Rails 7.1 requires Mongoid 8.0.7 or later. + .. include:: /includes/unicode-checkmark.rst diff --git a/gemfiles/rails-7.1.gemfile b/gemfiles/rails-7.1.gemfile new file mode 100644 index 0000000000..4dadf5819f --- /dev/null +++ b/gemfiles/rails-7.1.gemfile @@ -0,0 +1,10 @@ +source 'https://rubygems.org' + +gem 'actionpack', '~> 7.1' +gem 'activemodel', '~> 7.1' + +gemspec path: '..' + +require_relative './standard' + +standard_dependencies diff --git a/gemfiles/standard.rb b/gemfiles/standard.rb index 59c42467b0..01cd7835ea 100644 --- a/gemfiles/standard.rb +++ b/gemfiles/standard.rb @@ -33,8 +33,7 @@ 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 'rspec', '~> 3.12' gem 'fuubar' gem 'rfc' gem 'childprocess' diff --git a/lib/mongoid/deprecable.rb b/lib/mongoid/deprecable.rb index 253aa1ffcd..326cab34fe 100644 --- a/lib/mongoid/deprecable.rb +++ b/lib/mongoid/deprecable.rb @@ -24,10 +24,11 @@ module Deprecable # #=> Mongoid.logger.warn("meow is deprecated and will be removed from Mongoid 8.0 (eat :catnip instead)") # # @param [ Module ] target_module The parent which contains the method. - # @param [ Symbol | Hash ] method_descriptors + # @param [ [ Symbol | Hash ]... ] *method_descriptors # The methods to deprecate, with optional replacement instructions. def deprecate(target_module, *method_descriptors) - Mongoid::Deprecation.deprecate_methods(target_module, *method_descriptors) + @_deprecator ||= Mongoid::Deprecation.new + @_deprecator.deprecate_methods(target_module, *method_descriptors) end end end diff --git a/lib/mongoid/deprecation.rb b/lib/mongoid/deprecation.rb index fd80d2818b..8ca7cfca14 100644 --- a/lib/mongoid/deprecation.rb +++ b/lib/mongoid/deprecation.rb @@ -15,10 +15,10 @@ class Deprecation < ::ActiveSupport::Deprecation # # @return Array The deprecation behavior. def behavior - @behavior ||= Array(->(message, callstack, _deprecation_horizon, _gem_name) { + @behavior ||= Array(->(*args) { logger = Mongoid.logger - logger.warn(message) - logger.debug(callstack.join("\n ")) if debug + logger.warn(args[0]) + logger.debug(args[1].join("\n ")) if debug }) end end diff --git a/lib/mongoid/interceptable.rb b/lib/mongoid/interceptable.rb index 280e4803e8..dd7aea3423 100644 --- a/lib/mongoid/interceptable.rb +++ b/lib/mongoid/interceptable.rb @@ -298,7 +298,13 @@ def run_targeted_callbacks(place, kind) end self.class.send :define_method, name do env = ActiveSupport::Callbacks::Filters::Environment.new(self, false, nil) - sequence = chain.compile + sequence = if chain.method(:compile).arity == 0 + # ActiveSupport < 7.1 + chain.compile + else + # ActiveSupport >= 7.1 + chain.compile(nil) + end sequence.invoke_before(env) env.value = !env.halted sequence.invoke_after(env) diff --git a/mongoid.gemspec b/mongoid.gemspec index 8956951ca8..fed8a63fec 100644 --- a/mongoid.gemspec +++ b/mongoid.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |s| # Ruby 3.0 requires ActiveModel 6.0 or higher. # activemodel 7.0.0 cannot be used due to Class#descendants issue # See: https://github.com/rails/rails/pull/43951 - s.add_dependency("activemodel", ['>=5.1', '<7.1', '!= 7.0.0']) + s.add_dependency("activemodel", ['>=5.1', '<7.2', '!= 7.0.0']) s.add_dependency("mongo", ['>=2.18.0', '<3.0.0']) # The ruby2_keywords gem is recommended for handling argument delegation issues, diff --git a/spec/mongoid/config_spec.rb b/spec/mongoid/config_spec.rb index 55c22e5b70..7b262cd334 100644 --- a/spec/mongoid/config_spec.rb +++ b/spec/mongoid/config_spec.rb @@ -608,7 +608,7 @@ def self.logger it 'passes uuid to driver' do Mongo::Client.should receive(:new).with(SpecConfig.instance.addresses, - auto_encryption_options: { + { auto_encryption_options: { 'key_vault_namespace' => 'admin.datakeys', 'kms_providers' => {'local' => {'key' => 'z7iYiYKLuYymEWtk4kfny1ESBwwFdA58qMqff96A8ghiOcIK75lJGPUIocku8LOFjQuEgeIP4xlln3s7r93FV9J5sAE7zg8U'}}, 'schema_map' => {'blog_development.comments' => { @@ -625,7 +625,7 @@ def self.logger 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 3cceddfbbc..f1eeedee84 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/shared b/spec/shared index f0a579ac02..7b749e36f5 160000 --- a/spec/shared +++ b/spec/shared @@ -1 +1 @@ -Subproject commit f0a579ac0212cde4d8b9d3e7dd38ddf710be0922 +Subproject commit 7b749e36f5dede5ad44a7573c88421c34fbef419