-
Notifications
You must be signed in to change notification settings - Fork 173
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
Conversation
@@ -1983,6 +1983,7 @@ buildvariants: | |||
os: | |||
- ubuntu-20.04 | |||
mongodb-version: | |||
- "latest" |
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.
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> { |
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.
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.
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.
just a small comment!
_ => { | ||
return Err(ErrorKind::IncompatibleServer { | ||
message: "Driver support of Queryable Encryption is incompatible with server. \ | ||
Upgrade server to use Queryable Encryption." |
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.
nit: can we add here that the min version to use queryable encryption is 7.0?
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.
Unfortunately not - the spec mandates (and the test validate) this precise error message.
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.