feat(NODE-7547): bump minimum support server/wire versions to '4.4' & '9' respectively - #4994
Merged
PavelSafronov merged 42 commits intoJul 29, 2026
Merged
Conversation
johnmtll
force-pushed
the
NODE-7547/earliest-supported-server-version-eol
branch
from
July 13, 2026 14:05
90a1d86 to
334d8f3
Compare
This reverts commit dcafee6.
johnmtll
force-pushed
the
NODE-7547/earliest-supported-server-version-eol
branch
from
July 14, 2026 22:17
ca57a9f to
3297567
Compare
johnmtll
marked this pull request as ready for review
July 16, 2026 14:28
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Node.js driver’s compatibility floor by bumping the minimum supported MongoDB server version to 4.4 and the minimum supported wire version to 9, and then removing/adjusting code paths and tests that only existed to support 4.2-era behavior.
Changes:
- Bump server/wire version constants and remove 4.2 compatibility branches (e.g., comment gating, compatibility errors, retryable write label checks).
- Update unit/integration tests and mocks to reflect 4.4+ behavior; remove 4.2-only test cases and metadata.
- Update Evergreen CI matrix/tasks to stop running MongoDB 4.2 variants; add/adjust skips where legacy infra/spec fixtures no longer align.
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/operations/list_collections.test.js | Removes unit coverage for comment suppression on wire versions < 9. |
| test/unit/error.test.ts | Drops below-4.4 retryable-write-label cases and updates call signature usage. |
| test/unit/cmap/wire_protocol/constants.test.ts | Updates expectations for min server/wire constants (4.4 / 9). |
| test/unit/assorted/server_discovery_and_monitoring.spec.test.ts | Adds skipping of certain SDAM error spec tests that now fail under min wire v9. |
| test/tools/mongodb-mock/index.js | Updates default mock hello to report wire version 9 (4.4). |
| test/spec/server-discovery-and-monitoring/errors/post-42.yml.template | Updates generated SDAM error template to 4.4+/wire 9 requirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/spec/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.yml | Updates SDAM error fixture to wire 9 + runOnRequirements. |
| test/manual/ldap.test.ts | Skips LDAP manual tests pending infra migration to compatible server. |
| test/manual/kerberos.test.ts | Skips Kerberos manual tests pending infra migration to compatible server. |
| test/integration/sessions/sessions.prose.test.ts | Updates prose test comments to reference 4.4+ baseline. |
| test/integration/server-selection/server_selection.prose.sharded_retryable_reads.test.ts | Raises minimum server metadata to >= 4.4.0. |
| test/integration/server-selection/server_selection.prose.operation_count.test.ts | Raises minimum server metadata/comment to >= 4.4.0. |
| test/integration/server-discovery-and-monitoring/server_discovery_and_monitoring.prose.test.ts | Raises minimum server metadata/comment to >= 4.4.0. |
| test/integration/retryable-writes/retryable_writes.spec.prose.test.ts | Raises minimum server metadata/comments to 4.4+ and adjusts wording. |
| test/integration/retryable-reads/retryable_reads.spec.prose.test.ts | Raises minimum server comment to 4.4.0+. |
| test/integration/crud/find.test.ts | Removes a 4.2-only $where Code test and simplifies imports. |
| test/integration/connections-survive-step-down/connections_survive_step_down.prose.test.ts | Updates prose comments to reference 4.4+ baseline. |
| test/integration/connection-monitoring-and-pooling/rtt_pinger.test.ts | Updates comment about pre-hello server version pinning (4.4.x only). |
| test/integration/client-side-operations-timeout/client_side_operations_timeout.prose.test.ts | Updates prose comment to require 4.4+ enterprise baseline. |
| test/integration/change-streams/change_stream.test.ts | Removes 4.2-specific failpoint branching and related semver helper. |
| src/utils.ts | Removes now-obsolete commentary around future min-wire-version behavior. |
| src/sdam/server.ts | Updates retryable-write-label logic to no longer depend on max wire version/server type. |
| src/operations/list_databases.ts | Always attaches comment option now that min wire version is 9. |
| src/operations/list_collections.ts | Always attaches comment option now that min wire version is 9. |
| src/operations/indexes.ts | Removes pre-4.4 compatibility error for commitQuorum. |
| src/operations/get_more.ts | Always attaches comment option now that min wire version is 9. |
| src/operations/find_and_modify.ts | Removes pre-4.4 compatibility error for unacknowledged hint. |
| src/operations/delete.ts | Removes pre-4.4 compatibility error for unacknowledged deletes with hint. |
| src/error.ts | Simplifies retryable write label decisions to align with 4.4+ baseline. |
| src/cmap/wire_protocol/constants.ts | Updates MIN_SUPPORTED_SERVER_VERSION to 4.4 and MIN_SUPPORTED_WIRE_VERSION to 9. |
| src/cmap/connect.ts | Updates handshake error labeling path to use the new retryable-write-label helper signature. |
| src/cmap/command_monitoring_events.ts | Updates docs/comments to reflect 4.4+ baseline for serverConnectionId notes. |
| src/cmap/auth/mongodb_aws.ts | Removes 4.4+ compatibility check since <4.4 is no longer supported. |
| src/bulk/common.ts | Updates docs comment to reference 4.4+ (pipeline updates). |
| .evergreen/generate_evergreen_tasks.js | Updates CSFLE mongocryptd task gating from 4.2+ to 4.4+. |
| .evergreen/config.yml | Removes MongoDB 4.2 build variants/tasks and related TLS/CSFLE 4.2 tasks. |
| .evergreen/ci_matrix_constants.js | Removes MongoDB 4.2 from the evergreen CI version matrix. |
This reverts commit d9eedc1.
seanrmilligan
previously approved these changes
Jul 24, 2026
seanrmilligan
previously approved these changes
Jul 24, 2026
PavelSafronov
left a comment
Contributor
There was a problem hiding this comment.
Overall changes look great, there's just a few more spots where comments refer to older versions.
dariakp
previously requested changes
Jul 27, 2026
dariakp
reviewed
Jul 29, 2026
dariakp
left a comment
Contributor
There was a problem hiding this comment.
I have no further objections but I defer the full review to @PavelSafronov and team
seanrmilligan
approved these changes
Jul 29, 2026
PavelSafronov
approved these changes
Jul 29, 2026
PavelSafronov
deleted the
NODE-7547/earliest-supported-server-version-eol
branch
July 29, 2026 17:18
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.
Description
Summary of Changes
Bumps the minimum supported server version to 4.4, and the minimum supported wire version to 9. This requires some source code changes which remove functionally-dead code. Tears out the 4.2 server infra & eliminates test fixtures which rely on such infra. Also updates various comment verbiage to implicitly callout 4.4 as our earliest supported server version.
Notes for Reviewers
What is the motivation for this change?
Release Highlight
Bumped minimum server version (4.2 -> 4.4) & minimum wire version (8 -> 9)
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript