Skip to content

Commit

Permalink
CXX-2828 QE Range Protocol V2 (#1162)
Browse files Browse the repository at this point in the history
Adds support for the stable range protocol and addresses related issues:
- Sync range spec tests and implement range defaults prose test
- Debian 11 (MongoDB latest) removed and replaced with Debian 12
- Various small code changes to address warnings
- Update C driver to 1.28

---------

Co-authored-by: Kevin Albertson <[email protected]>
  • Loading branch information
adriandole and kevinAlbs authored Oct 1, 2024
1 parent 87fe3eb commit 0f990ca
Show file tree
Hide file tree
Showing 80 changed files with 2,362 additions and 879 deletions.
7 changes: 6 additions & 1 deletion .evergreen/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ linux*)
if [[ "${distro_id:?}" != rhel7* ]]; then
cxx_flags+=("-Wno-expansion-to-defined")
else
cxx_flags+=("-Wno-unused-parameter") # TODO: remove once C driver is upgraded to include fix of CDRIVER-5673.
cc_flags+=("-Wno-maybe-uninitialized") # Ignore false-positive warning in C driver build.
fi

if [[ "${distro_id:?}" == debian12* ]]; then
# Disable `restrict` warning on GCC 12 due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
cxx_flags+=("-Wno-error=restrict")
fi
;;
*)
Expand Down
26 changes: 5 additions & 21 deletions .mci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ variables:
# If updating mongoc_version_minimum, also update:
# - the default value of --c-driver-build-ref in etc/make_release.py
# - LIBMONGOC_REQUIRED_VERSION in src/mongocxx/CMakeLists.txt
mongoc_version_minimum: &mongoc_version_minimum "1.25.0"
# - the PURL version in etc/purls.txt
mongoc_version_minimum: &mongoc_version_minimum "1.28.0"

integration_matrix:
integration_matrix_tasks_single: &integration_matrix_tasks_single
Expand Down Expand Up @@ -1706,13 +1707,13 @@ buildvariants:
- name: compile_and_test_with_shared_libs_sharded_cluster_with_libmongocrypt
- name: build_example_with_add_subdirectory

- name: debian11-release-latest
display_name: "Debian 11 Release (MongoDB Latest)"
- name: debian12-release-latest
display_name: "Debian 12 Release (MongoDB Latest)"
expansions:
build_type: "Release"
mongodb_version: "latest"
run_on:
- debian11-large
- debian12-large
tasks:
- name: compile_and_test_with_shared_libs
- name: compile_and_test_with_shared_libs_extra_alignment
Expand Down Expand Up @@ -1744,23 +1745,6 @@ buildvariants:
- name: build_example_with_add_subdirectory
- name: uninstall_check

- name: debian10-release-latest
display_name: "Debian 10 Release (MongoDB Latest)"
expansions:
build_type: "Release"
mongodb_version: "latest"
run_on:
- debian10-large
tasks:
- name: compile_and_test_with_shared_libs
- name: compile_and_test_with_shared_libs_extra_alignment
- name: compile_and_test_with_static_libs
- name: compile_and_test_with_static_libs_extra_alignment
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
- name: compile_and_test_with_shared_libs_sharded_cluster_with_libmongocrypt
- name: build_example_with_add_subdirectory
- name: uninstall_check

- name: debian10-release-50
display_name: "Debian 10 Release (MongoDB 5.0)"
expansions:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu

## 3.11.0 [Unreleased]

### Added
- Introduces stable support for In-Use Encryption range indexes.

### Changed

- `FetchContent_MakeAvailable()` is used to populate dependencies instead of `FetchContent_Populate()` for the Mongo C Driver (when not provided by `CMAKE_PREFIX_PATH`) and mnmlstc/core (when automatically selected or when `BSONCXX_POLY_USE_MNMLSTC=ON`).
- Note: `FetchContent_Populate()` is still used for mnmlstc/core for CMake versions prior to 3.18 to avoid `add_subdirectory()` behavior.
- Test suite now uses Catch2 v3 via FetchContent instead of the bundled Catch2 v2 standalone header.
- C++14 or newer is now required to build tests when enabled with `ENABLE_TESTS=ON`.
- Bump minimum C Driver version to [1.28.0](https://github.com/mongodb/mongo-c-driver/releases/tag/1.28.0).

### Deprecated

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ else()
endif()

# Also update etc/purls.txt.
set(LIBBSON_REQUIRED_VERSION 1.25.0)
set(LIBBSON_REQUIRED_VERSION 1.28.0)
set(LIBBSON_REQUIRED_ABI_VERSION 1.0)

# Also update etc/purls.txt.
set(LIBMONGOC_REQUIRED_VERSION 1.25.0)
set(LIBMONGOC_DOWNLOAD_VERSION 1.25.0)
set(LIBMONGOC_REQUIRED_VERSION 1.28.0)
set(LIBMONGOC_DOWNLOAD_VERSION 1.28.0)
set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0)

set(NEED_DOWNLOAD_C_DRIVER false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedDate",
"bsonType": "date",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedDecimalNoPrecision",
"bsonType": "decimal",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedDecimalPrecision",
"bsonType": "decimal",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedDoubleNoPrecision",
"bsonType": "double",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedDoublePrecision",
"bsonType": "double",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedInt",
"bsonType": "int",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"path": "encryptedLong",
"bsonType": "long",
"queries": {
"queryType": "rangePreview",
"queryType": "range",
"contention": {
"$numberLong": "0"
},
"trimFactor": {
"$numberInt": "1"
},
"sparsity": {
"$numberLong": "1"
},
Expand Down
11 changes: 11 additions & 0 deletions data/client_side_encryption/legacy/azureKMS.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@
"bsonType": "string",
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
}
},
"encrypted_string_kmip_delegated": {
"encrypt": {
"keyId": [
{
"$uuid": "7411e9af-c688-4df7-8143-5e60ae96cba6"
}
],
"bsonType": "string",
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
}
}
},
"bsonType": "object"
Expand Down
4 changes: 3 additions & 1 deletion data/client_side_encryption/legacy/fle2v2-Compact.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"runOn": [
{
"minServerVersion": "7.0.0",
"serverless": "forbid",
"topology": [
"replicaset",
"sharded",
Expand Down Expand Up @@ -131,6 +130,9 @@
"command": {
"compactStructuredEncryptionData": "default"
}
},
"result": {
"ok": 1
}
}
],
Expand Down
Loading

0 comments on commit 0f990ca

Please sign in to comment.