Skip to content

feat(mongodb-runner): remove support for 4.2 servers - #869

Open
nbbeeken wants to merge 1 commit into
mainfrom
drop-42
Open

feat(mongodb-runner): remove support for 4.2 servers#869
nbbeeken wants to merge 1 commit into
mainfrom
drop-42

Conversation

@nbbeeken

@nbbeeken nbbeeken commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Copying the driver notification here:

Support for MongoDB 4.2 is removed

Warning

When the driver connects to a MongoDB server of version 4.2 or less, it will now throw an error.

In order to update the nodejs driver used in mongodb-runner then this package also needs to drop support.

Open Questions

https://www.mongodb.com/legal/support-policy/lifecycles

Checklist

Copilot AI lite review requested due to automatic review settings September 1, 2026 18:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates mongodb-runner to drop compatibility paths for MongoDB 4.2 by removing legacy (pre-structured logging) parsing logic and removing integration tests that spin up 4.2 via docker.

Changes:

  • Removed port/buildInfo extraction logic that relied on 4.2-era (logv1) plaintext log messages.
  • Deleted Linux-only docker integration tests that validated spawning MongoDB 4.2.x topologies.
  • Kept only structured-log (logv2) IDs as the supported mechanism for port/buildInfo discovery.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/mongodb-runner/src/mongologreader.ts Removes 4.2-era logv1 parsing branches for port/build info extraction; leaves only logv2-id based parsing.
packages/mongodb-runner/src/mongocluster.spec.ts Removes docker-based integration tests that exercised MongoDB 4.2.x clusters.
Suppressed comments (1)

packages/mongodb-runner/src/mongocluster.spec.ts:367

  • Now that the 4.2 docker-based integration tests are removed, there is no longer a regression test that verifies MongoDB 4.2 (and earlier) is rejected with a clear error. Since this PR’s purpose is to drop 4.2 support, please add a test that MongoCluster.start({ version: '4.2.x', ... }) fails with an explicit "MongoDB <= 4.2 is not supported"-style message (ideally thrown before download/spawn).
  it('can spawn a 6.x enterprise standalone mongod', async function () {
    if (
      (process.platform === 'win32' || process.platform === 'linux') &&
      process.env.CI
    ) {

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/mongodb-runner/src/mongocluster.spec.ts
Comment thread packages/mongodb-runner/src/mongologreader.ts
Comment thread packages/mongodb-runner/src/mongologreader.ts Outdated
@nbbeeken
nbbeeken marked this pull request as ready for review September 1, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants