From 74e4e381b21e7a8da176cbc39d374be4670e0e6c Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Thu, 28 Mar 2024 14:26:03 -0600 Subject: [PATCH] RUBY-3424 Prep for 2.20 (#2852) * prep for 2.20 * more CI stuff (e.g. DriverBench should run against latest stable, not latest) * let's see what happens when we enable jruby 9.4 * document added support for JRuby 9.4, and deprecation of 9.2 * flesh out the release notes more --- .evergreen/config.yml | 58 +++++++++---------------- .evergreen/config/axes.yml.erb | 13 ------ .evergreen/config/standard.yml.erb | 25 ++++------- .evergreen/update-evergreen-configs | 2 +- .github/workflows/test.yml | 16 +------ docs/reference/driver-compatibility.txt | 46 ++++++++++++++++++++ docs/release-notes.txt | 22 ++++++++++ lib/mongo/version.rb | 2 +- 8 files changed, 101 insertions(+), 83 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4e2b208d4e..01261a3325 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1,5 +1,5 @@ # GENERATED FILE - DO NOT EDIT. -# Run ./.evergreen/update-evergreen-configs to regenerate this file. +# Run `rake eg` to regenerate this file. # When a task that used to pass starts to fail, go through all versions that # may have been skipped to detect when the task started failing. @@ -1008,22 +1008,10 @@ axes: display_name: ruby-2.7 variables: RVM_RUBY: "ruby-2.7" - - id: "ruby-2.6" - display_name: ruby-2.6 - variables: - RVM_RUBY: "ruby-2.6" - - id: "ruby-2.5" - display_name: ruby-2.5 - variables: - RVM_RUBY: "ruby-2.5" - id: "ruby-head" display_name: ruby-head variables: RVM_RUBY: "ruby-head" - - id: "jruby-9.2" - display_name: jruby-9.2 - variables: - RVM_RUBY: "jruby-9.2" - id: "jruby-9.3" display_name: jruby-9.3 variables: @@ -1257,12 +1245,11 @@ axes: - id: no display_name: No - buildvariants: - matrix_name: DriverBench matrix_spec: ruby: "ruby-3.2" - mongodb-version: latest + mongodb-version: "7.0" topology: standalone run_on: rhel80-large display_name: DriverBench @@ -1282,7 +1269,7 @@ buildvariants: - matrix_name: "mongo-recent" matrix_spec: - ruby: ["ruby-3.2", "ruby-3.1", "jruby-9.3"] + ruby: ["ruby-3.2", "ruby-3.1", "jruby-9.4"] mongodb-version: ["latest", "7.0", "6.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ['rhel8'] @@ -1292,9 +1279,6 @@ buildvariants: tasks: - name: "test-mlaunch" - # Only JRuby-9.4 is built for arm in the current toolchain, but 9.4 has other - # issues. Either we fix those issues, or we build 9.3 for arm in the toolchain, - # and hope it fixes the issues... Until then, we can only test MRI ruby on arm. - matrix_name: "mongo-recent-arm" matrix_spec: ruby: "ruby-3.2" @@ -1307,7 +1291,7 @@ buildvariants: - matrix_name: "mongo-5.x" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] + ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] mongodb-version: ['5.3', '5.0'] topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 @@ -1317,7 +1301,7 @@ buildvariants: - matrix_name: "mongo-4.x" matrix_spec: - ruby: ["ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5"] + ruby: ["ruby-3.0", "ruby-2.7"] mongodb-version: ['4.4', '4.2', '4.0'] topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 @@ -1327,7 +1311,7 @@ buildvariants: - matrix_name: "mongo-3.6" matrix_spec: - ruby: "ruby-2.5" + ruby: "ruby-2.7" mongodb-version: ['3.6'] topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 @@ -1392,7 +1376,7 @@ buildvariants: - matrix_name: mmapv1 matrix_spec: - ruby: "ruby-2.5" + ruby: "ruby-2.7" mongodb-version: ['3.6', '4.0'] topology: ["standalone", "replica-set", "sharded-cluster"] storage-engine: mmapv1 @@ -1426,7 +1410,7 @@ buildvariants: - matrix_name: "solo" matrix_spec: solo: on - ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5", "jruby-9.3", "jruby-9.2"] + ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "jruby-9.4", "jruby-9.3"] mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 @@ -1475,7 +1459,7 @@ buildvariants: - matrix_name: "jruby-auth" matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] - ruby: jruby-9.3 + ruby: jruby-9.4 mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 @@ -1486,7 +1470,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.3"] + ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: "replica-set" compressor: 'zlib' @@ -1498,7 +1482,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.3"] + ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: "replica-set" compressor: 'snappy' @@ -1525,7 +1509,7 @@ buildvariants: - matrix_name: "activesupport" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] + ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: replica-set as: as @@ -1536,7 +1520,7 @@ buildvariants: - matrix_name: "bson" matrix_spec: - ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] + ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] mongodb-version: "7.0" topology: replica-set bson: "*" @@ -1548,7 +1532,7 @@ buildvariants: # kerberos integration tests are broken (RUBY-3266) # - matrix_name: "kerberos-integration" # matrix_spec: - # ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] + # ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.4"] # os: rhel8 # display_name: "Kerberos integration ${os} ${ruby}" # tasks: @@ -1609,7 +1593,7 @@ buildvariants: matrix_spec: ocsp-verifier: true # No JRuby due to https://github.com/jruby/jruby-openssl/issues/210 - ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5"] + ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7"] topology: standalone mongodb-version: "7.0" os: rhel8 @@ -1783,7 +1767,7 @@ buildvariants: ocsp-status: [valid, unknown] ocsp-delegate: '*' ocsp-connectivity: pass - ruby: jruby-9.3 + ruby: jruby-9.4 topology: standalone mongodb-version: "7.0" os: rhel8 @@ -1825,7 +1809,7 @@ buildvariants: - matrix_name: "atlas" matrix_spec: - ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5", "jruby-9.3", "jruby-9.2"] + ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "jruby-9.4", "jruby-9.3"] os: rhel8 display_name: "Atlas tests ${ruby}" tasks: @@ -1835,8 +1819,8 @@ buildvariants: # - matrix_name: "serverless" # matrix_spec: # # https://jira.mongodb.org/browse/RUBY-3217 -# # ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5", "jruby-9.3", "jruby-9.2"] -# ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5"] +# # ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "jruby-9.4", "jruby-9.3"] +# ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7"] # fle: path # os: rhel8 # display_name: "Atlas serverless ${ruby}" @@ -1846,8 +1830,8 @@ buildvariants: # - matrix_name: "serverless-next" # matrix_spec: # # https://jira.mongodb.org/browse/RUBY-3217 -# # ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5", "jruby-9.3", "jruby-9.2"] -# ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "ruby-2.6", "ruby-2.5"] +# # ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7", "jruby-9.4", "jruby-9.3"] +# ruby: ["ruby-3.2", "ruby-3.1", "ruby-3.0", "ruby-2.7"] # fle: path # os: rhel8 # display_name: "Atlas serverless-next ${ruby}" diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 136b835ff8..c433cf9c22 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -162,22 +162,10 @@ axes: display_name: ruby-2.7 variables: RVM_RUBY: "ruby-2.7" - - id: "ruby-2.6" - display_name: ruby-2.6 - variables: - RVM_RUBY: "ruby-2.6" - - id: "ruby-2.5" - display_name: ruby-2.5 - variables: - RVM_RUBY: "ruby-2.5" - id: "ruby-head" display_name: ruby-head variables: RVM_RUBY: "ruby-head" - - id: "jruby-9.2" - display_name: jruby-9.2 - variables: - RVM_RUBY: "jruby-9.2" - id: "jruby-9.3" display_name: jruby-9.3 variables: @@ -405,4 +393,3 @@ axes: API_VERSION_REQUIRED: 1 - id: no display_name: No - diff --git a/.evergreen/config/standard.yml.erb b/.evergreen/config/standard.yml.erb index f37729211d..11c75425da 100644 --- a/.evergreen/config/standard.yml.erb +++ b/.evergreen/config/standard.yml.erb @@ -1,33 +1,27 @@ <% topologies = %w( standalone replica-set sharded-cluster ) - # jruby-9.4 is available in the toolchain, but tests break. It will - # require some investigation. Once available: - # 1. replace jruby-9.3 with jruby-9.4 in `recent_rubies` and - # `sample_rubies`. - # 2. add jruby-9.4 to the front of `jrubies`. - # latest_ruby = the most recently released, stable version of Ruby # (make sure this version is being built by 10gen/mongo-ruby-toolchain) latest_ruby = "ruby-3.2".inspect # so it gets quoted as a string # these are used for testing against a few recent ruby versions - recent_rubies = %w( ruby-3.2 ruby-3.1 jruby-9.3 ) + 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 ) # as above, but including the most recent JRuby release - sample_rubies = sample_mri_rubies + %w( jruby-9.3 ) + sample_rubies = sample_mri_rubies + %w( jruby-9.4 ) # older Ruby versions provided by 10gen/mongo-ruby-toolchain - older_rubies = %w( ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ) + older_rubies = %w( ruby-3.0 ruby-2.7 ) # all supported JRuby versions provided by 10gen/mongo-ruby-toolchain - jrubies = %w( jruby-9.3 jruby-9.2 ) + jrubies = %w( jruby-9.4 jruby-9.3 ) supported_mri_rubies = %w( ruby-3.2 ruby-3.1 ruby-3.0 - ruby-2.7 ruby-2.6 ruby-2.5 ) + ruby-2.7 ) supported_rubies = supported_mri_rubies + jrubies @@ -45,7 +39,7 @@ buildvariants: - matrix_name: DriverBench matrix_spec: ruby: <%= latest_ruby %> - mongodb-version: latest + mongodb-version: <%= latest_stable_mdb %> topology: standalone run_on: rhel80-large display_name: DriverBench @@ -75,9 +69,6 @@ buildvariants: tasks: - name: "test-mlaunch" - # Only JRuby-9.4 is built for arm in the current toolchain, but 9.4 has other - # issues. Either we fix those issues, or we build 9.3 for arm in the toolchain, - # and hope it fixes the issues... Until then, we can only test MRI ruby on arm. - matrix_name: "mongo-recent-arm" matrix_spec: ruby: <%= latest_ruby %> @@ -110,7 +101,7 @@ buildvariants: - matrix_name: "mongo-3.6" matrix_spec: - ruby: "ruby-2.5" + ruby: "ruby-2.7" mongodb-version: ['3.6'] topology: <%= topologies %> os: rhel8 @@ -175,7 +166,7 @@ buildvariants: - matrix_name: mmapv1 matrix_spec: - ruby: "ruby-2.5" + ruby: "ruby-2.7" mongodb-version: ['3.6', '4.0'] topology: <%= topologies %> storage-engine: mmapv1 diff --git a/.evergreen/update-evergreen-configs b/.evergreen/update-evergreen-configs index b1f4296649..e2f205ef55 100755 --- a/.evergreen/update-evergreen-configs +++ b/.evergreen/update-evergreen-configs @@ -13,7 +13,7 @@ class Runner def transform(output_file_name) contents = <<-EOT # GENERATED FILE - DO NOT EDIT. -# Run ./.evergreen/update-evergreen-configs to regenerate this file. +# Run `rake eg` to regenerate this file. EOT diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44c7b6b2bb..e3f468fe8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,14 +16,10 @@ jobs: fail-fast: false matrix: os: [ ubuntu-20.04 ] - ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2"] - mongodb: ["3.6", "4.4", "5.0"] + ruby: ["2.7", "3.0", "3.1", "3.2"] + mongodb: ["3.6", "4.4", "5.0", "6.0", "7.0"] topology: [replica_set, sharded_cluster] include: - - os: macos - ruby: "2.6" - mongodb: "5.0" - topology: server - os: macos ruby: "2.7" mongodb: "5.0" @@ -32,10 +28,6 @@ jobs: ruby: "3.0" mongodb: "5.0" topology: server - - os: ubuntu-latest - ruby: "2.6" - mongodb: "5.0" - topology: server - os: ubuntu-latest ruby: "2.7" mongodb: "5.0" @@ -48,10 +40,6 @@ jobs: ruby: "3.2" mongodb: "5.0" topology: server - - os: ubuntu-18.04 - ruby: "2.5" - mongodb: "3.6" - topology: replica_set - os: ubuntu-latest ruby: "3.2" mongodb: "6.0" diff --git a/docs/reference/driver-compatibility.txt b/docs/reference/driver-compatibility.txt index 664b19149d..a0aaea71af 100644 --- a/docs/reference/driver-compatibility.txt +++ b/docs/reference/driver-compatibility.txt @@ -57,6 +57,19 @@ version. - MongoDB 3.0 - MongoDB 2.6 + * - 2.20 + - |checkmark| + - |checkmark| + - |checkmark| + - |checkmark| + - |checkmark| + - |checkmark| + - |checkmark| + - + - + - + - + * - 2.19 - |checkmark| - |checkmark| @@ -292,10 +305,29 @@ for that Ruby version is deprecated. - Ruby 2.1 - Ruby 2.0 - Ruby 1.9 + - JRuby 9.4 - JRuby 9.3 - JRuby 9.2 - JRuby 9.1 + * - 2.20 + - |checkmark| + - |checkmark| + - |checkmark| + - D + - + - + - + - + - + - + - + - + - |checkmark| + - |checkmark| + - D + - + * - 2.19 - |checkmark| - |checkmark| @@ -309,6 +341,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - |checkmark| - @@ -326,6 +359,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - |checkmark| - @@ -344,6 +378,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -361,6 +396,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -378,6 +414,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -395,6 +432,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -412,6 +450,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -429,6 +468,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -446,6 +486,7 @@ for that Ruby version is deprecated. - - - + - - |checkmark| - @@ -463,6 +504,7 @@ for that Ruby version is deprecated. - D - D - + - - |checkmark| - |checkmark| @@ -480,6 +522,7 @@ for that Ruby version is deprecated. - D - D - + - - |checkmark| - |checkmark| @@ -497,6 +540,7 @@ for that Ruby version is deprecated. - |checkmark| - |checkmark| - + - - |checkmark| - |checkmark| @@ -514,6 +558,7 @@ for that Ruby version is deprecated. - |checkmark| - |checkmark| - + - - |checkmark| - |checkmark| @@ -531,6 +576,7 @@ for that Ruby version is deprecated. - |checkmark| - |checkmark| - + - - |checkmark| - |checkmark| diff --git a/docs/release-notes.txt b/docs/release-notes.txt index c681ca62e6..33f251ff6f 100644 --- a/docs/release-notes.txt +++ b/docs/release-notes.txt @@ -18,6 +18,28 @@ for the complete list of changes, including those internal to the driver and its test suite. +.. _release-notes-2.20: + +2.20 +==== + +This release includes the following new features: + +- Support for Ruby 2.5 and 2.6 has been discontinued. Support for Ruby 2.7 and + JRuby 9.2 has been deprecated, and will be discontinued in the next minor + driver version. Support for JRuby 9.4 has been added. +- Support for the newly-released Ruby-BSON version 5.0. +- Connection strings no longer require a slash between the hosts and the + options. E.g., "mongodb://example.com?w=1" and "mongodb://example.com/?w=1" + are both valid connection strings now. +- Container runtime and orchestration metadata for the client environment are + now sent to the server for analytics purposes. +- A warning message is now written to the log when the host is detected to be + a CosmosDB (Azure) or DocumentDB (Amazon) instance. +- When attempting a retry of a read or write operation in a sharded topology, + the retry will be attempted on a different mongos instance, if possible. + + .. _release-notes-2.19: 2.19 diff --git a/lib/mongo/version.rb b/lib/mongo/version.rb index eb0246b5af..7f52d504fd 100644 --- a/lib/mongo/version.rb +++ b/lib/mongo/version.rb @@ -20,5 +20,5 @@ module Mongo # The current version of the driver. # # @since 2.0.0 - VERSION = '2.19.1'.freeze + VERSION = '2.20.0'.freeze end