Skip to content

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

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

Merged
merged 9 commits into from
Feb 27, 2025
Merged

Conversation

katcharov
Copy link
Collaborator

@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
Collaborator 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.

Copy link
Contributor

Choose a reason for hiding this comment

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

1.13.0 is released. Upload is available at:

https://mciuploads.s3.amazonaws.com/libmongocrypt/java/1.13.0/libmongocrypt-java.tar.gz

@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

"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) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used the "test" prefix.

For prose tests, I think the priority is being able to easily reference the prose test spec file. Tests should be numbered, with the number near the start of the test or file to ensure alphabetical sorting. If extra wording will help clarify, tests should match spec wording of the individual test (so tests should end up with mostly different names), and if the spec's test case naming is unclear, an edit should be made to the spec.

}

@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.

katcharov and others added 2 commits February 27, 2025 07:06
…ncryption25LookupProseTests.java

Co-authored-by: Viacheslav Babanin <[email protected]>
@katcharov katcharov requested a review from jyemin February 27, 2025 18:51
@katcharov katcharov merged commit eeceb63 into mongodb:main Feb 27, 2025
60 checks passed
@katcharov katcharov deleted the JAVA-5767 branch February 27, 2025 19:34
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