feat(NODE-7547): bump minimum support server/wire versions to '4.4' & '9' respectively#4994
feat(NODE-7547): bump minimum support server/wire versions to '4.4' & '9' respectively#4994johnmtll wants to merge 37 commits into
Conversation
90a1d86 to
334d8f3
Compare
This reverts commit dcafee6.
ca57a9f to
3297567
Compare
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.
7191aa3 to
2447c1b
Compare
seanrmilligan
left a comment
There was a problem hiding this comment.
connection.ts has:
private get supportsOpMsg(): boolean {
return (
this.description != null &&
// TODO(NODE-6672,NODE-6287): This guard is primarily for maxWireVersion = 0
maxWireVersion(this) >= 6 &&
!this.description.__nodejs_mock_server__
);
}
It's linked to other work so I don't know what can of worms that is, but consider that the max wire version must always be >=6 because the min wire version is now 9. (Optional)
|
README.md: "The driver currently supports 4.2+ servers." |
|
We spoke out of band about our strategy to clean up comments about features where min versions are now below the floor server version they support. Thanks for cleaning those up! After those changes, LGTM |
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