From 3339578ab32806fce4512124b6228aaaa795bd10 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 11:41:15 -0500 Subject: [PATCH 1/6] bump required C driver to 1.25.0 --- .mci.yml | 2 +- CMakeLists.txt | 6 +++--- etc/make_release.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.mci.yml b/.mci.yml index 4f4f9777f7..e8c72fd283 100644 --- a/.mci.yml +++ b/.mci.yml @@ -12,7 +12,7 @@ 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.24.0" + mongoc_version_minimum: &mongoc_version_minimum "1.25.0" integration_matrix: integration_matrix_tasks_single: &integration_matrix_tasks_single diff --git a/CMakeLists.txt b/CMakeLists.txt index 4aaa2ff6a7..a1b60bd2d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,11 +44,11 @@ else() message(WARNING "Unknown compiler... recklessly proceeding without a version check") endif() -set(LIBBSON_REQUIRED_VERSION 1.24.0) +set(LIBBSON_REQUIRED_VERSION 1.25.0) set(LIBBSON_REQUIRED_ABI_VERSION 1.0) -set(LIBMONGOC_REQUIRED_VERSION 1.24.0) -set(LIBMONGOC_DOWNLOAD_VERSION ba5ab6de26a874d33b0abc3d2b46961a69380e7a) # TODO: update to 1.25.0 once C driver 1.25.0 is released. +set(LIBMONGOC_REQUIRED_VERSION 1.25.0) +set(LIBMONGOC_DOWNLOAD_VERSION 1.25.0) set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0) set(NEED_DOWNLOAD_C_DRIVER false) diff --git a/etc/make_release.py b/etc/make_release.py index 471d20f21b..7066bff184 100755 --- a/etc/make_release.py +++ b/etc/make_release.py @@ -88,7 +88,7 @@ show_default=True, help='The remote reference which points to the mongodb/mongo-cxx-driver repo') @click.option('--c-driver-build-ref', - default='1.24.0', + default='1.25.0', show_default=True, help='When building the C driver, build at this Git reference') @click.option('--with-c-driver', From 25151098297ddaa3e544c29c17813432854ac4d1 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 10:48:28 -0500 Subject: [PATCH 2/6] 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. --- etc/releasing.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/etc/releasing.md b/etc/releasing.md index 7fb9a449b5..3d1d76bbfe 100644 --- a/etc/releasing.md +++ b/etc/releasing.md @@ -19,10 +19,6 @@ releasing 3.7.3, then refer to the the waterfall tracking If there are test failures, ensure they are at least expected or not introduced by changes in the new release. -In particular, check that the "Ubuntu 18.04 with minimum libmongoc" variant is -passing to ensure that backports have not introduced a dependency on later -versions of libmongoc. - ## Check driver versions are correct for the Docker images In `extras/docker/generate.py` check that the versions are correct and if From a82edada868ba8b9f342e22a523883660e9d2fdb Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 11:34:28 -0500 Subject: [PATCH 3/6] 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. --- etc/releasing.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/etc/releasing.md b/etc/releasing.md index 3d1d76bbfe..be7a45a058 100644 --- a/etc/releasing.md +++ b/etc/releasing.md @@ -19,14 +19,6 @@ releasing 3.7.3, then refer to the the waterfall tracking If there are test failures, ensure they are at least expected or not introduced by changes in the new release. -## Check driver versions are correct for the Docker images - -In `extras/docker/generate.py` check that the versions are correct and if -appropriate, bump the version numbers for: -- `MONGOCXX_VERSION` -- `MONGOC_VERSION` -- `MONGOCRYPT_VERSION` - ## Check fixVersions in Jira Ensure that all tickets under the From 58c3da22bbfff4f8a450784a7ca675f9157beee4 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 11:35:34 -0500 Subject: [PATCH 4/6] 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. --- etc/make_release.py | 52 --------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/etc/make_release.py b/etc/make_release.py index 7066bff184..0667937d83 100755 --- a/etc/make_release.py +++ b/etc/make_release.py @@ -155,8 +155,6 @@ def release(jira_creds_file, click.echo('Nothing to do here...exiting!', err=True) sys.exit(1) - check_docker_file_versions(release_version) - if not working_dir_on_valid_branch(release_version): # working_dir_on_valid_branch() has already produced an error message sys.exit(1) @@ -231,56 +229,6 @@ def release(jira_creds_file, release_notes_text, output_file, quiet) -def check_docker_file_versions(mongo_cxx_release_ver: str): - """ - Checks that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt. - Checks that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`. - """ - - extras_docker = pathlib.Path("./extras/docker") - dockerfiles = extras_docker.rglob("Dockerfile") - makefiles = extras_docker.rglob("Makefile") - - # Get LIBMONGOC_REQUIRED_VERSION from CMakeLists.txt. - got_LIBMONGOC_REQUIRED_VERSION = None - contents = pathlib.Path("CMakeLists.txt").read_text() - matches = re.findall( - r"set\(LIBMONGOC_REQUIRED_VERSION\s+(.*?)\)", contents) - if len(matches) != 1: - click.echo('Expected to match one LIBMONGOC_REQUIRED_VERSION, got: {}'.format( - matches), err=True) - sys.exit(1) - got_LIBMONGOC_REQUIRED_VERSION = matches[0] - - # Check that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt. - for dockerfile in dockerfiles: - contents = pathlib.Path(dockerfile).read_text() - matches = re.findall(r"MONGOC_VERSION=(.*)", contents) - if len(matches) != 1: - click.echo('Expected to match one MONGOC_VERSION in {}, got: {}'.format( - dockerfile, matches), err=True) - sys.exit(1) - got_MONGOC_VERSION = matches[0] - if got_MONGOC_VERSION != got_LIBMONGOC_REQUIRED_VERSION: - click.echo('Expected MONGOC_VERSION({}) in {} to match LIBMONGOC_REQUIRED_VERSION({})'.format( - got_MONGOC_VERSION, dockerfile, got_LIBMONGOC_REQUIRED_VERSION), err=True) - sys.exit(1) - - # Check that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`. - for makefile in makefiles: - contents = pathlib.Path(makefile).read_text() - matches = re.findall(r"MONGOCXX_VERSION=(.*)", contents) - if len(matches) != 1: - click.echo('Expected to match one MONGOCXX_VERSION in {}, got: {}'.format( - makefile, matches), err=True) - sys.exit(1) - got_MONGOCXX_VERSION = matches[0] - if got_MONGOCXX_VERSION != mongo_cxx_release_ver: - click.echo('Expected MONGOCXX_VERSION({}) in {} to match release tag({})'.format( - got_MONGOCXX_VERSION, makefile, mongo_cxx_release_ver), err=True) - sys.exit(1) - - def check_libmongoc_version(): got_LIBMONGOC_REQUIRED_VERSION = None got_LIBMONGOC_DOWNLOAD_VERSION = None From f7e04dd1464f3caacb01ba0d33d5735166b7ad20 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 11:38:41 -0500 Subject: [PATCH 5/6] fix documented introduction of the auto C driver download It is introduced in 3.9.0 as part of CXX-2695. --- docs/content/mongocxx-v3/installation/advanced.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/mongocxx-v3/installation/advanced.md b/docs/content/mongocxx-v3/installation/advanced.md index 73399ef947..08fe3657c1 100644 --- a/docs/content/mongocxx-v3/installation/advanced.md +++ b/docs/content/mongocxx-v3/installation/advanced.md @@ -23,7 +23,7 @@ The above command would produce libraries named `libcustom_bsoncxx.so` and `libc The mongocxx driver builds on top of the [MongoDB C driver](https://www.mongodb.com/docs/drivers/c/). -The build of mongocxx-3.8.1 automatically downloads and installs the C driver if the C driver is not detected. +The build of mongocxx-3.9.0 automatically downloads and installs the C driver if the C driver is not detected. To use an existing install of the C driver, set `CMAKE_PREFIX_PATH` to the directory containing the C driver install. * For mongocxx-3.8.x, libmongoc 1.24.0 or later is required. From e9f0f9d65026d76bbd0048625b6d04cf0ba5fa7f Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 8 Nov 2023 13:15:00 -0500 Subject: [PATCH 6/6] add `-pthread` to example project build scripts This is a workaround until CDRIVER-4776 is resolved. --- examples/projects/bsoncxx/pkg-config/static/build.sh | 3 ++- examples/projects/mongocxx/pkg-config/static/build.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/projects/bsoncxx/pkg-config/static/build.sh b/examples/projects/bsoncxx/pkg-config/static/build.sh index fc5e70ae17..8c893cb5e8 100755 --- a/examples/projects/bsoncxx/pkg-config/static/build.sh +++ b/examples/projects/bsoncxx/pkg-config/static/build.sh @@ -13,5 +13,6 @@ CXX_STANDARD=${CXX_STANDARD:-11} rm -rf build/* cd build $CXX $CXXFLAGS -Wall -Wextra -Werror -std="c++${CXX_STANDARD}" -c -o hello_bsoncxx.o ../../../hello_bsoncxx.cpp $(pkg-config --cflags libbsoncxx-static) -$CXX $LDFLAGS -std="c++${CXX_STANDARD}" -o hello_bsoncxx hello_bsoncxx.o $(pkg-config --libs libbsoncxx-static) +# TODO: remove `-pthread` once CDRIVER-4776 is resolved. +$CXX $LDFLAGS -pthread -std="c++${CXX_STANDARD}" -o hello_bsoncxx hello_bsoncxx.o $(pkg-config --libs libbsoncxx-static) ./hello_bsoncxx diff --git a/examples/projects/mongocxx/pkg-config/static/build.sh b/examples/projects/mongocxx/pkg-config/static/build.sh index da5d368876..ef6f58e697 100755 --- a/examples/projects/mongocxx/pkg-config/static/build.sh +++ b/examples/projects/mongocxx/pkg-config/static/build.sh @@ -15,5 +15,6 @@ CXX_STANDARD=${CXX_STANDARD:-11} rm -rf build/* cd build $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 -$CXX $LDFLAGS -std="c++${CXX_STANDARD}" -o hello_mongocxx hello_mongocxx.o $(pkg-config --libs libmongocxx-static) $PKGCONFIG_EXTRA_OPTS +# TODO: remove `-pthread` once CDRIVER-4776 is resolved. +$CXX $LDFLAGS -pthread -std="c++${CXX_STANDARD}" -o hello_mongocxx hello_mongocxx.o $(pkg-config --libs libmongocxx-static) $PKGCONFIG_EXTRA_OPTS ./hello_mongocxx