diff --git a/.evergreen/config.yml b/.evergreen/config.yml index ec486ce77f..4e2b208d4e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1295,14 +1295,10 @@ buildvariants: # 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. - # - # further: 'latest' is broken until the QE2 changes are merged (RUBY-3211, - # RUBY-3226) - matrix_name: "mongo-recent-arm" matrix_spec: ruby: "ruby-3.2" - #mongodb-version: ['latest', '6.0'] - mongodb-version: ['6.0'] + mongodb-version: ["latest", "7.0", "6.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: 'rhel8-arm' display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" @@ -1342,7 +1338,7 @@ buildvariants: - matrix_name: "single-lb" matrix_spec: ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: load-balanced single-mongos: single-mongos os: rhel8 @@ -1364,7 +1360,7 @@ buildvariants: - matrix_name: "single-mongos" matrix_spec: ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: "sharded-cluster" single-mongos: single-mongos os: rhel8 @@ -1376,7 +1372,7 @@ buildvariants: matrix_spec: retry-reads: no-retry-reads ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 display_name: "${mongodb-version} ${topology} ${retry-reads} ${ruby}" @@ -1387,7 +1383,7 @@ buildvariants: matrix_spec: retry-writes: no-retry-writes ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: [replica-set, sharded-cluster] os: rhel8 display_name: "${mongodb-version} ${topology} ${retry-writes} ${ruby}" @@ -1409,7 +1405,7 @@ buildvariants: matrix_spec: lint: on ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: '*' os: rhel8 display_name: "${mongodb-version} ${topology} ${lint} ${ruby}" @@ -1420,7 +1416,7 @@ buildvariants: matrix_spec: fork: on ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 display_name: "${mongodb-version} ${topology} fork ${ruby}" @@ -1431,7 +1427,7 @@ buildvariants: 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"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 display_name: "${mongodb-version} ${topology} solo ${ruby}" @@ -1480,7 +1476,7 @@ buildvariants: matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] ruby: jruby-9.3 - mongodb-version: "6.0" + mongodb-version: "7.0" topology: ["standalone", "replica-set", "sharded-cluster"] os: rhel8 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" @@ -1491,7 +1487,7 @@ buildvariants: matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: "replica-set" compressor: 'zlib' os: rhel8 @@ -1503,7 +1499,7 @@ buildvariants: matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: "replica-set" compressor: 'snappy' os: rhel8 @@ -1519,7 +1515,7 @@ buildvariants: matrix_spec: auth-and-ssl: [ "auth-and-ssl", "noauth-and-nossl" ] ruby: ["ruby-3.2", "ruby-2.7"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: "replica-set" compressor: 'zstd' os: rhel8 @@ -1530,7 +1526,7 @@ buildvariants: - matrix_name: "activesupport" matrix_spec: ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: replica-set as: as os: rhel8 @@ -1541,7 +1537,7 @@ buildvariants: - matrix_name: "bson" matrix_spec: ruby: ["ruby-3.2", "ruby-2.7", "jruby-9.3"] - mongodb-version: "6.0" + mongodb-version: "7.0" topology: replica-set bson: "*" os: rhel8 @@ -1561,7 +1557,7 @@ buildvariants: - matrix_name: "kerberos-unit" matrix_spec: ruby: "ruby-3.2" - mongodb-version: "6.0" + mongodb-version: "7.0" topology: standalone os: rhel8 auth-and-ssl: kerberos @@ -1615,7 +1611,7 @@ buildvariants: # 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"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP verifier: ${mongodb-version} ${ruby}" tasks: @@ -1628,7 +1624,7 @@ buildvariants: ocsp-delegate: on ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 auth-and-ssl: noauth-and-ssl display_name: "OCSP integration - must staple: ${mongodb-version} ${ruby}" @@ -1641,7 +1637,7 @@ buildvariants: ocsp-status: unknown ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 auth-and-ssl: noauth-and-ssl display_name: "OCSP integration - unknown: ${mongodb-version} ${ruby}" @@ -1657,7 +1653,7 @@ buildvariants: extra-uri-options: "none" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1671,7 +1667,7 @@ buildvariants: extra-uri-options: "none" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1685,7 +1681,7 @@ buildvariants: extra-uri-options: "none" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1699,7 +1695,7 @@ buildvariants: extra-uri-options: "tlsInsecure=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1713,7 +1709,7 @@ buildvariants: extra-uri-options: "tlsInsecure=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1727,7 +1723,7 @@ buildvariants: extra-uri-options: "tlsInsecure=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1741,7 +1737,7 @@ buildvariants: extra-uri-options: "tlsAllowInvalidCertificates=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1755,7 +1751,7 @@ buildvariants: extra-uri-options: "tlsAllowInvalidCertificates=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1769,7 +1765,7 @@ buildvariants: extra-uri-options: "tlsAllowInvalidCertificates=true" ruby: ["ruby-3.2", "ruby-2.7"] topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}" tasks: @@ -1789,7 +1785,7 @@ buildvariants: ocsp-connectivity: pass ruby: jruby-9.3 topology: standalone - mongodb-version: "6.0" + mongodb-version: "7.0" os: rhel8 display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${mongodb-version} ${ruby}" tasks: @@ -1801,7 +1797,7 @@ buildvariants: fle: helper topology: standalone os: rhel8 - mongodb-version: "6.0" + mongodb-version: "7.0" display_name: "GCP KMS" tasks: - name: testgcpkms_task_group @@ -1835,27 +1831,28 @@ buildvariants: tasks: - name: test-atlas - - 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"] - fle: path - os: rhel8 - display_name: "Atlas serverless ${ruby}" - tasks: - - name: serverless_task_group - - - 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"] - fle: path - os: rhel8 - display_name: "Atlas serverless-next ${ruby}" - tasks: - - name: serverless_next_task_group +# Commented out, pending RUBY-3414 +# - 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"] +# fle: path +# os: rhel8 +# display_name: "Atlas serverless ${ruby}" +# tasks: +# - name: serverless_task_group +# +# - 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"] +# fle: path +# os: rhel8 +# display_name: "Atlas serverless-next ${ruby}" +# tasks: +# - name: serverless_next_task_group - matrix_name: "aws-lambda" matrix_spec: diff --git a/.evergreen/config/standard.yml.erb b/.evergreen/config/standard.yml.erb index b852b48b63..f37729211d 100644 --- a/.evergreen/config/standard.yml.erb +++ b/.evergreen/config/standard.yml.erb @@ -32,10 +32,11 @@ supported_rubies = supported_mri_rubies + jrubies # The latest stable version of MongoDB - latest_stable_mdb = "6.0".inspect # so it gets quoted as a string + 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( latest 7.0 6.0 ) + recent_mdb = %w( 6.0 5.3 ) latest_5x_mdb = "5.3".inspect # so it gets quoted as a string %> @@ -77,14 +78,10 @@ buildvariants: # 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. - # - # further: 'latest' is broken until the QE2 changes are merged (RUBY-3211, - # RUBY-3226) - matrix_name: "mongo-recent-arm" matrix_spec: ruby: <%= latest_ruby %> - #mongodb-version: ['latest', '6.0'] - mongodb-version: ['6.0'] + mongodb-version: <%= actual_and_upcoming_mdb %> topology: <%= topologies %> os: 'rhel8-arm' display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" @@ -520,27 +517,28 @@ buildvariants: tasks: - name: test-atlas - - matrix_name: "serverless" - matrix_spec: - # https://jira.mongodb.org/browse/RUBY-3217 - # ruby: <%= supported_rubies %> - ruby: <%= supported_mri_rubies %> - fle: path - os: rhel8 - display_name: "Atlas serverless ${ruby}" - tasks: - - name: serverless_task_group - - - matrix_name: "serverless-next" - matrix_spec: - # https://jira.mongodb.org/browse/RUBY-3217 - # ruby: <%= supported_rubies %> - ruby: <%= supported_mri_rubies %> - fle: path - os: rhel8 - display_name: "Atlas serverless-next ${ruby}" - tasks: - - name: serverless_next_task_group +# Commented out, pending RUBY-3414 +# - matrix_name: "serverless" +# matrix_spec: +# # https://jira.mongodb.org/browse/RUBY-3217 +# # ruby: <%= supported_rubies %> +# ruby: <%= supported_mri_rubies %> +# fle: path +# os: rhel8 +# display_name: "Atlas serverless ${ruby}" +# tasks: +# - name: serverless_task_group +# +# - matrix_name: "serverless-next" +# matrix_spec: +# # https://jira.mongodb.org/browse/RUBY-3217 +# # ruby: <%= supported_rubies %> +# ruby: <%= supported_mri_rubies %> +# fle: path +# os: rhel8 +# display_name: "Atlas serverless-next ${ruby}" +# tasks: +# - name: serverless_next_task_group - matrix_name: "aws-lambda" matrix_spec: diff --git a/spec/runners/transactions/test.rb b/spec/runners/transactions/test.rb index ce54d16cd5..8364b1713c 100644 --- a/spec/runners/transactions/test.rb +++ b/spec/runners/transactions/test.rb @@ -132,7 +132,6 @@ def test_client @test_client ||= begin sdam_proc = lambda do |test_client| test_client.subscribe(Mongo::Monitoring::COMMAND, command_subscriber) - test_client.subscribe(Mongo::Monitoring::TOPOLOGY_OPENING, sdam_subscriber) test_client.subscribe(Mongo::Monitoring::SERVER_OPENING, sdam_subscriber) test_client.subscribe(Mongo::Monitoring::SERVER_DESCRIPTION_CHANGED, sdam_subscriber) @@ -321,6 +320,9 @@ def setup_test # without auto_encryption_options for querying results. result_collection_name = outcome&.collection_name || @spec.collection_name @result_collection = support_client.use(@spec.database_name)[result_collection_name] + + # DRIVERS-2816, adjusted for legacy spec runner + @cluster_time = support_client.command(ping: 1).cluster_time end def teardown_test @@ -358,12 +360,19 @@ def resolve_target(client, operation) end end + def new_session(options) + test_client.start_session(options || {}).tap do |s| + # DRIVERS-2816, adjusted for legacy spec runner + s.advance_cluster_time(@cluster_time) + end + end + def session0 - @session0 ||= test_client.start_session(@session_options[:session0] || {}) + @session0 ||= new_session(@session_options[:session0]) end def session1 - @session1 ||= test_client.start_session(@session_options[:session1] || {}) + @session1 ||= new_session(@session_options[:session1]) end end end diff --git a/spec/runners/unified/test.rb b/spec/runners/unified/test.rb index fb9083e6e9..114088f693 100644 --- a/spec/runners/unified/test.rb +++ b/spec/runners/unified/test.rb @@ -227,7 +227,9 @@ def generate_entities(es) opts = {} end - client.start_session(**opts) + client.start_session(**opts).tap do |session| + session.advance_cluster_time(@cluster_time) + end when 'clientEncryption' client_encryption_opts = spec.use!('clientEncryptionOpts') key_vault_client = entities.get(:client, client_encryption_opts['keyVaultClient']) @@ -342,6 +344,11 @@ def set_initial_data raise NotImplementedError, "Unhandled spec keys: #{spec}" end end + + # the cluster time is used to advance the cluster time of any + # sessions created during this test. + # -> see DRIVERS-2816 + @cluster_time = root_authorized_client.command(ping: 1).cluster_time end def run diff --git a/spec/spec_tests/data/index_management/listSearchIndexes.yml b/spec/spec_tests/data/index_management/listSearchIndexes.yml index f05a368585..c0d2d9ddc5 100644 --- a/spec/spec_tests/data/index_management/listSearchIndexes.yml +++ b/spec/spec_tests/data/index_management/listSearchIndexes.yml @@ -22,6 +22,7 @@ runOnRequirements: tests: - description: "when no name is provided, it does not populate the filter" + skipReason: https://jira.mongodb.org/browse/DRIVERS-2794 operations: - name: listSearchIndexes object: *collection0 @@ -41,10 +42,11 @@ tests: - $listSearchIndexes: {} - description: "when a name is provided, it is present in the filter" + skipReason: https://jira.mongodb.org/browse/DRIVERS-2794 operations: - name: listSearchIndexes object: *collection0 - arguments: + arguments: name: &indexName "test index" expectError: # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting @@ -63,12 +65,13 @@ tests: $db: *database0 - description: aggregation cursor options are supported + skipReason: https://jira.mongodb.org/browse/DRIVERS-2794 operations: - name: listSearchIndexes object: *collection0 - arguments: + arguments: name: &indexName "test index" - aggregationOptions: + aggregationOptions: batchSize: 10 expectError: # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting