Skip to content

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Oct 1, 2025

Description

Summary of Changes

This PR is a small feature branch containing the driver changes corresponding to breaking mongodb-client-encryption changes. It contains:

  • Error wrapping for errors thrown from mongodb-client-encryption in MongoCryptError instances.
  • Removal of enableMultipleCollInfo (it now defaults to 'enabled')
  • Removes crypto callbacks from the driver

Warning

Do not merge this PR until all mongodb-client-encryption changes are completed, an alpha has been released, and this PR is updated to use the alpha.

Notes for Reviewers

The changes in mongodb-js/mongodb-client-encryption#102 must be released before CI passes fully. The custom dependency tests use the changes from my other PR and should be passing.

What is the motivation for this change?

Release Highlight

All Encryption-Related Errors Subclass MongoError

The driver aims to ensure that all errors it throws are subclasses of MongoError. However, when using CSFLE or QE, the driver's encryption implementation sometimes could throw errors that were not instances of MongoError.

Now, all errors thrown during encryption are subclasses of MongoError.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson requested a review from a team as a code owner October 1, 2025 17:09
Copy link

There is an existing patch(es) for this commit SHA:

Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'.

@baileympearson
Copy link
Contributor Author

superceded by #4694

Copy link

There is an existing patch(es) for this commit SHA:

Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'.

@baileympearson baileympearson changed the title DO NOT MERGE: feat(NODE-7043, NODE-7217)!: wrap errors from mongodb-client-encryption in MongoCryptError instances DO NOT MERGE: feat(NODE-7043, NODE-7217, NODE-6793)!: adopt mongodb-client-encryption v7 Oct 1, 2025
@baileympearson baileympearson force-pushed the NODE-7043-error-wrapper branch from 1c150e4 to b67d4ef Compare October 1, 2025 21:28
@dariakp dariakp changed the title DO NOT MERGE: feat(NODE-7043, NODE-7217, NODE-6793)!: adopt mongodb-client-encryption v7 feat(NODE-7043, NODE-7217, NODE-6793)!: adopt mongodb-client-encryption v7 Oct 2, 2025
@dariakp dariakp added the wip label Oct 2, 2025
@baileympearson baileympearson force-pushed the NODE-7043-error-wrapper branch from b67d4ef to a70b1f5 Compare October 2, 2025 21:37
@baileympearson baileympearson removed the wip label Oct 3, 2025
@dariakp dariakp self-assigned this Oct 3, 2025
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 3, 2025
@baileympearson baileympearson requested a review from dariakp October 6, 2025 17:52
@dariakp dariakp added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Oct 6, 2025
@dariakp dariakp changed the title feat(NODE-7043, NODE-7217, NODE-6793)!: adopt mongodb-client-encryption v7 feat(NODE-7043, NODE-7217)!: adopt mongodb-client-encryption v7 Oct 6, 2025
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

LGTM

@dariakp dariakp merged commit 3f7196e into main Oct 6, 2025
24 of 27 checks passed
@dariakp dariakp deleted the NODE-7043-error-wrapper branch October 6, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants