diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 67736ea4dc..1a81531b4e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -168,6 +168,25 @@ functions: EOT + "run CSOT tests": + - command: shell.exec + type: test + params: + shell: bash + working_dir: "src" + script: | + ${PREPARE_SHELL} + # Needed for generating temporary aws credentials. + if [ -n "${FLE}" ]; + then + export AWS_ACCESS_KEY_ID="${fle_aws_key}" + export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" + export AWS_DEFAULT_REGION="${fle_aws_region}" + fi + export CSOT_SPEC_TESTS=1 + 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 + "export FLE credentials": - command: shell.exec type: test @@ -327,7 +346,7 @@ functions: "upload test results": - command: attach.xunit_results params: - file: ./src/tmp/rspec.xml + file: ./src/tmp/*.xml "delete private environment": - command: shell.exec @@ -463,7 +482,7 @@ post: # Removed, causing timeouts # - func: "upload working dir" - func: "upload mo artifacts" - #- func: "upload test results" + - func: "upload test results" - func: "upload test results to s3" task_groups: @@ -833,11 +852,10 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: - - id: "latest" - display_name: "latest" + - id: "8.0" + display_name: "8.0" variables: - MONGODB_VERSION: "latest" - CRYPT_SHARED_VERSION: "latest" + MONGODB_VERSION: "8.0" - id: "7.0" display_name: "7.0" variables: @@ -962,6 +980,10 @@ axes: - id: "ruby" display_name: Ruby Version values: + - id: "ruby-3.3" + display_name: ruby-3.3 + variables: + RVM_RUBY: "ruby-3.3" - id: "ruby-3.2" display_name: ruby-3.2 variables: @@ -1119,7 +1141,7 @@ axes: values: - id: mmapv1 display_name: MMAPv1 - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: MMAPV1: 'true' @@ -1234,7 +1256,7 @@ buildvariants: matrix_spec: auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"] ruby: "ruby-3.2" - mongodb-version: ["7.0", "6.0"] + mongodb-version: ["8.0", "7.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu2204 display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology} @@ -1244,7 +1266,7 @@ buildvariants: - matrix_name: "mongo-recent" matrix_spec: ruby: ["ruby-3.2", "ruby-3.1", "jruby-9.4"] - mongodb-version: ["7.0", "6.0"] + mongodb-version: ["8.0", "7.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${ruby}" @@ -1254,7 +1276,7 @@ buildvariants: - matrix_name: "mongo-recent-arm" matrix_spec: ruby: "ruby-3.2" - mongodb-version: ["7.0", "6.0"] + mongodb-version: ["8.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu2204-arm display_name: "${mongodb-version} ${os} ${topology} ${ruby}" @@ -1263,28 +1285,18 @@ buildvariants: - matrix_name: "mongo-5.x" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] - mongodb-version: '5.0' + ruby: ["ruby-3.3", "ruby-3.2"] + mongodb-version: ['5.0'] topology: ["standalone", "replica-set", "sharded-cluster"] - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${ruby}" + os: ubuntu2004 + display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - name: "test-mlaunch" - matrix_name: "mongo-4.x" matrix_spec: ruby: ["ruby-3.0", "ruby-2.7"] - mongodb-version: ['4.4', '4.2', '4.0'] - topology: ["standalone", "replica-set", "sharded-cluster"] - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${ruby}" - tasks: - - name: "test-mlaunch" - - - matrix_name: "mongo-3.6" - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6'] + mongodb-version: ['4.4', '4.2'] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${ruby}" @@ -1346,17 +1358,6 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: mmapv1 - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6', '4.0'] - topology: ["standalone", "replica-set", "sharded-cluster"] - storage-engine: mmapv1 - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} mmapv1 ${ruby}" - tasks: - - name: "test-mlaunch" - - matrix_name: "lint" matrix_spec: lint: on @@ -1393,8 +1394,8 @@ buildvariants: - matrix_name: "stress older" matrix_spec: stress: on - ruby: ["ruby-2.7"] - mongodb-version: ['4.2', '4.0', '3.6'] + ruby: "ruby-2.7" + mongodb-version: ['4.4', '4.2'] topology: replica-set os: ubuntu1804 display_name: "${mongodb-version} ${topology} stress ${ruby}" @@ -1405,7 +1406,7 @@ buildvariants: matrix_spec: stress: on ruby: "ruby-3.2" - mongodb-version: ["6.0", "5.0"] + mongodb-version: ["8.0", "7.0"] topology: replica-set os: ubuntu2004 display_name: "${mongodb-version} ${topology} stress ${ruby}" @@ -1437,7 +1438,7 @@ buildvariants: - matrix_name: "zlib" matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] + ruby: ["ruby-3.3", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: "replica-set" compressor: 'zlib' @@ -1449,7 +1450,7 @@ buildvariants: - matrix_name: "snappy" matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] + ruby: ["ruby-3.3", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: "replica-set" compressor: 'snappy' @@ -1465,7 +1466,7 @@ buildvariants: - matrix_name: "zstd-auth" matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] mongodb-version: "7.0" topology: "replica-set" compressor: 'zstd' @@ -1476,7 +1477,7 @@ buildvariants: - matrix_name: "activesupport" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] + ruby: ["ruby-3.3", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: replica-set as: as @@ -1487,7 +1488,7 @@ buildvariants: - matrix_name: "bson" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] + ruby: ["ruby-3.3", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: replica-set bson: "*" @@ -1531,7 +1532,7 @@ buildvariants: # enough to install mongosh, and then use either mongo or mongosh # (depending on server version and what's available), we can bump this to # the latest stable db version. - mongodb-version: "5.0" + mongodb-version: '5.0' os: ubuntu2004 display_name: "AWS ${auth-and-ssl} ${mongodb-version} ${ruby}" tasks: @@ -1554,7 +1555,7 @@ buildvariants: ocsp-algorithm: ecdsa ocsp-must-staple: on ocsp-delegate: on - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1567,7 +1568,7 @@ buildvariants: matrix_spec: ocsp-algorithm: rsa ocsp-status: unknown - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1583,7 +1584,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "none" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1597,7 +1598,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "none" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1611,7 +1612,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: fail extra-uri-options: "none" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1625,7 +1626,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsInsecure=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1639,7 +1640,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsInsecure=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1653,7 +1654,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsInsecure=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1667,7 +1668,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsAllowInvalidCertificates=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1681,7 +1682,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsAllowInvalidCertificates=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1695,7 +1696,7 @@ buildvariants: ocsp-delegate: '*' ocsp-connectivity: pass extra-uri-options: "tlsAllowInvalidCertificates=true" - ruby: ["ruby-3.2", "ruby-2.7"] + ruby: ["ruby-3.3", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: ubuntu2004 @@ -1763,10 +1764,11 @@ buildvariants: tasks: - name: testatlas_task_group - - matrix_name: "aws-lambda" - matrix_spec: - ruby: 'ruby-3.2' - os: ubuntu2204 - display_name: "AWS Lambda" - tasks: - - name: test_aws_lambda_task_group +# https://jira.mongodb.org/browse/RUBY-3311 +# - matrix_name: "aws-lambda" +# matrix_spec: +# ruby: 'ruby-3.2' +# os: ubuntu2204 +# display_name: "AWS Lambda" +# tasks: +# - name: test_aws_lambda_task_group diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 4b2da7ab10..504509d12b 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -13,11 +13,10 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: - - id: "latest" - display_name: "latest" + - id: "8.0" + display_name: "8.0" variables: - MONGODB_VERSION: "latest" - CRYPT_SHARED_VERSION: "latest" + MONGODB_VERSION: "8.0" - id: "7.0" display_name: "7.0" variables: @@ -142,6 +141,10 @@ axes: - id: "ruby" display_name: Ruby Version values: + - id: "ruby-3.3" + display_name: ruby-3.3 + variables: + RVM_RUBY: "ruby-3.3" - id: "ruby-3.2" display_name: ruby-3.2 variables: @@ -297,7 +300,7 @@ axes: values: - id: mmapv1 display_name: MMAPv1 - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: MMAPV1: 'true' diff --git a/.evergreen/config/common.yml.erb b/.evergreen/config/common.yml.erb index 19cddacaca..c6004d6070 100644 --- a/.evergreen/config/common.yml.erb +++ b/.evergreen/config/common.yml.erb @@ -165,6 +165,25 @@ functions: EOT + "run CSOT tests": + - command: shell.exec + type: test + params: + shell: bash + working_dir: "src" + script: | + ${PREPARE_SHELL} + # Needed for generating temporary aws credentials. + if [ -n "${FLE}" ]; + then + export AWS_ACCESS_KEY_ID="${fle_aws_key}" + export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" + export AWS_DEFAULT_REGION="${fle_aws_region}" + fi + export CSOT_SPEC_TESTS=1 + 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 + "export FLE credentials": - command: shell.exec type: test @@ -324,7 +343,7 @@ functions: "upload test results": - command: attach.xunit_results params: - file: ./src/tmp/rspec.xml + file: ./src/tmp/*.xml "delete private environment": - command: shell.exec @@ -460,7 +479,7 @@ post: # Removed, causing timeouts # - func: "upload working dir" - func: "upload mo artifacts" - #- func: "upload test results" + - func: "upload test results" - func: "upload test results to s3" task_groups: diff --git a/.evergreen/config/standard.yml.erb b/.evergreen/config/standard.yml.erb index 53bf417758..133633cb87 100644 --- a/.evergreen/config/standard.yml.erb +++ b/.evergreen/config/standard.yml.erb @@ -8,8 +8,10 @@ # these are used for testing against a few recent ruby versions recent_rubies = %w( ruby-3.2 ruby-3.1 jruby-9.4 ) - # this is a list of the most most recent 3.x and 2.x MRI ruby versions - sample_mri_rubies = %w( ruby-3.2 ruby-2.7 ) + recent_mri_rubies = %w( ruby-3.3 ruby-3.2 ) + + # this is a list of the most recent 3.x and 2.x MRI ruby versions + sample_mri_rubies = %w( ruby-3.3 ruby-2.7 ) # as above, but including the most recent JRuby release sample_rubies = sample_mri_rubies + %w( jruby-9.4 ) @@ -25,14 +27,15 @@ supported_rubies = supported_mri_rubies + jrubies + supported_mri_ruby_2 = "ruby-2.7".inspect + # The latest stable version of MongoDB latest_stable_mdb = "7.0".inspect # so it gets quoted as a string - # A few of the most recent MongoDB versions - actual_and_upcoming_mdb = %w( 7.0 6.0 ) + actual_and_upcoming_mdb = %w( 8.0 ) - recent_mdb = %w( 6.0 5.0 ) - latest_5x_mdb = "5.0".inspect # so it gets quoted as a string + + recent_mdb = %w( 8.0 7.0 ) %> buildvariants: @@ -50,7 +53,7 @@ buildvariants: matrix_spec: auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"] ruby: <%= latest_ruby %> - mongodb-version: <%= actual_and_upcoming_mdb %> + mongodb-version: <%= recent_mdb %> topology: <%= topologies %> os: ubuntu2204 display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology} @@ -60,7 +63,7 @@ buildvariants: - matrix_name: "mongo-recent" matrix_spec: ruby: <%= recent_rubies %> - mongodb-version: <%= actual_and_upcoming_mdb %> + mongodb-version: <%= recent_mdb %> topology: <%= topologies %> os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${ruby}" @@ -79,28 +82,18 @@ buildvariants: - matrix_name: "mongo-5.x" matrix_spec: - ruby: <%= sample_rubies %> - mongodb-version: '5.0' + ruby: <%= recent_mri_rubies %> + mongodb-version: ['5.0'] topology: <%= topologies %> - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${ruby}" + os: ubuntu2004 + display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - name: "test-mlaunch" - matrix_name: "mongo-4.x" matrix_spec: ruby: <%= older_rubies %> - mongodb-version: ['4.4', '4.2', '4.0'] - topology: <%= topologies %> - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${ruby}" - tasks: - - name: "test-mlaunch" - - - matrix_name: "mongo-3.6" - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6'] + mongodb-version: ['4.4', '4.2'] topology: <%= topologies %> os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${ruby}" @@ -162,17 +155,6 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: mmapv1 - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6', '4.0'] - topology: <%= topologies %> - storage-engine: mmapv1 - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} mmapv1 ${ruby}" - tasks: - - name: "test-mlaunch" - - matrix_name: "lint" matrix_spec: lint: on @@ -209,8 +191,8 @@ buildvariants: - matrix_name: "stress older" matrix_spec: stress: on - ruby: ["ruby-2.7"] - mongodb-version: ['4.2', '4.0', '3.6'] + ruby: <%= supported_mri_ruby_2 %> + mongodb-version: ['4.4', '4.2'] topology: replica-set os: ubuntu1804 display_name: "${mongodb-version} ${topology} stress ${ruby}" @@ -347,7 +329,7 @@ buildvariants: # enough to install mongosh, and then use either mongo or mongosh # (depending on server version and what's available), we can bump this to # the latest stable db version. - mongodb-version: <%= latest_5x_mdb %> + mongodb-version: '5.0' os: ubuntu2004 display_name: "AWS ${auth-and-ssl} ${mongodb-version} ${ruby}" tasks: @@ -482,10 +464,11 @@ buildvariants: tasks: - name: testatlas_task_group - - matrix_name: "aws-lambda" - matrix_spec: - ruby: 'ruby-3.2' - os: ubuntu2204 - display_name: "AWS Lambda" - tasks: - - name: test_aws_lambda_task_group +# https://jira.mongodb.org/browse/RUBY-3311 +# - matrix_name: "aws-lambda" +# matrix_spec: +# ruby: 'ruby-3.2' +# os: ubuntu2204 +# display_name: "AWS Lambda" +# tasks: +# - name: test_aws_lambda_task_group diff --git a/.evergreen/run-tests-atlas-full.sh b/.evergreen/run-tests-atlas-full.sh index 2fb15001c1..a7756bfc3a 100755 --- a/.evergreen/run-tests-atlas-full.sh +++ b/.evergreen/run-tests-atlas-full.sh @@ -8,14 +8,27 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# 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 ATLAS_URI=$MONGODB_URI \ SERVERLESS=1 \ EXAMPLE_TIMEOUT=600 \ - bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb + bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml test_status=$? diff --git a/.evergreen/run-tests-atlas.sh b/.evergreen/run-tests-atlas.sh index 0f796b736e..c100e24431 100755 --- a/.evergreen/run-tests-atlas.sh +++ b/.evergreen/run-tests-atlas.sh @@ -8,7 +8,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# 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 @@ -22,15 +34,5 @@ if test -z "$ATLAS_URI"; then test_status=1 fi -bundle exec rspec spec/atlas -fd -this_test_status=$? -echo "TEST STATUS" -echo ${this_test_status} - -if test $this_test_status != 0; then - test_status=$this_test_status -fi - -kill_jruby - -exit ${test_status} +bundle exec rspec spec/atlas \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml diff --git a/.evergreen/run-tests-azure.sh b/.evergreen/run-tests-azure.sh index 93d522f155..18cd5f3824 100755 --- a/.evergreen/run-tests-azure.sh +++ b/.evergreen/run-tests-azure.sh @@ -8,7 +8,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# 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 sudo apt-get -y install libyaml-dev cmake diff --git a/.evergreen/run-tests-deployed-lambda.sh b/.evergreen/run-tests-deployed-lambda.sh index 2d587d12db..1406828f9b 100755 --- a/.evergreen/run-tests-deployed-lambda.sh +++ b/.evergreen/run-tests-deployed-lambda.sh @@ -8,7 +8,20 @@ set -ex set_env_vars set_env_python -set_env_ruby + + +# 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 export MONGODB_URI=${MONGODB_URI} export CLUSTER_PREFIX="ruby-driver-" diff --git a/.evergreen/run-tests-ecs.sh b/.evergreen/run-tests-ecs.sh index ec93c3f36b..adea6939a7 100755 --- a/.evergreen/run-tests-ecs.sh +++ b/.evergreen/run-tests-ecs.sh @@ -17,7 +17,20 @@ show_local_instructions set_home set_env_vars set_env_python -set_env_ruby + + +# 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 --quiet diff --git a/.evergreen/run-tests-gcp.sh b/.evergreen/run-tests-gcp.sh index baccf6404b..e8990dc375 100755 --- a/.evergreen/run-tests-gcp.sh +++ b/.evergreen/run-tests-gcp.sh @@ -9,7 +9,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# 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 sudo apt-get -y install libyaml-dev cmake diff --git a/.evergreen/run-tests-kerberos-integration.sh b/.evergreen/run-tests-kerberos-integration.sh index e7002d898e..ad61ffc647 100755 --- a/.evergreen/run-tests-kerberos-integration.sh +++ b/.evergreen/run-tests-kerberos-integration.sh @@ -19,7 +19,19 @@ show_local_instructions set_env_vars set_env_python -set_env_ruby + +# 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 # Note that: # @@ -86,5 +98,6 @@ if test -n "$TEST_CMD"; then eval $TEST_CMD else echo "Running tests" - bundle exec rspec spec/kerberos + bundle exec rspec spec/kerberos \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml fi diff --git a/.evergreen/run-tests-kerberos-unit.sh b/.evergreen/run-tests-kerberos-unit.sh index a9a7f77c58..4a3121e7b9 100755 --- a/.evergreen/run-tests-kerberos-unit.sh +++ b/.evergreen/run-tests-kerberos-unit.sh @@ -16,8 +16,21 @@ show_local_instructions set_env_vars set_env_python -set_env_ruby + +# 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 export BUNDLE_GEMFILE=gemfiles/mongo_kerberos.gemfile bundle_install @@ -28,4 +41,5 @@ bundle exec rspec \ spec/spec_tests/connection_string_spec.rb \ spec/mongo/uri/srv_protocol_spec.rb \ spec/mongo/uri_spec.rb \ - spec/integration/client_authentication_options_spec.rb + spec/integration/client_authentication_options_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml diff --git a/.evergreen/run-tests-serverless.sh b/.evergreen/run-tests-serverless.sh index cd71e41d6e..2b28731d2f 100755 --- a/.evergreen/run-tests-serverless.sh +++ b/.evergreen/run-tests-serverless.sh @@ -8,7 +8,20 @@ set -ex set_env_vars set_env_python -set_env_ruby + + +# 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 diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 6916698f31..4297a6d498 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -39,7 +39,19 @@ show_local_instructions set_home set_env_vars set_env_python -set_env_ruby + +# 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 prepare_server @@ -324,13 +336,17 @@ set +e if test -n "$TEST_CMD"; then eval $TEST_CMD elif test "$FORK" = 1; then - bundle exec rspec spec/integration/fork*spec.rb spec/stress/fork*spec.rb + bundle exec rspec spec/integration/fork*spec.rb spec/stress/fork*spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$STRESS" = 1; then - bundle exec rspec spec/integration/fork*spec.rb spec/stress + bundle exec rspec spec/integration/fork*spec.rb spec/stress \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$OCSP_VERIFIER" = 1; then - bundle exec rspec spec/integration/ocsp_verifier_spec.rb + bundle exec rspec spec/integration/ocsp_verifier_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test -n "$OCSP_CONNECTIVITY"; then - bundle exec rspec spec/integration/ocsp_connectivity_spec.rb + bundle exec rspec spec/integration/ocsp_connectivity_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$SOLO" = 1; then for attempt in `seq 10`; do echo "Attempt $attempt" diff --git a/gemfiles/standard.rb b/gemfiles/standard.rb index f29b91cb4b..cb43a20a51 100644 --- a/gemfiles/standard.rb +++ b/gemfiles/standard.rb @@ -57,6 +57,7 @@ def standard_dependencies gem 'concurrent-ruby', platforms: :jruby gem 'dotenv' gem 'childprocess' + gem 'rspec_junit_formatter' end group :development do diff --git a/spec/integration/srv_monitoring_spec.rb b/spec/integration/srv_monitoring_spec.rb index 8c3d1560a1..4f89d4f739 100644 --- a/spec/integration/srv_monitoring_spec.rb +++ b/spec/integration/srv_monitoring_spec.rb @@ -6,6 +6,7 @@ describe 'SRV Monitoring' do clean_slate_for_all require_external_connectivity + require_mri context 'with SRV lookups mocked at Resolver' do let(:srv_result) do diff --git a/spec/integration/time_zone_querying_spec.rb b/spec/integration/time_zone_querying_spec.rb index 804fb2c17b..c4be40592f 100644 --- a/spec/integration/time_zone_querying_spec.rb +++ b/spec/integration/time_zone_querying_spec.rb @@ -4,6 +4,8 @@ require 'spec_helper' describe 'Time zone querying' do + require_mri + let(:collection) { authorized_client[:time_zone_querying] } before do diff --git a/spec/integration/transaction_pinning_spec.rb b/spec/integration/transaction_pinning_spec.rb index 31d5e534b5..ef2c1503fa 100644 --- a/spec/integration/transaction_pinning_spec.rb +++ b/spec/integration/transaction_pinning_spec.rb @@ -4,6 +4,8 @@ require 'spec_helper' describe 'Transaction pinning' do + require_mri + let(:client) { authorized_client.with(max_pool_size: 4) } let(:collection_name) { 'tx_pinning' } let(:collection) { client[collection_name] } diff --git a/spec/integration/versioned_api_examples_spec.rb b/spec/integration/versioned_api_examples_spec.rb index 6e6651530d..f172e9901f 100644 --- a/spec/integration/versioned_api_examples_spec.rb +++ b/spec/integration/versioned_api_examples_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe 'Versioned API examples' do - + require_mri # Until https://jira.mongodb.org/browse/RUBY-1768 is implemented, limit # the tests to simple configurations require_no_auth diff --git a/spec/shared b/spec/shared index f1c563a36c..702f23f98b 160000 --- a/spec/shared +++ b/spec/shared @@ -1 +1 @@ -Subproject commit f1c563a36ce64541331fdbc9afe3c27d2b9e2463 +Subproject commit 702f23f98b4be12fae3cf4d235a27a7985272251