-
Notifications
You must be signed in to change notification settings - Fork 245
DRIVERS-2888 Support QE with Client.bulkWrite #1770
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Kevin Albertson <[email protected]>
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.
I may be out of the loop on some of the context, are drivers changes needed to get these passing? Is there a specific libmongocrypt version needed?
There seems to be more unified test changes in the C driver than are here, are those just extra test sync(s) or are they new tests?
Node.js Test Failures
1) CRUD unified
client bulkWrite with queryable encryption
client bulkWrite QE replaceOne:
MongoBulkWriteError: Document failed validation
at LegacyOrderedBulkOperation.handleWriteError (src/bulk/common.ts:1224:13)
at executeCommands (src/bulk/common.ts:587:19)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async BulkWriteShimOperation.execute (src/bulk/common.ts:882:12)
at async tryOperation (src/operations/execute_operation.ts:283:14)
at async executeOperation (src/operations/execute_operation.ts:115:12)
at async LegacyOrderedBulkOperation.execute (src/bulk/common.ts:1211:12)
at async BulkWriteOperation.execute (src/operations/bulk_write.ts:60:12)
at async InsertManyOperation.execute (src/operations/insert.ts:147:19)
at async tryOperation (src/operations/execute_operation.ts:283:14)
at async executeOperation (src/operations/execute_operation.ts:115:12)
at async Collection.insertMany (src/collection.ts:307:12)
at async insertMany (test/tools/unified-spec-runner/operations.ts:411:10)
at async executeOperationAndCheck (test/tools/unified-spec-runner/operations.ts:1039:14)
at async runUnifiedTest (test/tools/unified-spec-runner/runner.ts:226:9)
at async Context.<anonymous> (test/tools/unified-spec-runner/runner.ts:336:13)
2) CRUD unified
client bulkWrite with queryable encryption
client bulkWrite QE with multiple replace fails:
AssertionError: Operation clientBulkWrite succeeded but was not supposed to
at executeOperationAndCheck (test/tools/unified-spec-runner/operations.ts:1057:12)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async runUnifiedTest (test/tools/unified-spec-runner/runner.ts:226:9)
at async Context.<anonymous> (test/tools/unified-spec-runner/runner.ts:336:13)
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.
Suggest updating this PR description to give an overview of needed changes. I expect implementors will refer to this PR (and the C driver PR).
C driver implementation
Suggest linking to the C driver PR (once created) rather than the Evergreen patch. The patch appears to include unrelated spec tests.
replacement: { encryptedInt: 44 } | ||
expectError: | ||
# Expect error from mongocryptd or crypt_shared | ||
isError: true |
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.
Suggest using errorContains
to match the error message. That may help ensure this receives the expected error from mongocryptd / crypt_shared.
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.
Suggest adding prose tests to test batch splitting for MongoClient.bulkWrite
with QE. There are existing prose tests for MongoCollection.bulkWrite
with CSFLE.
|
||
runOnRequirements: | ||
- minServerVersion: "8.0" | ||
serverless: forbid # Serverless does not support bulkWrite: CLOUDP-256344. |
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.
Skip this test on standalone since QE does not support standalone. Add a csfle: true
requirement.
(Aside: running this test in the C driver evergreen may need a change similar to mongodb/mongo-c-driver#2063)
Add spec test for client bulkWrite QE.
C driver implementation
libmongocrypt requirement: 1.13
Drivers changes required:
Please complete the following before merging:
clusters, and serverless).