Skip to content

Commit 5f7038e

Browse files
[v3.11] CXX-3363 bump downloaded C driver to 1.30.6 (#1475)
* bump auto-downloaded version to 1.30.6 * Keep required version the same to avoid a minor version dependency bump in a patch release. * regenerate SBOM-lite * update augmented SBOM from Evergreen * update CHANGELOG * fix referenced tag in purls.txt: `v1.30.6` => `1.30.6` * fix empty array test * Related: dc7839a * Condition assert on libmongoc versions. Evergreen tests with both 1.30.6 and 1.28.0. * update SDAM monitoring tests * Related: CXX-3208 * Condition assert on libmongoc versions. Evergreen tests with both 1.30.6 and 1.28.0. * update index test case for forward-compatibility with server 8.3 * remove `test atlas connectivity` * Related: CXX-3270 * remove `test_mongohouse` * Related: CXX-3322 * fix offset checks in examples * Related: CXX-3302 --------- Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
1 parent 943b0af commit 5f7038e

File tree

12 files changed

+60
-68
lines changed

12 files changed

+60
-68
lines changed

.mci.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -543,25 +543,6 @@ functions:
543543
export URI="mongodb://bob:pwd123@localhost"
544544
./.evergreen/connect.sh
545545
546-
"test atlas connectivity":
547-
- command: shell.exec
548-
params:
549-
shell: bash
550-
working_dir: "mongo-cxx-driver"
551-
silent: true
552-
script: |
553-
554-
export MONGOC_INSTALL_PREFIX=$(pwd)/../mongoc
555-
export MONGOCXX_INSTALL_PREFIX=$(pwd)/build/install
556-
export LIB_DIR=${lib_dir}
557-
export BUILD_TYPE=${build_type}
558-
export BUILD_DIR=$(pwd)/build
559-
560-
# The atlas_serverless_uri expansion is set in the Evergreen project settings.
561-
export URI="${atlas_serverless_uri}"
562-
563-
./.evergreen/connect.sh
564-
565546
"backtrace":
566547
- command: shell.exec
567548
params:
@@ -943,7 +924,6 @@ tasks:
943924
- func: "fetch_c_driver_source"
944925
- func: "compile"
945926
- func: "test auth"
946-
- func: "test atlas connectivity"
947927

948928
- name: compile_and_test_with_static_libs
949929
commands:
@@ -1187,16 +1167,6 @@ tasks:
11871167
local_file: rpm.tar.gz
11881168
content_type: ${content_type|application/x-gzip}
11891169

1190-
1191-
- name: test_mongohouse
1192-
commands:
1193-
- func: "setup"
1194-
- func: "fetch_c_driver_source"
1195-
- func: "compile"
1196-
- func: "build_mongohouse"
1197-
- func: "run_mongohouse"
1198-
- func: "test_mongohouse"
1199-
12001170
- name: test_versioned_api
12011171
commands:
12021172
- func: "setup"
@@ -2031,14 +2001,6 @@ buildvariants:
20312001
- name: compile_without_tests
20322002
- name: compile_macro_guard_tests
20332003

2034-
- name: mongohouse-ubuntu
2035-
display_name: "Mongohouse Test"
2036-
expansions:
2037-
build_type: "Release"
2038-
run_on: ubuntu2204-small
2039-
tasks:
2040-
- name: test_mongohouse
2041-
20422004
- name: zseries-rhel83-latest
20432005
display_name: "zSeries RHEL 8.3 (MongoDB Latest)"
20442006
batchtime: 1440 # 1 day

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
1313

1414
- The API version of auto-downloaded C Driver libraries no longer incorrectly inherits the C++ Driver's `BUILD_VERSION` value.
1515

16+
### Changed
17+
18+
- Bump the minimum required C Driver version to [1.30.6](https://github.com/mongodb/mongo-c-driver/releases/tag/1.30.6).
19+
1620
## 3.11.0
1721

1822
### Added

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ set(LIBBSON_REQUIRED_ABI_VERSION 1.0)
5454

5555
# Also update etc/purls.txt.
5656
set(LIBMONGOC_REQUIRED_VERSION 1.28.0)
57-
set(LIBMONGOC_DOWNLOAD_VERSION 1.28.0)
57+
set(LIBMONGOC_DOWNLOAD_VERSION 1.30.6)
5858
set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0)
5959

6060
set(NEED_DOWNLOAD_C_DRIVER false)

etc/augmented.sbom.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"version": "v1.1.0"
2828
},
2929
{
30-
"bom-ref": "pkg:github/mongodb/mongo-c-driver@v1.28.0",
30+
"bom-ref": "pkg:github/mongodb/mongo-c-driver@1.30.6",
3131
"copyright": "Copyright 2009-present MongoDB, Inc.",
3232
"externalReferences": [
3333
{
3434
"type": "distribution",
35-
"url": "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/v1.28.0.tar.gz"
35+
"url": "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.30.6.tar.gz"
3636
},
3737
{
3838
"type": "website",
39-
"url": "https://github.com/mongodb/mongo-c-driver/tree/v1.28.0"
39+
"url": "https://github.com/mongodb/mongo-c-driver/tree/1.30.6"
4040
}
4141
],
4242
"group": "mongodb",
@@ -48,21 +48,21 @@
4848
}
4949
],
5050
"name": "mongo-c-driver",
51-
"purl": "pkg:github/mongodb/mongo-c-driver@v1.28.0",
51+
"purl": "pkg:github/mongodb/mongo-c-driver@1.30.6",
5252
"type": "library",
53-
"version": "v1.28.0"
53+
"version": "1.30.6"
5454
}
5555
],
5656
"dependencies": [
5757
{
5858
"ref": "pkg:github/mnmlstc/core@v1.1.0"
5959
},
6060
{
61-
"ref": "pkg:github/mongodb/mongo-c-driver@v1.28.0"
61+
"ref": "pkg:github/mongodb/mongo-c-driver@1.30.6"
6262
}
6363
],
6464
"metadata": {
65-
"timestamp": "2025-02-19T21:01:34.820453+00:00",
65+
"timestamp": "2025-10-07T19:55:06.672956+00:00",
6666
"tools": [
6767
{
6868
"externalReferences": [

etc/cyclonedx.sbom.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"version": "v1.1.0"
2828
},
2929
{
30-
"bom-ref": "pkg:github/mongodb/mongo-c-driver@v1.28.0",
30+
"bom-ref": "pkg:github/mongodb/mongo-c-driver@1.30.6",
3131
"copyright": "Copyright 2009-present MongoDB, Inc.",
3232
"externalReferences": [
3333
{
3434
"type": "distribution",
35-
"url": "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/v1.28.0.tar.gz"
35+
"url": "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.30.6.tar.gz"
3636
},
3737
{
3838
"type": "website",
39-
"url": "https://github.com/mongodb/mongo-c-driver/tree/v1.28.0"
39+
"url": "https://github.com/mongodb/mongo-c-driver/tree/1.30.6"
4040
}
4141
],
4242
"group": "mongodb",
@@ -48,21 +48,21 @@
4848
}
4949
],
5050
"name": "mongo-c-driver",
51-
"purl": "pkg:github/mongodb/mongo-c-driver@v1.28.0",
51+
"purl": "pkg:github/mongodb/mongo-c-driver@1.30.6",
5252
"type": "library",
53-
"version": "v1.28.0"
53+
"version": "1.30.6"
5454
}
5555
],
5656
"dependencies": [
5757
{
5858
"ref": "pkg:github/mnmlstc/core@v1.1.0"
5959
},
6060
{
61-
"ref": "pkg:github/mongodb/mongo-c-driver@v1.28.0"
61+
"ref": "pkg:github/mongodb/mongo-c-driver@1.30.6"
6262
}
6363
],
6464
"metadata": {
65-
"timestamp": "2025-02-19T21:01:34.820453+00:00",
65+
"timestamp": "2025-10-07T19:55:06.672956+00:00",
6666
"tools": [
6767
{
6868
"externalReferences": [

etc/make_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
show_default=True,
8989
help='The remote reference which points to the mongodb/mongo-cxx-driver repo')
9090
@click.option('--c-driver-build-ref',
91-
default='1.28.0',
91+
default='1.30.6',
9292
show_default=True,
9393
help='When building the C driver, build at this Git reference')
9494
@click.option('--with-c-driver',

etc/purls.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# re-generate the SBOM JSON file!
77

88
# libbson and libmongoc are obtained via cmake/FetchMongoC.cmake.
9-
pkg:github/mongodb/mongo-c-driver@v1.28.0
9+
pkg:github/mongodb/mongo-c-driver@1.30.6
1010

1111
# mnmlstc/core is obtained via cmake/FetchMnmlstcCore.cmake.
1212
pkg:github/mnmlstc/core@v1.1.0

examples/api/bsoncxx/examples/validation/basic_usage.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ void example() {
6262
ASSERT(bsoncxx::validate(data, length) ==
6363
bsoncxx::validate(data, length, options, &offset));
6464

65-
// Not set when valid.
66-
ASSERT(offset == 123u);
65+
// [libbson < 1.30.5] Not set when valid.
66+
// [libbson >= 1.30.5] Set to 0 when valid.
67+
ASSERT(offset == 123u || offset == 0u);
6768
}
6869
}
6970
// [Example]

examples/api/bsoncxx/examples/validation/validator.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ void example(const std::uint8_t* bytes, std::size_t length) {
7777

7878
ASSERT(!bsoncxx::validate(bytes, length, options, &offset));
7979

80-
// Offset of `"$numberInt": "123"` relative to start of the sub-document. (CDRIVER-5710)
81-
ASSERT(offset == 4u);
80+
// [libbson < 1.30.5] Offset of `"$numberInt": "123"` relative to start of the
81+
// sub-document. (CDRIVER-5710)
82+
// [libbson >= 1.30.5] Offset of `"$numberInt": "123"` relative to start of the document.
83+
ASSERT(offset == 31u || offset == 4u);
8284
}
8385
}
8486
// [Example]

src/bsoncxx/test/json.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ TEST_CASE("empty array is converted correctly to json string") {
6262
using bsoncxx::to_json;
6363

6464
auto doc = make_document(kvp("array", make_array()));
65-
REQUIRE(0 == to_json(doc.view()).compare(R"({ "array" : [ ] })"));
65+
if (bson_get_major_version() == 1 && bson_get_minor_version() < 30) {
66+
// C driver versions prior to 1.30 have an extra space. Refer: mongoc-c-driver@f2c1bb79
67+
REQUIRE(0 == to_json(doc.view()).compare(R"({ "array" : [ ] })"));
68+
} else {
69+
REQUIRE(0 == to_json(doc.view()).compare(R"({ "array" : [ ] })"));
70+
}
6671
}
6772

6873
TEST_CASE("CXX-941 is resolved") {

0 commit comments

Comments
 (0)