Skip to content
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

RUST-1605 Update to use libmongocrypt fle2v2 #863

Merged
merged 7 commits into from
Apr 25, 2023

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Apr 21, 2023

RUST-1605 / RUST-1581 / RUST-1620

The code changes here are pretty minor, it's largely a test sync. Because the tests had also been updated for RUST-1581 I included that in this PR, and because I was doing things with wire version I also included the bump for 7.0.

@@ -1983,6 +1983,7 @@ buildvariants:
os:
- ubuntu-20.04
mongodb-version:
- "latest"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The updated tests can only run on 7.0+, which the csfle suite wasn't running on before. latest as of yesterday was "7.1.0-alpha-220-g77c517c" so that covers it, and it seems good to be running csfle tests against latest anyway.

@@ -565,6 +565,28 @@ impl Client {
&self.inner.topology
}

pub(crate) async fn primary_description(&self) -> Option<crate::sdam::ServerDescription> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The spec includes a clause that creating collections with encrypted fields must be denied if the primary is <7.0. The reference implementation in the C driver actually does a full connection checkout to test that, but this lets us avoid that.

Unfortunately, simply peeking the latest topology description doesn't work because it's possible to call create_collection while the topology is still being discovered, so this waits for data to be populated.

@abr-egn abr-egn marked this pull request as ready for review April 21, 2023 17:10
@abr-egn abr-egn requested a review from isabelatkinson April 21, 2023 17:10
Copy link
Contributor

@isabelatkinson isabelatkinson left a comment

Choose a reason for hiding this comment

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

just a small comment!

_ => {
return Err(ErrorKind::IncompatibleServer {
message: "Driver support of Queryable Encryption is incompatible with server. \
Upgrade server to use Queryable Encryption."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we add here that the min version to use queryable encryption is 7.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately not - the spec mandates (and the test validate) this precise error message.

@abr-egn abr-egn merged commit b09fe5d into mongodb:main Apr 25, 2023
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.

2 participants