-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(NODE-5419): move csfle source and tests into the driver #3770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b1da8a4
to
cecfdfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small fix ups, and from slack if we can get the CI green with skips (as long as the cursom version keeps working) we're good to go
test/integration/client-side-encryption/client_side_encryption.prose.06.corpus.test.js
Show resolved
Hide resolved
This reverts commit d427195.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've introduced a bunch of linter exemptions for the imports, let's just double check their used consistently eventually someone will h to have to clean them up.
Q about the FLE import change.
Description
What is changing?
This PR depends on mongodb/libmongocrypt#667.
This is a large PR but there's not much that can be done about that. I'll highlight the relevant changes here.
encryption
into thesrc
. The FLE logic was basically ported directly as-is intosrc
, with three modifications-- we no longer inject
mongodb
into any of the files. Instead, each file is a top-level module.-- we no longer inject BSON into any FLE logic. Each FLE class requires from
bson
directly now. And the _bson properties have been removed from each class as well.-- I converted the imports to
import
syntax instead ofrequire
syntax. I did this while debugging, it wasn't necessary, but once it was done I figured I'd leave it because it's one fewer thing to adjust when I convert the files to TS (up next). I can revert this now though, if y'all would like.integration/node-specific
andunit/client-side-encryption
.-- the unit tests were mostly left as-is, I plan to update them more when they're converted to TS. I did have to fix imports though. I also deleted some redundant tests.
-- any tests that required a "live server" have been moved into integration.
-- shared library tests were moved into
integration
, because we have integration testing environments that have the shared library installed.Some other misc changes
src
. changes were pretty minimal heredeps.ts
to align with our existing optional deps pattern.NOTE FOR REVIEWERS
Until an alpha is release of mongodb-client-encryption containing the changes to the FLE bindings, pretty much all CI is red. The important tests here are the custom dependency tests with a pinned commit, which pass.
All the integration tests and unit tests pass locally against a local copy the changes in mongodb/libmongocrypt#667 too. Once we merge the bindings changes, I'll release an alpha, pull the alpha into this PR and rerun CI.
To test the changes:
FLE_BINDINGS_PATH=<> ./etc/tooling/fle.sh link --build-libmongocrypt
Is there new documentation needed for these changes?
Not yet.
What is the motivation for this change?
Release Highlight
Fill in title or leave empty for no highlight
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript