mongo 2.20.0 → 2.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -1
  3. data/Rakefile +57 -21
  4. data/lib/mongo/config.rb +2 -2
  5. data/lib/mongo/retryable/base_worker.rb +28 -3
  6. data/lib/mongo/retryable/read_worker.rb +9 -8
  7. data/lib/mongo/retryable/write_worker.rb +4 -4
  8. data/lib/mongo/server/pending_connection.rb +19 -6
  9. data/lib/mongo/socket/ssl.rb +35 -5
  10. data/lib/mongo/version.rb +3 -18
  11. data/mongo.gemspec +8 -11
  12. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +3 -0
  13. data/spec/integration/ocsp_verifier_spec.rb +30 -99
  14. data/spec/integration/reconnect_spec.rb +8 -2
  15. data/spec/integration/retryable_reads_errors_spec.rb +35 -23
  16. data/spec/integration/sdam_error_handling_spec.rb +2 -0
  17. data/spec/integration/srv_monitoring_spec.rb +2 -3
  18. data/spec/integration/srv_spec.rb +0 -4
  19. data/spec/lite_spec_helper.rb +0 -10
  20. data/spec/mongo/collection_crud_spec.rb +1 -0
  21. data/spec/mongo/server/connection_spec.rb +22 -0
  22. data/spec/shared/CANDIDATE.md +28 -0
  23. data/spec/shared/lib/mrss/docker_runner.rb +1 -1
  24. data/spec/shared/lib/mrss/release/candidate.rb +281 -0
  25. data/spec/shared/lib/mrss/release/product_data.rb +144 -0
  26. data/spec/shared/lib/mrss/server_version_registry.rb +1 -1
  27. data/spec/shared/lib/tasks/candidate.rake +64 -0
  28. data/spec/shared/share/Dockerfile.erb +4 -34
  29. data/spec/shared/shlib/distro.sh +10 -0
  30. data/spec/shared/shlib/server.sh +33 -27
  31. data/spec/shared/shlib/set_env.sh +6 -42
  32. data/spec/spec_tests/data/client_side_encryption/fle2v2-BypassQueryAnalysis.yml +1 -0
  33. data/spec/spec_tests/data/client_side_encryption/fle2v2-Compact.yml +1 -0
  34. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection.yml +1 -0
  35. data/spec/spec_tests/data/client_side_encryption/fle2v2-DecryptExistingData.yml +1 -0
  36. data/spec/spec_tests/data/client_side_encryption/fle2v2-Delete.yml +1 -0
  37. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +1 -0
  38. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-jsonSchema.yml +1 -0
  39. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFieldsMap-defaults.yml +1 -0
  40. data/spec/spec_tests/data/client_side_encryption/fle2v2-FindOneAndUpdate.yml +1 -0
  41. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Indexed.yml +1 -0
  42. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml +1 -0
  43. data/spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml +1 -0
  44. data/spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml +1 -0
  45. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +1 -0
  46. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +1 -0
  47. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +1 -0
  48. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +1 -0
  49. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +1 -0
  50. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +1 -0
  51. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +1 -0
  52. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +1 -0
  53. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +1 -0
  54. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +1 -0
  55. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +1 -0
  56. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +1 -0
  57. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +1 -0
  58. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +1 -0
  59. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +1 -0
  60. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +1 -0
  61. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +1 -0
  62. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +1 -0
  63. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +1 -0
  64. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +1 -0
  65. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +1 -0
  66. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +1 -0
  67. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +1 -0
  68. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +1 -0
  69. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +1 -0
  70. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +1 -0
  71. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +1 -0
  72. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +1 -0
  73. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +1 -0
  74. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +1 -0
  75. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +1 -0
  76. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +1 -0
  77. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +1 -0
  78. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +1 -0
  79. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +1 -0
  80. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +1 -0
  81. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +1 -0
  82. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +1 -0
  83. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +1 -0
  84. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +1 -0
  85. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +1 -0
  86. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +1 -0
  87. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +1 -0
  88. data/spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml +1 -0
  89. data/spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml +2 -1
  90. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +2 -0
  91. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +2 -0
  92. data/spec/spec_tests/transactions_unified_spec.rb +2 -1
  93. data/spec/support/certificates/atlas-ocsp-ca.crt +89 -77
  94. data/spec/support/certificates/atlas-ocsp.crt +117 -122
  95. data/spec/support/certificates/retrieve-atlas-cert +1 -1
  96. data/spec/support/common_shortcuts.rb +19 -37
  97. data/spec/support/constraints.rb +10 -0
  98. metadata +24 -47
  99. checksums.yaml.gz.sig +0 -0
  100. data/spec/support/dns.rb +0 -16
  101. data/spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock +0 -19
  102. data.tar.gz.sig +0 -0
  103. metadata.gz.sig +0 -3
@@ -9,6 +9,21 @@ describe Mongo::Socket::OcspVerifier do
9
9
  with_openssl_debug
10
10
  retry_test sleep: 5
11
11
 
12
+ def self.with_ocsp_responder(port = 8100, path = '/', &setup)
13
+ around do |example|
14
+ server = WEBrick::HTTPServer.new(Port: port)
15
+ server.mount_proc path, &setup
16
+ Thread.new { server.start }
17
+ begin
18
+ example.run
19
+ ensure
20
+ server.shutdown
21
+ end
22
+
23
+ ::Utils.wait_for_port_free(port, 5)
24
+ end
25
+ end
26
+
12
27
  shared_examples 'verifies' do
13
28
  context 'mri' do
14
29
  fails_on_jruby
@@ -173,21 +188,10 @@ describe Mongo::Socket::OcspVerifier do
173
188
 
174
189
  context 'one time' do
175
190
 
176
- around do |example|
177
- server = WEBrick::HTTPServer.new(Port: 8100)
178
- server.mount_proc '/' do |req, res|
179
- res.status = 303
180
- res['locAtion'] = "http://localhost:8101#{req.path}"
181
- res.body = "See http://localhost:8101#{req.path}"
182
- end
183
- Thread.new { server.start }
184
- begin
185
- example.run
186
- ensure
187
- server.shutdown
188
- end
189
-
190
- ::Utils.wait_for_port_free(8100, 5)
191
+ with_ocsp_responder do |req, res|
192
+ res.status = 303
193
+ res['locAtion'] = "http://localhost:8101#{req.path}"
194
+ res.body = "See http://localhost:8101#{req.path}"
191
195
  end
192
196
 
193
197
  include_context 'verifier', algorithm: algorithm
@@ -248,21 +252,10 @@ describe Mongo::Socket::OcspVerifier do
248
252
  port: 8101,
249
253
  )
250
254
 
251
- around do |example|
252
- server = WEBrick::HTTPServer.new(Port: 8100)
253
- server.mount_proc '/' do |req, res|
254
- res.status = 303
255
- res['locAtion'] = req.path
256
- res.body = "See #{req.path} indefinitely"
257
- end
258
- Thread.new { server.start }
259
- begin
260
- example.run
261
- ensure
262
- server.shutdown
263
- end
264
-
265
- ::Utils.wait_for_port_free(8100, 5)
255
+ with_ocsp_responder do |req, res|
256
+ res.status = 303
257
+ res['locAtion'] = req.path
258
+ res.body = "See #{req.path} indefinitely"
266
259
  end
267
260
 
268
261
  include_context 'verifier', algorithm: algorithm
@@ -274,85 +267,23 @@ describe Mongo::Socket::OcspVerifier do
274
267
 
275
268
  include_context 'verifier', algorithm: 'rsa'
276
269
 
277
- context '40x / 50x' do
278
- around do |example|
279
- server = WEBrick::HTTPServer.new(Port: 8100)
280
- server.mount_proc '/' do |req, res|
270
+ [400, 404, 500, 503].each do |code|
271
+ context "code #{code}" do
272
+ with_ocsp_responder do |req, res|
281
273
  res.status = code
282
274
  res.body = "HTTP #{code}"
283
275
  end
284
- Thread.new { server.start }
285
- begin
286
- example.run
287
- ensure
288
- server.shutdown
289
- end
290
-
291
- ::Utils.wait_for_port_free(8100, 5)
292
- end
293
-
294
- [400, 404, 500, 503].each do |_code|
295
- context "code #{_code}" do
296
- let(:code) { _code }
297
- include_examples 'does not verify'
298
- end
299
- end
300
- end
301
-
302
- context '204' do
303
- around do |example|
304
- server = WEBrick::HTTPServer.new(Port: 8100)
305
- server.mount_proc '/' do |req, res|
306
- res.status = 204
307
- end
308
- Thread.new { server.start }
309
- begin
310
- example.run
311
- ensure
312
- server.shutdown
313
- end
314
276
 
315
- ::Utils.wait_for_port_free(8100, 5)
316
- end
317
-
318
- context "code 204" do
319
- let(:code) { 204 }
320
277
  include_examples 'does not verify'
321
278
  end
322
279
  end
323
- end
324
-
325
- context 'responder URI has no path' do
326
- require_external_connectivity
327
-
328
- # https://github.com/jruby/jruby-openssl/issues/210
329
- fails_on_jruby
330
280
 
331
- include_context 'basic verifier'
332
-
333
- # The fake certificates all have paths in them for use with the ocsp mock.
334
- # Use real certificates retrieved from Atlas for this test as they don't
335
- # have a path in the OCSP URI (which the test also asserts).
336
- # Note that these certificates expire in 3 months and need to be replaced
337
- # with a more permanent solution.
338
- # Use the spec/support/certificates/retrieve-atlas-cert script to retrieve
339
- # current certificates from Atlas.
340
- let(:cert_path) { File.join(File.dirname(__FILE__), '../support/certificates/atlas-ocsp.crt') }
341
- let(:ca_cert_path) { File.join(File.dirname(__FILE__), '../support/certificates/atlas-ocsp-ca.crt') }
342
- let(:cert_store) do
343
- OpenSSL::X509::Store.new.tap do |store|
344
- store.set_default_paths
281
+ context 'code 204' do
282
+ with_ocsp_responder do |req, res|
283
+ res.status = 204
345
284
  end
346
- end
347
-
348
- before do
349
- verifier.ocsp_uris.length.should > 0
350
- URI.parse(verifier.ocsp_uris.first).path.should == ''
351
- end
352
285
 
353
- it 'verifies' do
354
- # TODO This test will fail if the certificate expires
355
- expect(verifier.verify).to be(true), "If atlas-ocsp certificates have expired, run spec/support/certificates/retrieve-atlas-cert to get a new ones"
286
+ include_examples 'does not verify'
356
287
  end
357
288
  end
358
289
  end
@@ -111,6 +111,10 @@ describe 'Client after reconnect' do
111
111
  # thread.kill should've similarly failed, but it doesn't.
112
112
  fails_on_jruby
113
113
 
114
+ # odd failures related to async on ruby <= 3.1, I suspect something
115
+ # with how fibers worked in those versions.
116
+ minimum_mri_version '3.2.0'
117
+
114
118
  it 'recreates SRV monitor' do
115
119
  wait_for_discovery
116
120
 
@@ -151,6 +155,10 @@ describe 'Client after reconnect' do
151
155
  # NotImplementedError: recvmsg_nonblock is not implemented
152
156
  fails_on_jruby
153
157
 
158
+ # odd failures related to async on ruby <= 3.1, I suspect something
159
+ # with how fibers worked in those versions.
160
+ minimum_mri_version '3.2.0'
161
+
154
162
  let(:uri) do
155
163
  "mongodb+srv://test-fake.test.build.10gen.cc/"
156
164
  end
@@ -181,8 +189,6 @@ describe 'Client after reconnect' do
181
189
  end
182
190
 
183
191
  around do |example|
184
- require 'support/dns'
185
-
186
192
  rules = [
187
193
  ['_mongodb._tcp.test-fake.test.build.10gen.cc', :srv,
188
194
  [0, 0, 2799, 'localhost.test.build.10gen.cc'],
@@ -4,6 +4,7 @@
4
4
  require 'spec_helper'
5
5
 
6
6
  describe 'Retryable reads errors tests' do
7
+ retry_test
7
8
 
8
9
  let(:client) { authorized_client.with(options.merge(retry_reads: true)) }
9
10
 
@@ -73,31 +74,42 @@ describe 'Retryable reads errors tests' do
73
74
  client.subscribe(Mongo::Monitoring::CONNECTION_POOL, subscriber)
74
75
  end
75
76
 
76
- it "retries on PoolClearedError" do
77
- # After the first find fails, the pool is paused and retry is triggered.
78
- # Now, a race is started between the second find acquiring a connection,
79
- # and the first retrying the read. Now, retry reads cause the cluster to
80
- # be rescanned and the pool to be unpaused, allowing the second checkout
81
- # to succeed (when it should fail). Therefore we want the second find's
82
- # check out to win the race. This gives the check out a little head start.
83
- allow_any_instance_of(Mongo::Server::ConnectionPool).to receive(:ready).and_wrap_original do |m, *args, &block|
84
- ::Utils.wait_for_condition(5) do
85
- # check_out_results should contain:
86
- # - find1 connection check out successful
87
- # - pool cleared
88
- # - find2 connection check out failed
89
- # We wait here for the third event to happen before we ready the pool.
90
- cmap_events.select do |e|
91
- event_types.include?(e.class)
92
- end.length >= 3
77
+ shared_examples_for 'retries on PoolClearedError' do
78
+ it "retries on PoolClearedError" do
79
+ # After the first find fails, the pool is paused and retry is triggered.
80
+ # Now, a race is started between the second find acquiring a connection,
81
+ # and the first retrying the read. Now, retry reads cause the cluster to
82
+ # be rescanned and the pool to be unpaused, allowing the second checkout
83
+ # to succeed (when it should fail). Therefore we want the second find's
84
+ # check out to win the race. This gives the check out a little head start.
85
+ allow_any_instance_of(Mongo::Server::ConnectionPool).to receive(:ready).and_wrap_original do |m, *args, &block|
86
+ ::Utils.wait_for_condition(5) do
87
+ # check_out_results should contain:
88
+ # - find1 connection check out successful
89
+ # - pool cleared
90
+ # - find2 connection check out failed
91
+ # We wait here for the third event to happen before we ready the pool.
92
+ cmap_events.select do |e|
93
+ event_types.include?(e.class)
94
+ end.length >= 3
95
+ end
96
+ m.call(*args, &block)
93
97
  end
94
- m.call(*args, &block)
98
+ threads.map(&:join)
99
+ expect(check_out_results[0]).to be_a(Mongo::Monitoring::Event::Cmap::ConnectionCheckedOut)
100
+ expect(check_out_results[1]).to be_a(Mongo::Monitoring::Event::Cmap::PoolCleared)
101
+ expect(check_out_results[2]).to be_a(Mongo::Monitoring::Event::Cmap::ConnectionCheckOutFailed)
102
+ expect(find_events.length).to eq(3)
95
103
  end
96
- threads.map(&:join)
97
- expect(check_out_results[0]).to be_a(Mongo::Monitoring::Event::Cmap::ConnectionCheckedOut)
98
- expect(check_out_results[1]).to be_a(Mongo::Monitoring::Event::Cmap::PoolCleared)
99
- expect(check_out_results[2]).to be_a(Mongo::Monitoring::Event::Cmap::ConnectionCheckOutFailed)
100
- expect(find_events.length).to eq(3)
104
+ end
105
+
106
+ it_behaves_like 'retries on PoolClearedError'
107
+
108
+ context 'legacy read retries' do
109
+
110
+ let(:client) { authorized_client.with(options.merge(retry_reads: false, max_read_retries: 1)) }
111
+
112
+ it_behaves_like 'retries on PoolClearedError'
101
113
  end
102
114
 
103
115
  after do
@@ -8,6 +8,8 @@ describe 'SDAM error handling' do
8
8
 
9
9
  clean_slate
10
10
 
11
+ retry_test
12
+
11
13
  after do
12
14
  # Close all clients after every test to avoid leaking expectations into
13
15
  # subsequent tests because we set global assertions on sockets.
@@ -76,9 +76,8 @@ describe 'SRV Monitoring' do
76
76
  # NotImplementedError: recvmsg_nonblock is not implemented
77
77
  fails_on_jruby
78
78
 
79
- before(:all) do
80
- require 'support/dns'
81
- end
79
+ # mock dns implementation doesn't play nice with 2.7, etc.
80
+ minimum_mri_version '3.0.0'
82
81
 
83
82
  around do |example|
84
83
  # Speed up the tests by listening on the fake ports we are using.
@@ -12,10 +12,6 @@ describe 'SRV lookup' do
12
12
  # NotImplementedError: recvmsg_nonblock is not implemented
13
13
  fails_on_jruby
14
14
 
15
- before(:all) do
16
- require 'support/dns'
17
- end
18
-
19
15
  let(:uri) do
20
16
  "mongodb+srv://test-fake.test.build.10gen.cc/?tls=#{SpecConfig.instance.ssl?}&tlsInsecure=true"
21
17
  end
@@ -168,16 +168,6 @@ RSpec.configure do |config|
168
168
  end
169
169
  end
170
170
 
171
- if SpecConfig.instance.ci? && !%w(1 true yes).include?(ENV['INTERACTIVE']&.downcase)
172
- # Tests should take under 10 seconds ideally but it seems
173
- # we have some that run for more than 10 seconds in CI.
174
- config.around(:each) do |example|
175
- TimeoutInterrupt.timeout(example_timeout_seconds, ExampleTimeout) do
176
- example.run
177
- end
178
- end
179
- end
180
-
181
171
  if SpecConfig.instance.ci?
182
172
  if defined?(Rfc::Rif)
183
173
  unless BSON::Environment.jruby?
@@ -4,6 +4,7 @@
4
4
  require 'spec_helper'
5
5
 
6
6
  describe Mongo::Collection do
7
+ retry_test
7
8
 
8
9
  let(:subscriber) { Mrss::EventSubscriber.new }
9
10
 
@@ -583,6 +583,28 @@ describe Mongo::Server::Connection do
583
583
  end
584
584
  end
585
585
 
586
+ context 'when the server returns unknown saslSupportedMechs' do
587
+ min_server_version '4.0'
588
+
589
+ let(:connection) do
590
+ described_class.new(server, server.options.merge(connection_pool: pool))
591
+ end
592
+
593
+ before do
594
+ expect_any_instance_of(Mongo::Server::PendingConnection).to receive(:get_handshake_response).and_wrap_original do |original_method, *args|
595
+ original_method.call(*args).tap do |result|
596
+ if result.documents.first.fetch('saslSupportedMechs', nil).is_a?(Array)
597
+ result.documents.first['saslSupportedMechs'].append('unknownMechanism')
598
+ end
599
+ end
600
+ end
601
+ end
602
+
603
+ it 'does not raise an error' do
604
+ expect { connection.connect! }.not_to raise_error
605
+ end
606
+ end
607
+
586
608
  end
587
609
 
588
610
  describe '#disconnect!' do
@@ -0,0 +1,28 @@
1
+ # Candidate Tasks
2
+
3
+ When using the `candidate` rake tasks, you must make sure:
4
+
5
+ 1. You are using at least `git` version 2.49.0.
6
+ 2. You have the `gh` CLI tool installed.
7
+ 3. You are logged into `gh` with an account that has collaborator access to the repository.
8
+ 4. You have run `gh repo set-default` from the root of your local checkout to set the default repository to the canonical MongoDB repo.
9
+ 5. The `origin` remote for your local checkout is set to your own fork.
10
+ 6. The `upstream` remote for your local checkout is set to the canonical
11
+ MongoDB repo.
12
+
13
+ Once configured, you can use the following commands:
14
+
15
+ 1. `rake candidate:prs` - This will list all pull requests that will be included in the next release. Any with `[?]` are unlabelled (or are not labelled with a recognized label). Otherwise, `[b]` means `bug`, `[f]` means `feature`, and `[x]` means `bcbreak`.
16
+ 2. `rake candidate:preview` - This will generate and display the release notes for the next release, based on the associated pull requests.
17
+ 3. `rake candidate:create` - This will create a new PR against the default repository, using the generated release notes as the description. The new PR will be given the `release-candidate` label.
18
+
19
+ Then, after the release candidate PR is approved and merged, the release process will automatically bundle, sign, and release the new version.
20
+
21
+ Once you've merged the PR, you can switch to the "Actions" tab for the repository on GitHub and look for the "Release" workflow (might be named differently), which should have triggered automatically. You can monitor the progress of the release there. If there are any problems, the workflow is generally safe to re-run after you've addressed them.
22
+
23
+ Things to do after the release succeeds:
24
+
25
+ 1. Copy the release notes from the PR and create a new release announcement on the forums (https://www.mongodb.com/community/forums/c/announcements/driver-releases/110).
26
+ 2. If the release was not automatically announced in #ruby, copy a link to the GitHub release or MongoDB forum post there.
27
+ 3. Close the release in Jira.
28
+
@@ -282,7 +282,7 @@ module Mrss
282
282
 
283
283
  def num_exposed_ports
284
284
  case @env['TOPOLOGY'] || 'standalone'
285
- when 'standalone'
285
+ when 'standalone', 'replica-set-single-node'
286
286
  1
287
287
  when 'replica-set'
288
288
  3