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

JAVA-5767 Support $lookup in CSFLE and QE #1638

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

katcharov
Copy link
Contributor

@katcharov katcharov commented Feb 24, 2025

JAVA-5767

Draft due to failing tests (4 and 6).

@katcharov katcharov requested a review from vbabanin February 24, 2025 21:59
katcharov and others added 2 commits February 25, 2025 07:25
@@ -60,7 +60,7 @@ val jnaLibsPath: String = System.getProperty("jnaLibsPath", "${jnaResourcesDir}$
val jnaResources: String = System.getProperty("jna.library.path", jnaLibsPath)

// Download jnaLibs that match the git tag or revision to jnaResourcesBuildDir
val downloadRevision = "9a88ac5698e8e3ffcd6580b98c247f0126f26c40" // r1.11.0
val downloadRevision = "67f10bfb8de69549987cc62a1d4548d7b511a7ef" // TODO
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO, confirm the hash we want to use

Copy link
Collaborator

Choose a reason for hiding this comment

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

Once libmongocrypt is released, we can replace this with the tag, e.g. 1.13.0, as that download url is also available

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Tagged commits are uploaded to a path with the tag. For reference, on 1.12.0 the Files tab shows two uploaded URLs:

https://mciuploads.s3.amazonaws.com/libmongocrypt/java/085a0ce6538a28179da6bfd2927aea106924443a/libmongocrypt-java.tar.gz
https://mciuploads.s3.amazonaws.com/libmongocrypt/java/1.12.0/libmongocrypt-java.tar.gz

Copy link
Member

Choose a reason for hiding this comment

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

Should we create a ticket for this //TODO until libmongocrypt is released, so we don't forget to update this hash to a tag before the driver release?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Release is imminent, so let's just wait a bit to merge.

@katcharov katcharov marked this pull request as ready for review February 25, 2025 23:48
@katcharov katcharov requested review from vbabanin and jyemin February 26, 2025 14:37
Copy link
Collaborator

@jyemin jyemin left a comment

Choose a reason for hiding this comment

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

I don't plan to review the prose tests in detail, but LGTM on the rest.

@@ -60,7 +60,7 @@ val jnaLibsPath: String = System.getProperty("jnaLibsPath", "${jnaResourcesDir}$
val jnaResources: String = System.getProperty("jna.library.path", jnaLibsPath)

// Download jnaLibs that match the git tag or revision to jnaResourcesBuildDir
val downloadRevision = "9a88ac5698e8e3ffcd6580b98c247f0126f26c40" // r1.11.0
val downloadRevision = "67f10bfb8de69549987cc62a1d4548d7b511a7ef" // TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Tagged commits are uploaded to a path with the tag. For reference, on 1.12.0 the Files tab shows two uploaded URLs:

https://mciuploads.s3.amazonaws.com/libmongocrypt/java/085a0ce6538a28179da6bfd2927aea106924443a/libmongocrypt-java.tar.gz
https://mciuploads.s3.amazonaws.com/libmongocrypt/java/1.12.0/libmongocrypt-java.tar.gz

import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static util.JsonPoweredTestHelper.getTestDocument;

public class ClientSideEncryption25LookupProseTests {
Copy link
Member

@vbabanin vbabanin Feb 26, 2025

Choose a reason for hiding this comment

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

[nit] For easier search in the future.

Suggested change
public class ClientSideEncryption25LookupProseTests {
/**
* <a href="https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#25-test-lookup">
*/
public class ClientSideEncryption25LookupProseTests {

"csfle, csfle2",
"qe, qe2",
"no_schema, no_schema2"})
void cases1Through7(final String from, final String to) {
Copy link
Member

@vbabanin vbabanin Feb 26, 2025

Choose a reason for hiding this comment

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

[nit] Just a bit more context that the test is about using multiple auto-encryption schemas. It might save time understanding its purpose in the future. Alternatively, "test" prefix or comment above a test could help.

Suggested change
void cases1Through7(final String from, final String to) {
void shouldUseMultipleAutoEncryptionSchemasCases1Through7(final String from, final String to) {

}

@Test
void case8() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
void case8() {
void shouldUseMultipleAutoEncryptionSchemasCase8() {

}

@Test
void case9() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
void case9() {
void shouldUseMultipleAutoEncryptionSchemasCase9() {

Copy link
Member

@vbabanin vbabanin left a comment

Choose a reason for hiding this comment

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

LGTM! Just couple of nits above.

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.

4 participants