Skip to content

Conversation

@mattcollier
Copy link
Contributor

Thanks to @aljones15 for previous work in exploring the driver upgrade.

This implementation:

  • Works with and without authentication in the local test suite.
  • Works with existing test suites in relying libs without modification to the test framework/config.
  • Works with MongoDB Atlas in deployments without any changes to connect strings or config.
  • There should be no breaking changes in terms of the connection/authentication.
  • There are breaking changes related to the use of various driver APIs
    • The insert APIs no longer return the document that was inserted.

This has been tested with one top level app. I will be plugging it into additional Bedrock libs before release.

@aljones15
Copy link
Contributor

has this been tested for interoperability with the multiple backend libs that use @bedrock/mongodb? the big issue holding up the v4 driver was changes to how the modified results count were returned.

@mattcollier
Copy link
Contributor Author

@aljones15 the types of changes you mentioned related to driver API return value changes etc will still need to be addressed in relying libs.

@aljones15
Copy link
Contributor

@aljones15 the types of changes you mentioned related to driver API return value changes etc will still need to be addressed in relying libs.

ok well maybe those existing PRs can be revised to work with driver 6. thanks for this PR.

Copy link
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

serverSelectionTimeoutMS: 30000,
autoReconnect: false,
useNewUrlParser: true,
// promotes binary BSON values to native Node.js buffers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we mean to get rid of this comment? It's useful, IMO.

await Promise.all(unopened.map(async name => {
// Note: We only pass `{writeConcern}` here to get around a bug in mongodb
// node driver 3.6.4 where `writeConcern` from `db` is not passed to
// collection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this bug has been fixed now.

@dlongley
Copy link
Member

dlongley commented Mar 4, 2025

Some of the changes in this PR for v6 need to be adjusted (writeConcern) per #106. We might also just want a fresh PR since there are many conflicts with this one now.

Copy link
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #106 and latest comment here.

@dlongley
Copy link
Member

dlongley commented Mar 5, 2025

Closing in favor of #107, which includes some of the non-conflicting commits from this PR.

@dlongley dlongley closed this Mar 5, 2025
@dlongley dlongley deleted the driver-v6 branch March 5, 2025 22:44
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.

5 participants