diff --git a/.evergreen/config.yml b/.evergreen/config.yml index cb8ee8e449..5a61bca8e5 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -13,7 +13,7 @@ pre_error_fails_task: true # Actual testing tasks are marked with `type: test` command_type: system -# Protect ourself against rogue test case, or curl gone wild, that runs forever. +# Protect ourselves against rogue test case, or curl gone wild, that runs forever. exec_timeout_secs: 5400 # What to do when evergreen hits the timeout (`post:` tasks are run automatically) @@ -24,6 +24,11 @@ timeout: true functions: + assume-test-secrets-ec2-role: + - command: ec2.assume_role + params: + role_arn: ${aws_test_secrets_role} + "fetch source": # Executes git clone and applies the submitted patch, if any - command: git.get_project @@ -37,7 +42,7 @@ functions: git submodule update --init --recursive - "create expansions": + setup-system: # Make an evergreen expansion file with dynamic values - command: shell.exec params: @@ -88,6 +93,7 @@ functions: export AUTH=${AUTH} export SSL=${SSL} export TOPOLOGY=${TOPOLOGY} + export MLAUNCH_TOPOLOGY=${MLAUNCH_TOPOLOGY} export COMPRESSOR=${COMPRESSOR} export RVM_RUBY="${RVM_RUBY}" export MONGODB_VERSION=${MONGODB_VERSION} @@ -125,12 +131,30 @@ functions: # See what we've done cat expansion.yml - # Load the expansion file to make an evergreen variable with the current # unique version - command: expansions.update params: file: src/expansion.yml + - command: subprocess.exec + params: + binary: bash + include_expansions_in_env: ["PROJECT_DIRECTORY"] + args: + - "${DRIVERS_TOOLS}/.evergreen/setup.sh" + + bootstrap-mongo-orchestration: + - command: subprocess.exec + params: + binary: bash + env: + MONGODB_VERSION: ${MONGODB_VERSION} + include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, + REQUIRE_API_VERSION, LOAD_BALANCER] + args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"] + - command: expansions.update + params: + file: mo-expansion.yml "export AWS auth credentials": - command: shell.exec @@ -179,6 +203,8 @@ functions: export AWS_DEFAULT_REGION="${fle_aws_region}" fi export CSOT_SPEC_TESTS=1 + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \ .evergreen/run-tests.sh @@ -255,40 +281,6 @@ functions: content_type: ${content_type|application/x-gzip} display_name: "mongodb-logs.tar.gz" - "upload working dir": - - command: archive.targz_pack - params: - target: "working-dir.tar.gz" - source_dir: ${PROJECT_DIRECTORY}/ - include: - - "./**" - - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: working-dir.tar.gz - remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-working-dir.tar.gz - bucket: mciuploads - permissions: public-read - content_type: ${content_type|application/x-gzip} - display_name: "working-dir.tar.gz" - - command: archive.targz_pack - params: - target: "drivers-dir.tar.gz" - source_dir: ${DRIVERS_TOOLS} - include: - - "./**" - - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: drivers-dir.tar.gz - remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-drivers-dir.tar.gz - bucket: mciuploads - permissions: public-read - content_type: ${content_type|application/x-gzip} - display_name: "drivers-dir.tar.gz" - "upload test results to s3": - command: s3.put params: @@ -360,11 +352,22 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh - command: perf.send params: file: "${PROJECT_DIRECTORY}/perf.json" + "run tests with orchestration and drivers tools": + - command: subprocess.exec + type: test + params: + binary: bash + working_dir: "src" + include_expansions_in_env: [MONGODB_URI, AUTH, SSL, TOPOLOGY, COMPRESSOR, RVM_RUBY] + args: + - ".evergreen/run-tests-new.sh" "run tests": - command: shell.exec type: test @@ -380,6 +383,8 @@ functions: export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" export AWS_DEFAULT_REGION="${fle_aws_region}" fi + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} .evergreen/run-tests.sh "run AWS auth tests": @@ -390,6 +395,8 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} .evergreen/run-tests-aws-auth.sh "run Kerberos unit tests": @@ -422,13 +429,12 @@ functions: .evergreen/run-tests-atlas.sh pre: + - func: assume-test-secrets-ec2-role - func: "fetch source" - - func: "create expansions" + - func: setup-system post: - func: "delete private environment" - # Removed, causing timeouts - # - func: "upload working dir" - func: "upload mo artifacts" - func: "upload test results" - func: "upload test results to s3" @@ -439,7 +445,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: create expansions + - func: setup-system - command: shell.exec params: shell: "bash" @@ -489,7 +495,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: create expansions + - func: setup-system - command: shell.exec params: shell: "bash" @@ -539,7 +545,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: "create expansions" + - func: setup-system - command: shell.exec params: shell: "bash" @@ -576,7 +582,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: "create expansions" + - func: setup-system - command: shell.exec params: shell: "bash" @@ -616,6 +622,10 @@ task_groups: - testazurekms-task tasks: + - name: "run-main-test-suite" + commands: + - func: bootstrap-mongo-orchestration + - func: "run tests with orchestration and drivers tools" - name: "test-atlas" commands: - func: "run Atlas tests" @@ -747,17 +757,6 @@ tasks: RVM_RUBY: ruby-3.2 MONGODB_URI: ${MONGODB_URI} axes: - - - id: preload - display_name: Preload server - values: - - id: nopreload - display_name: Do not preload - - id: preload - display_name: Preload - variables: - PRELOAD_ARG: -p - - id: "mongodb-version" display_name: MongoDB Version values: @@ -811,23 +810,29 @@ axes: - id: "standalone" display_name: Standalone variables: - TOPOLOGY: standalone + TOPOLOGY: server + MLAUNCH_TOPOLOGY: standalone - id: "replica-set" display_name: Replica Set variables: - TOPOLOGY: replica-set + TOPOLOGY: replica_set + MLAUNCH_TOPOLOGY: replica-set - id: "replica-set-single-node" display_name: Replica Set (Single Node) variables: TOPOLOGY: replica-set-single-node + MLAUNCH_TOPOLOGY: replica-set-single-node - id: "sharded-cluster" display_name: Sharded variables: - TOPOLOGY: sharded-cluster + TOPOLOGY: sharded_cluster + MLAUNCH_TOPOLOGY: sharded-cluster - id: "load-balanced" display_name: Load Balanced variables: - TOPOLOGY: load-balanced + TOPOLOGY: sharded_cluster + MLAUNCH_TOPOLOGY: sharded-cluster + LOAD_BALANCED: 'true' - id: "single-mongos" display_name: Single Mongos @@ -844,7 +849,7 @@ axes: display_name: Auth SSL variables: AUTH: "auth" - SSL: "ssl" + SSL: "yes" - id: "auth-and-nossl" display_name: Auth NoSSL variables: @@ -852,14 +857,14 @@ axes: - id: "noauth-and-ssl" display_name: NoAuth SSL variables: - SSL: "ssl" + SSL: "yes" - id: "noauth-and-nossl" display_name: NoAuth NoSSL - id: "x509" display_name: X.509 variables: AUTH: "x509" - SSL: "ssl" + SSL: "yes" - id: kerberos display_name: Kerberos variables: @@ -888,6 +893,14 @@ axes: - id: "ruby" display_name: Ruby Version values: + - id: "ruby-dev" + display_name: ruby-dev + variables: + RVM_RUBY: "ruby-dev" + - id: "ruby-3.5" + display_name: ruby-3.5 + variables: + RVM_RUBY: "ruby-3.5" - id: "ruby-3.4" display_name: ruby-3.4 variables: @@ -916,25 +929,22 @@ axes: display_name: ruby-2.7 variables: RVM_RUBY: "ruby-2.7" - - id: "ruby-head" - display_name: ruby-head + - id: "jruby-10" + display_name: jruby-10 variables: - RVM_RUBY: "ruby-head" - - id: "jruby-9.3" - display_name: jruby-9.3 - variables: - RVM_RUBY: "jruby-9.3" + RVM_RUBY: "jruby-10" - id: "jruby-9.4" display_name: jruby-9.4 variables: RVM_RUBY: "jruby-9.4" + - id: "jruby-9.3" + display_name: jruby-9.3 + variables: + RVM_RUBY: "jruby-9.3" - id: "os" display_name: OS values: - - id: debian11 - display_name: "Debian 11" - run_on: debian11-small - id: ubuntu2404 display_name: "Ubuntu 24.04" run_on: ubuntu2404-small @@ -953,18 +963,9 @@ axes: - id: ubuntu1804 display_name: "Ubuntu 18.04" run_on: ubuntu1804-small - - - id: docker-distro - display_name: Docker Distro - values: - - id: debian11 - display_name: debian11 - variables: - DOCKER_DISTRO: debian11 - - id: ubuntu2204 - display_name: ubuntu2204 - variables: - DOCKER_DISTRO: ubuntu2204 + - id: debian11 + display_name: "Debian 11" + run_on: debian11-small - id: "compressor" display_name: Compressor @@ -1054,15 +1055,6 @@ axes: variables: BSON: min - - id: storage-engine - display_name: Storage Engine - values: - - id: mmapv1 - display_name: MMAPv1 - run_on: ubuntu2004-small - variables: - MMAPV1: 'true' - - id: "fle" display_name: FLE values: @@ -1156,6 +1148,7 @@ axes: display_name: Yes variables: API_VERSION_REQUIRED: 1 + REQUIRE_API_VERSION: 1 - id: no display_name: No @@ -1189,7 +1182,7 @@ buildvariants: os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-8-arm" matrix_spec: @@ -1199,7 +1192,7 @@ buildvariants: os: ubuntu2404-arm display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-5.x" matrix_spec: @@ -1209,7 +1202,7 @@ buildvariants: os: ubuntu2004 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-4.x" matrix_spec: @@ -1219,7 +1212,7 @@ buildvariants: os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "single-lb" matrix_spec: @@ -1341,16 +1334,16 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: "x509-tests" - matrix_spec: - auth-and-ssl: "x509" - ruby: "ruby-3.3" - mongodb-version: "8.0" - topology: standalone - os: ubuntu2204 - display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" - tasks: - - name: "test-mlaunch" +# - matrix_name: "x509-tests" +# matrix_spec: +# auth-and-ssl: "x509" +# ruby: "ruby-3.3" +# mongodb-version: "8.0" +# topology: standalone +# os: ubuntu2204 +# display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" +# tasks: +# - name: "test-mlaunch" - matrix_name: "jruby-auth" matrix_spec: diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index dbb7dcdc98..3bd44c95ea 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -1,15 +1,4 @@ axes: - - - id: preload - display_name: Preload server - values: - - id: nopreload - display_name: Do not preload - - id: preload - display_name: Preload - variables: - PRELOAD_ARG: -p - - id: "mongodb-version" display_name: MongoDB Version values: @@ -63,23 +52,29 @@ axes: - id: "standalone" display_name: Standalone variables: - TOPOLOGY: standalone + TOPOLOGY: server + MLAUNCH_TOPOLOGY: standalone - id: "replica-set" display_name: Replica Set variables: - TOPOLOGY: replica-set + TOPOLOGY: replica_set + MLAUNCH_TOPOLOGY: replica-set - id: "replica-set-single-node" display_name: Replica Set (Single Node) variables: TOPOLOGY: replica-set-single-node + MLAUNCH_TOPOLOGY: replica-set-single-node - id: "sharded-cluster" display_name: Sharded variables: - TOPOLOGY: sharded-cluster + TOPOLOGY: sharded_cluster + MLAUNCH_TOPOLOGY: sharded-cluster - id: "load-balanced" display_name: Load Balanced variables: - TOPOLOGY: load-balanced + TOPOLOGY: sharded_cluster + MLAUNCH_TOPOLOGY: sharded-cluster + LOAD_BALANCED: 'true' - id: "single-mongos" display_name: Single Mongos @@ -96,7 +91,7 @@ axes: display_name: Auth SSL variables: AUTH: "auth" - SSL: "ssl" + SSL: "yes" - id: "auth-and-nossl" display_name: Auth NoSSL variables: @@ -104,14 +99,14 @@ axes: - id: "noauth-and-ssl" display_name: NoAuth SSL variables: - SSL: "ssl" + SSL: "yes" - id: "noauth-and-nossl" display_name: NoAuth NoSSL - id: "x509" display_name: X.509 variables: AUTH: "x509" - SSL: "ssl" + SSL: "yes" - id: kerberos display_name: Kerberos variables: @@ -140,6 +135,14 @@ axes: - id: "ruby" display_name: Ruby Version values: + - id: "ruby-dev" + display_name: ruby-dev + variables: + RVM_RUBY: "ruby-dev" + - id: "ruby-3.5" + display_name: ruby-3.5 + variables: + RVM_RUBY: "ruby-3.5" - id: "ruby-3.4" display_name: ruby-3.4 variables: @@ -168,25 +171,22 @@ axes: display_name: ruby-2.7 variables: RVM_RUBY: "ruby-2.7" - - id: "ruby-head" - display_name: ruby-head - variables: - RVM_RUBY: "ruby-head" - - id: "jruby-9.3" - display_name: jruby-9.3 + - id: "jruby-10" + display_name: jruby-10 variables: - RVM_RUBY: "jruby-9.3" + RVM_RUBY: "jruby-10" - id: "jruby-9.4" display_name: jruby-9.4 variables: RVM_RUBY: "jruby-9.4" + - id: "jruby-9.3" + display_name: jruby-9.3 + variables: + RVM_RUBY: "jruby-9.3" - id: "os" display_name: OS values: - - id: debian11 - display_name: "Debian 11" - run_on: debian11-small - id: ubuntu2404 display_name: "Ubuntu 24.04" run_on: ubuntu2404-small @@ -205,16 +205,9 @@ axes: - id: ubuntu1804 display_name: "Ubuntu 18.04" run_on: ubuntu1804-small - - - id: docker-distro - display_name: Docker Distro - values: - <% %w(debian11 ubuntu2204).each do |distro| %> - - id: <%= distro %> - display_name: <%= distro %> - variables: - DOCKER_DISTRO: <%= distro %> - <% end %> + - id: debian11 + display_name: "Debian 11" + run_on: debian11-small - id: "compressor" display_name: Compressor @@ -304,15 +297,6 @@ axes: variables: BSON: min - - id: storage-engine - display_name: Storage Engine - values: - - id: mmapv1 - display_name: MMAPv1 - run_on: ubuntu2004-small - variables: - MMAPV1: 'true' - - id: "fle" display_name: FLE values: @@ -403,5 +387,6 @@ axes: display_name: Yes variables: API_VERSION_REQUIRED: 1 + REQUIRE_API_VERSION: 1 - id: no display_name: No diff --git a/.evergreen/config/common.yml.erb b/.evergreen/config/common.yml.erb index f5135a1f44..6534ea51ab 100644 --- a/.evergreen/config/common.yml.erb +++ b/.evergreen/config/common.yml.erb @@ -10,7 +10,7 @@ pre_error_fails_task: true # Actual testing tasks are marked with `type: test` command_type: system -# Protect ourself against rogue test case, or curl gone wild, that runs forever. +# Protect ourselves against rogue test case, or curl gone wild, that runs forever. exec_timeout_secs: 5400 # What to do when evergreen hits the timeout (`post:` tasks are run automatically) @@ -21,6 +21,11 @@ timeout: true functions: + assume-test-secrets-ec2-role: + - command: ec2.assume_role + params: + role_arn: ${aws_test_secrets_role} + "fetch source": # Executes git clone and applies the submitted patch, if any - command: git.get_project @@ -34,7 +39,7 @@ functions: git submodule update --init --recursive - "create expansions": + setup-system: # Make an evergreen expansion file with dynamic values - command: shell.exec params: @@ -85,6 +90,7 @@ functions: export AUTH=${AUTH} export SSL=${SSL} export TOPOLOGY=${TOPOLOGY} + export MLAUNCH_TOPOLOGY=${MLAUNCH_TOPOLOGY} export COMPRESSOR=${COMPRESSOR} export RVM_RUBY="${RVM_RUBY}" export MONGODB_VERSION=${MONGODB_VERSION} @@ -122,12 +128,30 @@ functions: # See what we've done cat expansion.yml - # Load the expansion file to make an evergreen variable with the current # unique version - command: expansions.update params: file: src/expansion.yml + - command: subprocess.exec + params: + binary: bash + include_expansions_in_env: ["PROJECT_DIRECTORY"] + args: + - "${DRIVERS_TOOLS}/.evergreen/setup.sh" + + bootstrap-mongo-orchestration: + - command: subprocess.exec + params: + binary: bash + env: + MONGODB_VERSION: ${MONGODB_VERSION} + include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, + REQUIRE_API_VERSION, LOAD_BALANCER] + args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"] + - command: expansions.update + params: + file: mo-expansion.yml "export AWS auth credentials": - command: shell.exec @@ -176,6 +200,8 @@ functions: export AWS_DEFAULT_REGION="${fle_aws_region}" fi export CSOT_SPEC_TESTS=1 + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \ .evergreen/run-tests.sh @@ -252,40 +278,6 @@ functions: content_type: ${content_type|application/x-gzip} display_name: "mongodb-logs.tar.gz" - "upload working dir": - - command: archive.targz_pack - params: - target: "working-dir.tar.gz" - source_dir: ${PROJECT_DIRECTORY}/ - include: - - "./**" - - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: working-dir.tar.gz - remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-working-dir.tar.gz - bucket: mciuploads - permissions: public-read - content_type: ${content_type|application/x-gzip} - display_name: "working-dir.tar.gz" - - command: archive.targz_pack - params: - target: "drivers-dir.tar.gz" - source_dir: ${DRIVERS_TOOLS} - include: - - "./**" - - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: drivers-dir.tar.gz - remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-drivers-dir.tar.gz - bucket: mciuploads - permissions: public-read - content_type: ${content_type|application/x-gzip} - display_name: "drivers-dir.tar.gz" - "upload test results to s3": - command: s3.put params: @@ -357,11 +349,22 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh - command: perf.send params: file: "${PROJECT_DIRECTORY}/perf.json" + "run tests with orchestration and drivers tools": + - command: subprocess.exec + type: test + params: + binary: bash + working_dir: "src" + include_expansions_in_env: [MONGODB_URI, AUTH, SSL, TOPOLOGY, COMPRESSOR, RVM_RUBY] + args: + - ".evergreen/run-tests-new.sh" "run tests": - command: shell.exec type: test @@ -377,6 +380,8 @@ functions: export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" export AWS_DEFAULT_REGION="${fle_aws_region}" fi + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} .evergreen/run-tests.sh "run AWS auth tests": @@ -387,6 +392,8 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} + unset TOPOLOGY + export TOPOLOGY=${MLAUNCH_TOPOLOGY} .evergreen/run-tests-aws-auth.sh "run Kerberos unit tests": @@ -419,13 +426,12 @@ functions: .evergreen/run-tests-atlas.sh pre: + - func: assume-test-secrets-ec2-role - func: "fetch source" - - func: "create expansions" + - func: setup-system post: - func: "delete private environment" - # Removed, causing timeouts - # - func: "upload working dir" - func: "upload mo artifacts" - func: "upload test results" - func: "upload test results to s3" @@ -436,7 +442,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: create expansions + - func: setup-system - command: shell.exec params: shell: "bash" @@ -486,7 +492,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: create expansions + - func: setup-system - command: shell.exec params: shell: "bash" @@ -536,7 +542,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: "create expansions" + - func: setup-system - command: shell.exec params: shell: "bash" @@ -573,7 +579,7 @@ task_groups: setup_group_timeout_secs: 1800 # 30 minutes setup_group: - func: fetch source - - func: "create expansions" + - func: setup-system - command: shell.exec params: shell: "bash" @@ -613,6 +619,10 @@ task_groups: - testazurekms-task tasks: + - name: "run-main-test-suite" + commands: + - func: bootstrap-mongo-orchestration + - func: "run tests with orchestration and drivers tools" - name: "test-atlas" commands: - func: "run Atlas tests" diff --git a/.evergreen/config/standard.yml.erb b/.evergreen/config/standard.yml.erb index efa8986faa..f255e76718 100644 --- a/.evergreen/config/standard.yml.erb +++ b/.evergreen/config/standard.yml.erb @@ -69,7 +69,7 @@ buildvariants: os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-8-arm" matrix_spec: @@ -79,7 +79,7 @@ buildvariants: os: ubuntu2404-arm display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-5.x" matrix_spec: @@ -89,7 +89,7 @@ buildvariants: os: ubuntu2004 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "mongo-4.x" matrix_spec: @@ -99,7 +99,7 @@ buildvariants: os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - - name: "test-mlaunch" + - name: "run-main-test-suite" - matrix_name: "single-lb" matrix_spec: @@ -221,16 +221,16 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: "x509-tests" - matrix_spec: - auth-and-ssl: "x509" - ruby: <%= latest_ruby %> - mongodb-version: <%= latest_stable_mdb %> - topology: standalone - os: ubuntu2204 - display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" - tasks: - - name: "test-mlaunch" +# - matrix_name: "x509-tests" +# matrix_spec: +# auth-and-ssl: "x509" +# ruby: <%= latest_ruby %> +# mongodb-version: <%= latest_stable_mdb %> +# topology: standalone +# os: ubuntu2204 +# display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" +# tasks: +# - name: "test-mlaunch" - matrix_name: "jruby-auth" matrix_spec: diff --git a/.evergreen/run-tests-aws-auth.sh b/.evergreen/run-tests-aws-auth.sh index c9649e4a64..da508938ae 100755 --- a/.evergreen/run-tests-aws-auth.sh +++ b/.evergreen/run-tests-aws-auth.sh @@ -12,6 +12,8 @@ if test -f .env.private; then . ./.env.private fi +export TOPOLOGY=${MLAUNCH_TOPOLOGY} + # The AWS auth-related Evergreen variables are set the same way for most/all # drivers. Therefore we don't want to change the variable names in order to # transparently benefit from possible updates to these credentials in diff --git a/.evergreen/run-tests-new.sh b/.evergreen/run-tests-new.sh new file mode 100755 index 0000000000..b331b97301 --- /dev/null +++ b/.evergreen/run-tests-new.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +set -e +set -o pipefail + +if echo "$AUTH" |grep -q ^aws; then + # Do not set -x as this will expose passwords in Evergreen logs + set +x +else + set -x +fi + +if test -z "$PROJECT_DIRECTORY"; then + PROJECT_DIRECTORY=`realpath $(dirname $0)/..` +fi + +MRSS_ROOT=`dirname "$0"`/../spec/shared +. $MRSS_ROOT/shlib/distro.sh +. `dirname "$0"`/functions.sh + +arch=`host_distro` + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java + +bundle_install + +if test "$TOPOLOGY" = replica_set; then +echo $MONGODB_URI + bundle exec ruby -Ilib -I.evergreen/lib -rserver_setup -e ServerSetup.new.setup_tags +fi + +bundle exec rake spec:ci +test_status=$? +echo "TEST STATUS: ${test_status}" +set -e + +if test -f tmp/rspec-all.json; then + mv tmp/rspec-all.json tmp/rspec.json +fi + +exit ${test_status} \ No newline at end of file diff --git a/spec/integration/retryable_writes_errors_spec.rb b/spec/integration/retryable_writes_errors_spec.rb index 74619530dd..9ea34a2af5 100644 --- a/spec/integration/retryable_writes_errors_spec.rb +++ b/spec/integration/retryable_writes_errors_spec.rb @@ -210,7 +210,7 @@ end context 'when another mongos is available' do - + skip "https://jira.mongodb.org/browse/RUBY-3737" let(:first_mongos) do Mongo::Client.new( [SpecConfig.instance.addresses.first], diff --git a/spec/integration/secondary_reads_spec.rb b/spec/integration/secondary_reads_spec.rb index 313193b382..53813081ad 100644 --- a/spec/integration/secondary_reads_spec.rb +++ b/spec/integration/secondary_reads_spec.rb @@ -2,6 +2,8 @@ require 'spec_helper' describe 'Secondary reads' do + require_mri + before do root_authorized_client.use('sr')['secondary_reads'].drop root_authorized_client.use('sr')['secondary_reads'].insert_one(test: 1)