Skip to content

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Apr 4, 2025

It has previously been not possible to use $lookup stage of a pipeline with automatic encryption attached to it. This adds a test to verify it is possible along with another dependency bump.

@gagik gagik force-pushed the gagik/update-mongo-crypt branch from 623b4fa to 68affa2 Compare April 4, 2025 08:33
"optionalDependencies": {
"kerberos": "2.1.0",
"mongodb-client-encryption": "^6.1.1"
"mongodb-client-encryption": "^6.3.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.

Seems like mongodb-client-encryption was previously bumped but this package was left at the old version; was this intentional?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I think that's just an oversight (or maybe a bad merge conflict resolve?) 👍

@gagik gagik force-pushed the gagik/update-mongo-crypt branch from 68affa2 to 28a4945 Compare April 4, 2025 08:36
@addaleax
Copy link
Collaborator

addaleax commented Apr 4, 2025

Just quoting myself from the ticket:

We will still want to add at least a mongosh e2e test on top of those, and we'll need to bump the crypt_shared library to 8.1 in both Compass and mongosh (for arm64/x64).

This should probably be an e2e test since we don't have the infrastructure for integration tests with the crypt_shared library in place in the shell-api package, and all similar tests are also e2e tests.

And, well, we need the 8.1 crypt_shared library, and that's not released yet.

@gagik gagik force-pushed the gagik/update-mongo-crypt branch from 28a4945 to a9a00c2 Compare April 4, 2025 10:32
@gagik gagik force-pushed the gagik/update-mongo-crypt branch from a9a00c2 to d6a3394 Compare April 4, 2025 10:33
@gagik gagik marked this pull request as draft April 4, 2025 10:33
@gagik gagik changed the title chore(deps): add test for $lookup with field level encryption COMPASS-8816 WIP - chore(deps): add test for $lookup with field level encryption COMPASS-8816 Apr 4, 2025
Copy link
Contributor Author

@gagik gagik left a comment

Choose a reason for hiding this comment

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

Look good and much cleaner, thank you!

@gagik gagik changed the title WIP - chore(deps): add test for $lookup with field level encryption COMPASS-8816 chore(deps): add tests for substrings, suffixes, prefixes with field level encryption COMPASS-8816 Sep 24, 2025
@gagik gagik changed the title chore(deps): add tests for substrings, suffixes, prefixes with field level encryption COMPASS-8816 chore(tests): add tests for substrings, suffixes, prefixes with field level encryption COMPASS-8816 Sep 24, 2025
@gagik gagik marked this pull request as ready for review September 24, 2025 09:40
@gagik gagik requested a review from a team as a code owner September 24, 2025 09:40
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 09:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds comprehensive test coverage for field-level encryption features in MongoDB 8.2+, including support for $lookup operations with automatic encryption and queryable encryption with prefix/suffix/substring searches. The changes also update MongoDB version references from release candidates to stable versions.

  • Adds test cases for $lookup aggregation pipeline operations with field-level encryption
  • Implements comprehensive tests for queryable encryption prefix/suffix/substring functionality in both automatic and explicit modes
  • Updates MongoDB 8.2 version references from RC to stable release

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testing/integration-testing-hooks.ts Adds version parameter support to crypto library download function and new array sorting utility
packages/shell-api/src/field-level-encryption.spec.ts Removes unreachable break statement and adds eslint disable comment
packages/e2e-tests/test/e2e-fle.spec.ts Adds comprehensive FLE test suite for 8.2+ features including $lookup and substring search capabilities
packages/build/src/packaging/download-crypt-library.ts Updates crypto library download logic to support specific version downloads
.evergreen/constants.js Updates MongoDB 8.2 version from RC4 to stable release
.evergreen.yml Updates test configuration to use stable 8.2.0 instead of RC versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

@gagik I guess you can't approve this directly, but let me know if this looks good in its current state 🙂

@gagik
Copy link
Contributor Author

gagik commented Sep 24, 2025

Looks good, the check failure is confusing, going to try to run it again 🤷

@addaleax addaleax merged commit 93d1eeb into main Sep 25, 2025
37 of 42 checks passed
@addaleax addaleax deleted the gagik/update-mongo-crypt branch September 25, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants