Skip to content

Commit 19a6099

Browse files
authored
Bump required C driver to 1.25.0 (#1056)
* bump required C driver to 1.25.0 * remove reference to removed EVG variant "Ubuntu 18.04 with minimum libmongoc" was removed in PR #1049. Testing with minimum libmongoc is now the default. * remove step for updating docker versions This step is listed in later in `Docker Image Build and Publish`. Building the Docker images requires downloading the C++ release tarball. Bump after tagging. * remove `check_docker_file_versions` The Docker versions are bumped after tagging the release. This check may not be expected to succeed during a release. * fix documented introduction of the auto C driver download It is introduced in 3.9.0 as part of CXX-2695. * add `-pthread` to example project build scripts This is a workaround until CDRIVER-4776 is resolved.
1 parent 8dcc51f commit 19a6099

File tree

7 files changed

+10
-72
lines changed

7 files changed

+10
-72
lines changed

.mci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variables:
1212
# If updating mongoc_version_minimum, also update:
1313
# - the default value of --c-driver-build-ref in etc/make_release.py
1414
# - LIBMONGOC_REQUIRED_VERSION in src/mongocxx/CMakeLists.txt
15-
mongoc_version_minimum: &mongoc_version_minimum "1.24.0"
15+
mongoc_version_minimum: &mongoc_version_minimum "1.25.0"
1616

1717
integration_matrix:
1818
integration_matrix_tasks_single: &integration_matrix_tasks_single

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ else()
4444
message(WARNING "Unknown compiler... recklessly proceeding without a version check")
4545
endif()
4646

47-
set(LIBBSON_REQUIRED_VERSION 1.24.0)
47+
set(LIBBSON_REQUIRED_VERSION 1.25.0)
4848
set(LIBBSON_REQUIRED_ABI_VERSION 1.0)
4949

50-
set(LIBMONGOC_REQUIRED_VERSION 1.24.0)
51-
set(LIBMONGOC_DOWNLOAD_VERSION ba5ab6de26a874d33b0abc3d2b46961a69380e7a) # TODO: update to 1.25.0 once C driver 1.25.0 is released.
50+
set(LIBMONGOC_REQUIRED_VERSION 1.25.0)
51+
set(LIBMONGOC_DOWNLOAD_VERSION 1.25.0)
5252
set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0)
5353

5454
set(NEED_DOWNLOAD_C_DRIVER false)

docs/content/mongocxx-v3/installation/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The above command would produce libraries named `libcustom_bsoncxx.so` and `libc
2323

2424
The mongocxx driver builds on top of the [MongoDB C driver](https://www.mongodb.com/docs/drivers/c/).
2525

26-
The build of mongocxx-3.8.1 automatically downloads and installs the C driver if the C driver is not detected.
26+
The build of mongocxx-3.9.0 automatically downloads and installs the C driver if the C driver is not detected.
2727
To use an existing install of the C driver, set `CMAKE_PREFIX_PATH` to the directory containing the C driver install.
2828

2929
* For mongocxx-3.8.x, libmongoc 1.24.0 or later is required.

etc/make_release.py

Lines changed: 1 addition & 53 deletions
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.24.0',
91+
default='1.25.0',
9292
show_default=True,
9393
help='When building the C driver, build at this Git reference')
9494
@click.option('--with-c-driver',
@@ -155,8 +155,6 @@ def release(jira_creds_file,
155155
click.echo('Nothing to do here...exiting!', err=True)
156156
sys.exit(1)
157157

158-
check_docker_file_versions(release_version)
159-
160158
if not working_dir_on_valid_branch(release_version):
161159
# working_dir_on_valid_branch() has already produced an error message
162160
sys.exit(1)
@@ -231,56 +229,6 @@ def release(jira_creds_file,
231229
release_notes_text, output_file, quiet)
232230

233231

234-
def check_docker_file_versions(mongo_cxx_release_ver: str):
235-
"""
236-
Checks that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt.
237-
Checks that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`.
238-
"""
239-
240-
extras_docker = pathlib.Path("./extras/docker")
241-
dockerfiles = extras_docker.rglob("Dockerfile")
242-
makefiles = extras_docker.rglob("Makefile")
243-
244-
# Get LIBMONGOC_REQUIRED_VERSION from CMakeLists.txt.
245-
got_LIBMONGOC_REQUIRED_VERSION = None
246-
contents = pathlib.Path("CMakeLists.txt").read_text()
247-
matches = re.findall(
248-
r"set\(LIBMONGOC_REQUIRED_VERSION\s+(.*?)\)", contents)
249-
if len(matches) != 1:
250-
click.echo('Expected to match one LIBMONGOC_REQUIRED_VERSION, got: {}'.format(
251-
matches), err=True)
252-
sys.exit(1)
253-
got_LIBMONGOC_REQUIRED_VERSION = matches[0]
254-
255-
# Check that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt.
256-
for dockerfile in dockerfiles:
257-
contents = pathlib.Path(dockerfile).read_text()
258-
matches = re.findall(r"MONGOC_VERSION=(.*)", contents)
259-
if len(matches) != 1:
260-
click.echo('Expected to match one MONGOC_VERSION in {}, got: {}'.format(
261-
dockerfile, matches), err=True)
262-
sys.exit(1)
263-
got_MONGOC_VERSION = matches[0]
264-
if got_MONGOC_VERSION != got_LIBMONGOC_REQUIRED_VERSION:
265-
click.echo('Expected MONGOC_VERSION({}) in {} to match LIBMONGOC_REQUIRED_VERSION({})'.format(
266-
got_MONGOC_VERSION, dockerfile, got_LIBMONGOC_REQUIRED_VERSION), err=True)
267-
sys.exit(1)
268-
269-
# Check that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`.
270-
for makefile in makefiles:
271-
contents = pathlib.Path(makefile).read_text()
272-
matches = re.findall(r"MONGOCXX_VERSION=(.*)", contents)
273-
if len(matches) != 1:
274-
click.echo('Expected to match one MONGOCXX_VERSION in {}, got: {}'.format(
275-
makefile, matches), err=True)
276-
sys.exit(1)
277-
got_MONGOCXX_VERSION = matches[0]
278-
if got_MONGOCXX_VERSION != mongo_cxx_release_ver:
279-
click.echo('Expected MONGOCXX_VERSION({}) in {} to match release tag({})'.format(
280-
got_MONGOCXX_VERSION, makefile, mongo_cxx_release_ver), err=True)
281-
sys.exit(1)
282-
283-
284232
def check_libmongoc_version():
285233
got_LIBMONGOC_REQUIRED_VERSION = None
286234
got_LIBMONGOC_DOWNLOAD_VERSION = None

etc/releasing.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ releasing 3.7.3, then refer to the the waterfall tracking
1919
If there are test failures, ensure they are at least expected or not introduced
2020
by changes in the new release.
2121

22-
In particular, check that the "Ubuntu 18.04 with minimum libmongoc" variant is
23-
passing to ensure that backports have not introduced a dependency on later
24-
versions of libmongoc.
25-
26-
## Check driver versions are correct for the Docker images
27-
28-
In `extras/docker/generate.py` check that the versions are correct and if
29-
appropriate, bump the version numbers for:
30-
- `MONGOCXX_VERSION`
31-
- `MONGOC_VERSION`
32-
- `MONGOCRYPT_VERSION`
33-
3422
## Check fixVersions in Jira
3523

3624
Ensure that all tickets under the

examples/projects/bsoncxx/pkg-config/static/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ CXX_STANDARD=${CXX_STANDARD:-11}
1313
rm -rf build/*
1414
cd build
1515
$CXX $CXXFLAGS -Wall -Wextra -Werror -std="c++${CXX_STANDARD}" -c -o hello_bsoncxx.o ../../../hello_bsoncxx.cpp $(pkg-config --cflags libbsoncxx-static)
16-
$CXX $LDFLAGS -std="c++${CXX_STANDARD}" -o hello_bsoncxx hello_bsoncxx.o $(pkg-config --libs libbsoncxx-static)
16+
# TODO: remove `-pthread` once CDRIVER-4776 is resolved.
17+
$CXX $LDFLAGS -pthread -std="c++${CXX_STANDARD}" -o hello_bsoncxx hello_bsoncxx.o $(pkg-config --libs libbsoncxx-static)
1718
./hello_bsoncxx

examples/projects/mongocxx/pkg-config/static/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ CXX_STANDARD=${CXX_STANDARD:-11}
1515
rm -rf build/*
1616
cd build
1717
$CXX $CXXFLAGS -Wall -Wextra -Werror -std="c++${CXX_STANDARD}" -c -o hello_mongocxx.o ../../../hello_mongocxx.cpp $(pkg-config --cflags libmongocxx-static) $PKGCONFIG_EXTRA_OPTS
18-
$CXX $LDFLAGS -std="c++${CXX_STANDARD}" -o hello_mongocxx hello_mongocxx.o $(pkg-config --libs libmongocxx-static) $PKGCONFIG_EXTRA_OPTS
18+
# TODO: remove `-pthread` once CDRIVER-4776 is resolved.
19+
$CXX $LDFLAGS -pthread -std="c++${CXX_STANDARD}" -o hello_mongocxx hello_mongocxx.o $(pkg-config --libs libmongocxx-static) $PKGCONFIG_EXTRA_OPTS
1920
./hello_mongocxx

0 commit comments

Comments
 (0)