Releases: mongodb/mongo-ruby-driver
Release list
2.25.0
The MongoDB Ruby team is pleased to announce version 2.25.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.25.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.25.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
Support $lookup in CSFLE/QE (RUBY-3611 | PR)
You can now use $lookup in aggregation pipelines that reference CSFLE- and QE-enabled collections.
Allow keyAltName in encrypted fields map (RUBY-3773 | PR)
When defining the encrypted fields for a collection (for use with Queryable Encryption), you may now specify the key via the keyAltName field, instead of by directly referencing a keyId.
Deprecate legacy retry tuning options (RUBY-3703 | PR)
The following options are deprecated when set on a Mongo::Client:
:max_read_retries:read_retry_interval:max_write_retries
These relate only to the legacy retry feature, which is itself deprecated and slated for removal. Modern
retryable reads and writes are enabled by default and ignore these options.
Deprecate server version 4.2 (RUBY-3811 | PR)
MongoDB server version 4.2 is EOL, and support for it will be removed from the driver in a future driver release. If you are using MongoDB server version 4.2, please upgrade to a newer version soon.
Other New Features
- Add Database#cursor_command to create a cursor from a command response (RUBY-3213 | PR)
- Support delegated protocol for CSFLE/QE KMIP (RUBY-3383 | PR)
- Support named KMS providers (type:name format) (RUBY-3363 | PR)
- Raise on invalid tls/ssl boolean URI option (RUBY-3832 | PR)
- Wrap error when mongocrypt_kms_ctx_fail returns false (RUBY-3601 | PR)
Bug Fixes
- redact credentials in URI rendering and InvalidURI errors (RUBY-3835 | PR)
- Fix raise_on_invalid handling and protect SRV monitor thread (RUBY-3838 | PR)
- Don't leak connections in load-balanced topology (PR)
- Fix secondaryPreferred non-compliance with server selection spec (RUBY-3768 | PR)
- Keep MemoryPointer alive in Binary.wrap_string (RUBY-3840 | PR)
- Stop publishing SDAM events from the Monitor's RTT checks (RUBY-3822 | PR)
- Send afterClusterTime on writes in causally-consistent sessions (RUBY-3820 | PR)
- Close monitoring connection when server marked Unknown from network error (RUBY-3909 | PR)
- Don't append read/write concerns to search index helpers (RUBY-3351 | PR)
2.23.1
The MongoDB Ruby team is pleased to announce version 2.23.1 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.23.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.23.1 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.23.1'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.24.1
The MongoDB Ruby team is pleased to announce version 2.24.1 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.24.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.24.1 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.24.1'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
- RUBY-3831 Skip OpenTelemetry command spans for sensitive commands (PR)
- RUBY-3456 Suppress no-op SDAM debug log lines (PR)
New Features
RUBY-3602 Include server address in OperationFailure and BulkWriteError messages (PR)
- New
Mongo::Config.include_server_address_in_errorsflag (defaultfalse). Whentrue,Mongo::Error::OperationFailureandMongo::Error::BulkWriteErrormessages are suffixed with(on host:port)so users can identify which server produced the error. - Both
#messageand#to_srender the suffix, since it's baked into the string passed tosuperat construction.ResultCombineraccumulates unique addresses across split bulk batches so multi-server bulks produce(on h1:27017, h2:27017). - Default-off behavior is byte-identical to current. No breaking changes. Planned to stay opt-in (no default flip).
RUBY-3220 Add databaseName property to command events (PR)
- Sync
find.ymlfrom the command-logging-and-monitoring spec socommandSucceededEventandcommandFailedEventexpectations includedatabaseName. Schema bumped from 1.1 to 1.15. - The Ruby driver's event classes already exposed
database_nameonCommandStarted,CommandSucceeded, andCommandFailed, and the unified runner already supports assertingdatabaseNameon any command event — this change exercises that path through the unified spec tests.
2.24.0
The MongoDB Ruby team is pleased to announce version 2.24.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.24.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.24.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
-
Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability. Note that these features require MongoDB Atlas Server Version 9.0+.
- Supported on all commands.
- Custom application retry logic may need to be adjusted to avoid retrying too long.
- Upgrade is recommended to avoid impacts of server changes related to overload errors.
- If not upgrading, custom application retry logic may need to be adjusted to handle higher rates of overload errors.
- Add URI option maxAdaptiveRetries to configure the maximum number of retries for operations that fail with a SystemOverloadedError (default: 2).
- Add URI option enableOverloadRetargeting to control whether retries of SystemOverloadedError will attempt to use a different server (default: false).
-
Added serverMonitoringMode option configures which server monitoring protocol to use. Valid modes are
"stream", "poll", or "auto". The default value is "auto":- With "stream" mode, the client use the streaming protocol when the server supports it or fall back to the polling protocol otherwise.
- With "poll" mode, the client use the polling protocol.
- With "auto" mode, the client behave the same as "poll" mode when running on a FaaS platform or the same as "stream" mode otherwise. The client detects that it's running on a FaaS platform via the same rules for generating the
client.envhandshake metadata field in theMongoDB Handshake spec.
-
RUBY-3381 RUBY-3640 Remove support for server versions 3.6 and 4.0 (PR)
Bug Fixes
2.23.0
The MongoDB Ruby team is pleased to announce version 2.23.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.23.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.23.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
RUBY-3612 OpenTelemetry (PR)
When the feature is enabled, Ruby driver traces driver operation and the corresponding server commands nested under the operation. Tracing can be enabled per Mongo::Client instance (by setting the tracing option to true), or globally via the OTEL_RUBY_INSTRUMENTATION_MONGODB_ENABLED environment variable.
RUBY-3552 and RUBY-3588 Deprecate support for server versions 3.6 and 4.0
Support for MongoDB server versions 3.6 and 4.0 is now deprecated, and will be removed in version 2.24.0 of the Ruby driver. If you are using MongoDB server version 4.0 or older, please upgrade to at least version 4.2.
Other New Features
- Add
csfle_convert_to_ruby_typesconfig option for converting encryption types (PR) - RUBY-3714 Client metadata capture for TruffleRuby (PR)
- RUBY-3519 Allow valid SRV hostnames with less than 3 parts (PR)
- Ruby 4.0 Support (PR)
Bug Fixes
2.22.0
The MongoDB Ruby team is pleased to announce version 2.22.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.22.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.22.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
Bug Fixes
2.20.2
The MongoDB Ruby team is pleased to announce version 2.20.2 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.20.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.20.2 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.20.2'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.3
The MongoDB Ruby team is pleased to announce version 2.21.3 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.21.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.21.3 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.21.3'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.2
The MongoDB Ruby team is pleased to announce version 2.21.2 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.21.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.21.2 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.21.2'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.1
Version 2.21.1 of the MongoDB Ruby Driver is now available. This is the latest patch release in the 2.21 series.
Install it via RubyGems at the command line:
$ gem install -v 2.21.1 mongo
Or via Bundler, in a Gemfile:
gem 'mongo', '2.21.1'
It adds the following new feature:
- RUBY-3395 Adds support for
vectorSearchsearch indexes, by adding atype:parameter to the#create_onemethod. (PR)
The following minor changes were made:
- RUBY-1933 Adds some debug-level logging around the initial DNS seed list query, to help when troubleshooting network issues (PR)
- RUBY-3299 Slight performance improvement for decrypting documents with a large number of encrypted fields (PR)
- RUBY-3429 Transient KMS errors are now retried. (PR)
It also includes the following bug fixes:
- RUBY-2467 Fixes a warning while installing the gem, caused by a missing subdirectory. Fixed by removing all specs from the generated gem; if you need the specs, please check out the repository. (PR)
- RUBY-3604 Fix a race condition in the authentication flow that could cause authentication to fail incorrectly when multiple simultaneous threads are attempting to authenticate. (PR by @jteich)
- RUBY-3658 When a timeout is specified on the client, database, or operation, partial writes to the server are never completed, resulting in timeouts. (PR)
Full Changelog: v2.21.0...v2.21.1