RUBY-3552 Deprecate support for server version 3.6#2978
Merged
Conversation
Adds a new Mongo::Deprecations module as well
Contributor
There was a problem hiding this comment.
Pull request overview
This PR deprecates support for MongoDB server version 3.6 (wire version 6) by adding a new deprecation warning system. When the driver connects to a MongoDB 3.6 server, it will now log a warning indicating that support for this version will be removed in a future release.
Changes:
- Introduced a new
Mongo::Deprecationsmodule for tracking and reporting deprecated features with thread-safe, once-per-feature warning logic - Modified the
Features.check_driver_support!method to check for deprecated wire versions and issue warnings before checking for unsupported versions - Added test coverage for the deprecation warning functionality
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| lib/mongo/deprecations.rb | New module providing thread-safe deprecation warning system with once-per-feature tracking |
| lib/mongo/server/description/features.rb | Added DEPRECATED_WIRE_VERSIONS constant (set to 6..6 for MongoDB 3.6) and deprecation check logic in check_driver_support! |
| lib/mongo.rb | Added require statement for the new deprecations module |
| spec/mongo/server/description/features_spec.rb | Added test case verifying deprecation warning is issued for deprecated wire versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
comandeo-mongo
previously approved these changes
Jan 22, 2026
comandeo-mongo
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR deprecates support for MongoDB server version 3.6 in the Ruby driver. It also adds a new
Mongo::Deprecationsmodule, which we should embrace elsewhere in the code for warning about deprecated features.