Skip to content

Conversation

@jamis
Copy link
Contributor

@jamis jamis commented Jan 16, 2026

This PR deprecates support for MongoDB server version 3.6 in the Ruby driver. It also adds a new Mongo::Deprecations module, which we should embrace elsewhere in the code for warning about deprecated features.

Adds a new Mongo::Deprecations module as well
@jamis jamis requested a review from a team as a code owner January 16, 2026 19:12
@jamis jamis added the feature A PR for a new feature label Jan 16, 2026
Copy link
Contributor

Copilot AI left a 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::Deprecations module 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A PR for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant