mongodb / specifications

Specifications related to MongoDB
http://specifications.readthedocs.io/en/latest
Other
389 stars 242 forks source link

DRIVERS-2435 replace `fle2-*` tests with `fle2v2-*` tests #1391

Closed kevinAlbs closed 1 year ago

kevinAlbs commented 1 year ago

Summary

Tests were run with the Go driver: https://github.com/mongodb/mongo-go-driver/pull/1213

Background & Motivation

Terminology

Queryable Encryption is also referred to as QE or FLE2. The versions of the QE protocols are noted as QEv1 and QEv2. The QEv1 protocol is tested with the files matching fle2-*. The QEv2 protocol is tested with the files matching fle2v2-*.

Test updates

The fle2v2-* tests were copied from fle2-* tests. Expected payloads were updated by printing expectations and copying. The deleteTokens were removed in MONGOCRYPT-553 and are removed from test expectations.

Test requirements

QEv2 requires latest MongoDB 7.0.0 pre-release builds. QEv2 requires the featureFlagFLE2ProtocolVersion2 to be set. https://github.com/mongodb-labs/drivers-evergreen-tools/pull/285 proposes enabling this feature flag in drivers-evergreen-tools as a temporary solution until the flag is enabled by default in SERVER-69563 and latest server builds are updated.

Tests require libmongocrypt 1.8.0-alpha0 or newer. Binaries for 1.8.0-alpha0 are available here: https://spruce.mongodb.com/task/libmongocrypt_publish_upload_all_042603b1d72f49d9034e7059b82a65e843c7e38a_23_03_29_15_26_54/logs?execution=0

See the Go driver changes as an example of how drivers can use these tests.

Skip QE tests on Serverless

QEv2 tests fail on Serverless. Serverless is using the QEv1 protocol. Once Serverless enables QEv2, QE tests can be re-enabled. Re-enabling QE tests on Serverless is tracked in DRIVERS-2589.

Dropping tests of QEv1

Scope: Queryable Encryption Change the On-Disk Format and Wire Protocol has the goal:

- Drop support of QE on older server versions.

The server plans to drop QEv1 tests.

Starting 7.0, all of QEv1 will be removed from the server code base & all server testing will be against QEv2 only.

A rejected alternative is to add a requiresQEv1 field to the runOn block so test runners can conditionally skip the QEv1 tests after upgrading libmongocrypt to 1.8.0.


Please complete the following before merging: