-
Notifications
You must be signed in to change notification settings - Fork 532
RUBY-3552 Deprecate support for server version 3.6 #2978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Adds a new Mongo::Deprecations module as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.