Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mongodb/mongo-c-driver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.30.3
Choose a base ref
...
head repository: mongodb/mongo-c-driver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 5, 2025

  1. Copy the full SHA
    fb045b8 View commit details

Commits on Feb 6, 2025

  1. Copy the full SHA
    fec89a6 View commit details

Commits on Feb 7, 2025

  1. Copy the full SHA
    6856300 View commit details
  2. CDRIVER-5859 Integer comparison macro (#1845)

    * Integer type and range utilities.
    
    This will lay the basis for more convenient checked
    arithmetic going forward.
    
    * mlib/config.h header for common platform detection and utility macros
    * Integer comparison utilities.
    
    These are intended to replace existing integer comparison functions/macros.
    Having different comparison functions for differing sign/size combinations is
    error-prone, resists refactoring, and requires programmer diligence at call
    sites. `mlib_cmp` is a single macro that works with all integer types,
    regardless of sign or size.
    
    `mlib_cmp` internally branches on the signedness properties of the operands. In
    unoptimized cases, this may be slower, but any inliner should trivially
    eliminate the dead code branches.
    
    * Mass update: Replace `mcommon_cmp` with `mlib_cmp`
    * Rename variable to not fight with clang-format
    * Mark mlib_cmp as force-inline
    * Add a link-time check in release builds
    
    If we are building in optimized mode, we check that any calls to
    `mlib_cmp` are inlined and that DCE passes over the inlined result.
    
    * Move mcommon tests into mlib test file
    vector-of-bool authored Feb 7, 2025
    Copy the full SHA
    a842546 View commit details

Commits on Feb 10, 2025

  1. Suppress -Wdeprecated-declarations warnings for Cyrus Sasl and Secure…

    … Transport on MacOS (#1850)
    
    * CDRIVER-5879 remove global -Wno-deprecated-declarations on MacOS
    * CDRIVER-5867 address Cyrus SASL and Secure Transport -Wdeprecated-declarations warnings on MacOS
    eramongodb authored Feb 10, 2025
    Copy the full SHA
    9ef7136 View commit details
  2. CDRIVER-5854 Reserve final byte of bson_error_t for error category di…

    …sambiguation (#1834)
    
    * Use simple copy instead of memcpy
    * Relocate and refactor _mongoc_get_server_id_from_opts
    * Add bson_set_error_category
    * Add _mongoc_set_error*
    * Transitively include mongoc-error.h in mongoc-error-private.h
    * Address -Wmissing-field-initializers warnings
    * Relocate BSON_ERROR_BUFFER_SIZE changelog entry to 2.0.0 section
    * CDRIVER-362 remove handling of obsoleve server error 13390
    * Refactor common command error handling to _mongoc_cmd_set_error
    eramongodb authored Feb 10, 2025
    Copy the full SHA
    d367d65 View commit details

Commits on Feb 11, 2025

  1. Copy the full SHA
    bfc1405 View commit details
  2. CDRIVER-5889: Fix BSON_NORETURN for C23 standard (#1859)

    * Fix C23 version of BSON_NORETURN macro definition
    mdbmes authored Feb 11, 2025
    Copy the full SHA
    0924826 View commit details

Commits on Feb 14, 2025

  1. Fix example code for bson_writer_t in docs (#1861)

    * Fix declaration issue of variable `i`
    
    * Fix invalid usage of `BSON_APPEND_INT32`
    
    First parameter should be `bson_t *` instead of `bson_t **`.
    
    ---------
    
    Signed-off-by: linraymond2006 <linraymond2006@gmail.com>
    LinRaymond2006 authored Feb 14, 2025
    Copy the full SHA
    02598b1 View commit details

Commits on Feb 18, 2025

  1. CDRIVER-5897 Remove duplicated variable assignment in bson-decimal128…

    ….c (#1860)
    
    Signed-off-by: linraymond2006 <linraymond2006@gmail.com>
    LinRaymond2006 authored Feb 18, 2025
    Copy the full SHA
    8422cad View commit details

Commits on Feb 19, 2025

  1. Add description for dst parameter of bson_value_copy (#1874)

    `dst` should be uninitialized to prevent memory leak
    
    Signed-off-by: linraymond2006 <linraymond2006@gmail.com>
    LinRaymond2006 authored Feb 19, 2025
    Copy the full SHA
    0bfc37b View commit details
  2. Copy the full SHA
    69ed532 View commit details

Commits on Feb 20, 2025

  1. sync RPM spec w/ upstream (#1871)

    note: back out gcc-15 patch, since it wouldn't apply in any event
    rcsanchez97 authored Feb 20, 2025
    Copy the full SHA
    9049872 View commit details
  2. CDRIVER-5900 sync non-lb-connection-establishment (#1873)

    To specifications commit d05c33e0a6124ee7d1a9de665084d540b2ff06c5
    kevinAlbs authored Feb 20, 2025
    Copy the full SHA
    e5bc5a8 View commit details

Commits on Feb 24, 2025

  1. CDRIVER-5904 update scripts and release instructions for SilkBomb 2.0 (

    …#1882)
    
    * Remove create-silk-asset-group and related references
    * Remove Earthly sbom-download
    * Update Earthly sbom-generate for SilkBomb 2.0
    * Add Earthly sbom-validate and sbom-generate-new-serial-number
    * Add SBOM task to EVG config
    eramongodb authored Feb 24, 2025
    Copy the full SHA
    53f9fec View commit details
  2. [CDRIVER-5881] Remove the "forwarding" headers (#1881)

    * [CDRIVER-5881] Remove the "forwarding" headers
    
    The "forwarding" headers were added in 1.13.0 to support
    programs that include "mongoc.h" or "bson.h" directly. We now
    require that the header names be prefixed with their parent
    directory name.
    
    * Remove tests against C++ driver r3.8.0
    
    This version of the C++ library relies on the presence of the
    forwarding headers, and is thus incompatible.
    vector-of-bool authored Feb 24, 2025
    Copy the full SHA
    52a8afe View commit details
  3. Copy the full SHA
    e34a897 View commit details

Commits on Feb 25, 2025

  1. Copy the full SHA
    9d50274 View commit details

Commits on Feb 26, 2025

  1. Copy the full SHA
    0dc839c View commit details
  2. CDRIVER-5912 fix bounds-strict sanitizer (#1887)

    Remove size from flexible array member declaration of `jsonsl_st::stack`
    kevinAlbs authored Feb 26, 2025
    Copy the full SHA
    e93245d View commit details

Commits on Feb 27, 2025

  1. CDRIVER-5861 support $lookup in CSFLE and QE (#1880)

    * update table for test mock servers
    
    * remove trailing colons in error message
    
    * update libmongocrypt
    
    * pass all `listCollections` results to libmongocrypt
    
    Accounts for updated protocol in MONGOCRYPT-723.
    
    * fail test on error in `get_bson_from_json_file`
    
    * add test wire version checks for server 8.1
    
    * use `const` in `ASSERT_EQUAL_BSON`
    
    * implement prose tests
    
    * apply majority write concern
    
    * drop individual collections
    
    To match latest revision of prose tests
    
    * fix param name
    kevinAlbs authored Feb 27, 2025
    Copy the full SHA
    33ed617 View commit details
  2. CDRIVER-5891 extend C standard coverage up to C23 (#1890)

    * Ensure CC and CXX consistency, use CMAKE_GENERATOR for Visual Studio
    * Use ls_distro to reduce boilerplate
    * Sort std-matrix tasks by compiler and version
    * Support /std:clatest with MSVC
    * Exclude -Wc++98-compat warnings from public-header-warnings
    * Exclude -Wpre-c2x-compat warnings from public-header-warnings
    * Exclude -Wunsafe-buffer-usage from public-header-warnings
    * Address C2X compatibility issues due to _Bool macro expansions
    eramongodb authored Feb 27, 2025
    Copy the full SHA
    9b19be9 View commit details

Commits on Feb 28, 2025

  1. [CDRIVER-5916] Deprecate the Hedged-Reads APIs (#1889)

    * Tweak definition of deprecation macros.
    
    We now emit deprecation warnings on MSVC as well, and all deprecation
    warnings now include a string message, if possible.
    
    * Update existing deprecation attributes and formatting
    
    - Replace use of `BSON_GNUC_DEPRECATED...` with `BSON_DEPRECATED...`
    - Reformat attribute macros as attributes according to clang-format.
    - Give dense API listings in public headers some breathing room.
    
    * A macro to disable deprecation warnings with _Pragma
    * Annotate and document "hedge" APIs as deprecated
    vector-of-bool authored Feb 28, 2025
    Copy the full SHA
    d6f975d View commit details
  2. Copy the full SHA
    b9045da View commit details

Commits on Mar 3, 2025

  1. CDRIVER-5915: Fix for allocation of bson_t larger than half max size (#…

    …1891)
    
    addresses CDRIVER-5915, fixing three closely related problems:
    * rounding allocation size to the next power of two could cause BSON_MAX_SIZE to be exceeded
    * bson_reserve_buffer allocated more space than requested, equal to the previous document length
    * test_bson_reserve_buffer_errors had a flawed "too big" case which was masked by the other two issues
    additionally:
    * adds a test for allocating bson_t of exactly max size (on 64-bit systems only)
    * fix for potential integer overflow in bson_reserve_buffer() with overlong size
    * comments and assertions related to bson_t max size assumptions
    mdbmes authored Mar 3, 2025
    Copy the full SHA
    57bffac View commit details
  2. CDRIVER-5914: fix for internal issue (#1894)

    mdbmes authored Mar 3, 2025
    Copy the full SHA
    ba380a3 View commit details

Commits on Mar 6, 2025

  1. Copy the full SHA
    02760dc View commit details
  2. Copy the full SHA
    3c349a4 View commit details
  3. CDRIVER-5641: BSON Binary Vector Subtype Support (#1868)

    * Resolves CDRIVER-5641 by documenting and implementing new BSON Binary Vector APIs
    * Synced bson_binary_vector and bson_corpus spec tests from specifications commit 585b797c110b6709f81def6200b946b94c8d9c55
    * tests: Full support for the existing version of the spec test suite.
    * tests: TODOs mark spec test improvements that depend on DRIVERS-3095 and DRIVERS-3097.
    * tests: Additional API usage and fuzzing.
    * New BSON Binary APIs: bson_append_binary_uninit, bson_iter_binary_equal, bson_iter_binary_subtype, bson_iter_overwrite_binary
    * Extend existing big-endian byte swapping API for 32-bit float
    * Compiler support for restricted pointer aliasing using BSON_RESTRICT.
    * Added note about the differing public and private API of bson_iter_binary and friends
    * ASSERT_MEMCMP improvements: eval inputs once inside parens, show a hex dump on mismatch, include error location.
    mdbmes authored Mar 6, 2025
    Copy the full SHA
    1126b6e View commit details
  4. Copy the full SHA
    01101f4 View commit details

Commits on Mar 7, 2025

  1. [CDRIVER-5859] Enable sign-compare warnings globally, and fix them all (

    #1856)
    
    * Add a statement macro that can assert SIGABRT
    
    The `mlib_assert_aborts` macro checks that the following statement
    terminates the process with SIGABRT. This relies on `fork()`, so it only
    works on Unix systems. On Win32 it is a no-op.
    
    * New test assertion macro
    * Integer range looping macro.
    
    `mlib_foreach_irange` and `mlib_foreach_urange` provide
    concise looping over an integral range.
    
    * Looping over arrays
    * Replace all sign-compare loops with macro loops.
    
    This change swaps any `for (...)` loops that trigger
    `-Wsign-compare` with `mlib/loop` macros. This also simplifies
    redundant code around looping over array elements.
    
    * Integer encoding utilities.
    
    This adds function for reading little-endian i32, u32, i64, and u64 from
    pointers to memory. This allows us to decode integers in a single line
    instead of doing a declare+memcpy+byteswap that clutters the code and
    prevents us from using `const` and correct signedness. Instead, we can
    declare and initialize integers of the exact size and sign that we want
    in a single line.
    
    * Use integer decoding functions throughout the codebase
    * Enable sign-compare warnings globally, and fix every occurrence
    vector-of-bool authored Mar 7, 2025
    Copy the full SHA
    9152773 View commit details

Commits on Mar 10, 2025

  1. Copy the full SHA
    d2ac281 View commit details
  2. CDRIVER-5743: NUL terminate string, handle more error cases (#1903)

    * NUL termination and error handling fixes for mongoc_secure_channel_setup_ca
    mdbmes authored Mar 10, 2025
    Copy the full SHA
    edb2cce View commit details
  3. Copy the full SHA
    db338a0 View commit details
  4. Clean up Earthly task generation, add missing tasks (#1906)

    A recent change in task definitions caused the sasl=off tasks to be fully excluded from the Earthly task matrix. This was also caught by pylance/pyright in the earthly.py file when it detects unreachable branches. This small changeset re-enables those tasks and makes earthly.py warning-free.
    vector-of-bool authored Mar 10, 2025
    Copy the full SHA
    0d5145e View commit details
  5. CDRIVER-5880: Remove workaround for DRIVERS-3095, defer other test im…

    …provements (#1901)
    
    * DRIVERS-3095: Update float32 test (specifications change ccd72de68cc29b68fe55a79ad44d20b20ad1b4e7)
    * CDRIVER-5880: Remove workaround for DRIVERS-3095, defer other test improvements
    mdbmes authored Mar 10, 2025
    Copy the full SHA
    c186295 View commit details

Commits on Mar 11, 2025

  1. Copy the full SHA
    be04a7e View commit details
  2. Copy the full SHA
    136c3db View commit details

Commits on Mar 12, 2025

  1. Copy the full SHA
    0dfdb56 View commit details

Commits on Mar 13, 2025

  1. CDRIVER-5925 apply batchSize:0 to aggregate in change stream (#1909)

    Apply `batchSize:0` to `aggregate` for change stream when specified. Previously it was ignored.
    kevinAlbs authored Mar 13, 2025
    Copy the full SHA
    27d2a68 View commit details
  2. CDRIVER-955 remove mongoc_matcher_t (#1910)

    And provide migration suggestion in NEWS
    kevinAlbs authored Mar 13, 2025
    Copy the full SHA
    3a4c071 View commit details
  3. Copy the full SHA
    64dc7a7 View commit details
  4. Copy the full SHA
    d88f042 View commit details
  5. CDRIVER-4006 remove deprecated public API with oppressive language (#…

    …1908)
    
    * remove `mongoc_server_description_ismaster`
    
    * remove `MONGOC_QUERY_SLAVE_OK`
    
    * remove `MONGOC_URI_SLAVEOK`
    kevinAlbs authored Mar 13, 2025
    Copy the full SHA
    fe10e17 View commit details
  6. Copy the full SHA
    f2ed9aa View commit details

Commits on Mar 17, 2025

  1. CDRIVER-4489 refactor URI auth finalization by authentication mechan…

    …ism (#1896)
    
    * CDRIVER-3517 promote empty authSource to client error
    * CDRIVER-4128 promote invalid or unsupported CANONICALIZE_HOST_NAME values to client error
    * CDRIVER-5773 further remove support and testing of MONGODB-CR
    * CDRIVER-5776 avoid assertions for null fields
    * CDRIVER-5811 remove test skip for MONGODB-AWS username and password validation
    * CDRIVER-5812 remove workaround for incorrect MONGODB-AWS authSource
    * Modernize test code for URI and connection strings
    * Remove obsolete(?) comment concerning GSSAPISERVICENAME overwrites
    * Update wording for NEWS entries
    eramongodb authored Mar 17, 2025
    Copy the full SHA
    ae43242 View commit details
  2. Copy the full SHA
    803d005 View commit details
  3. CDRIVER-5711 remove mongoc_collection_delete and unused flags (#1923)

    * remove `mongoc_collection_delete`
    
    * remove `mongoc_delete_flags_t`
    
    * remove `mongoc_reply_flags_t` from public API
    kevinAlbs authored Mar 17, 2025
    Copy the full SHA
    a5fbace View commit details
  4. Copy the full SHA
    846c115 View commit details
  5. Copy the full SHA
    2846383 View commit details
Showing 698 changed files with 33,321 additions and 27,743 deletions.
8 changes: 8 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -53,6 +53,9 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
- BSON_GNUC_WARN_UNUSED_RESULT
- BSON_DEPRECATED
- BSON_DEPRECATED_FOR
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
@@ -102,7 +105,12 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
- mlib_foreach_irange
- mlib_foreach_urange
- mlib_foreach
- mlib_foreach_arr
IfMacros:
- mlib_assert_aborts
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
44 changes: 39 additions & 5 deletions .evergreen/benchmark.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ variables:
set -o errexit
set -o verbose
cmake -DENABLE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=mongoc -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF . && make -j8 && make install
cmake -DENABLE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=mongoc . && make -j8 && make install
git clone https://github.com/mongodb/mongo-c-driver-performance.git
cd mongo-c-driver-performance
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=../mongoc . && make -j8
@@ -170,10 +170,44 @@ functions:
file_location: mongo-c-driver/report.json

"send dashboard data" :
command: perf.send
params:
name: perf
file: mongo-c-driver/results.json
# Here we begin to generate the request to send the data to Signal Processing Service (SPS)
- command: shell.exec
params:
script: |
# We use the requester expansion to determine whether the data is from a mainline evergreen run or not
if [ "${requester}" == "commit" ]; then
echo "is_mainline: true" >> expansion.yml
else
echo "is_mainline: false" >> expansion.yml
fi
# We parse the username out of the order_id as patches append that in and SPS does not need that information
echo "parsed_order_id: $(echo "${revision_order_id}" | awk -F'_' '{print $NF}')" >> expansion.yml
- command: expansions.update
params:
file: expansion.yml
- command: shell.exec
params:
script: |
# Submit the performance data to the SPS endpoint
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
"https://performance-monitoring-api.corp.mongodb.com/raw_perf_results/cedar_report?project=${project_id}&version=${version_id}&variant=${build_variant}&order=${parsed_order_id}&task_name=${task_name}&task_id=${task_id}&execution=${execution}&mainline=${is_mainline}" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d @mongo-c-driver/results.json)
http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
# We want to throw an error if the data was not successfully submitted
if [ "$http_status" -ne 200 ]; then
echo "Error: Received HTTP status $http_status"
echo "Response Body: $response_body"
exit 1
fi
echo "Response Body: $response_body"
echo "HTTP Status: $http_status"
"backtrace":
- command: shell.exec
38 changes: 21 additions & 17 deletions .evergreen/config_generator/components/abi_compliance_check.py
Original file line number Diff line number Diff line change
@@ -2,45 +2,49 @@
from shrub.v3.evg_command import s3_put
from shrub.v3.evg_task import EvgTask

from config_generator.components.funcs.set_cache_dir import SetCacheDir

from config_generator.etc.function import Function
from config_generator.etc.utils import bash_exec


class CheckABICompliance(Function):
name = 'abi-compliance-check'
commands = [
commands = SetCacheDir.commands + [
bash_exec(
command_type=EvgCommandType.SETUP,
working_dir='mongoc',
include_expansions_in_env=['MONGO_C_DRIVER_CACHE_DIR'],
script='.evergreen/scripts/abi-compliance-check-setup.sh'
),
bash_exec(
command_type=EvgCommandType.SETUP,
command_type=EvgCommandType.TEST,
add_expansions_to_env=True,
working_dir='mongoc',
include_expansions_in_env=['MONGO_C_DRIVER_CACHE_DIR'],
script='.evergreen/scripts/abi-compliance-check.sh'
),
bash_exec(
command_type=EvgCommandType.TEST,
working_dir='mongoc',
env={
'AWS_ACCESS_KEY_ID': '${aws_key}',
'AWS_SECRET_ACCESS_KEY': '${aws_secret}',
},
script='''\
aws s3 cp abi-compliance/compat_reports s3://mciuploads/${project}/${build_variant}/${revision}/${version_id}/${build_id}/abi-compliance/compat_reports --recursive --acl public-read --region us-east-1
[[ ! -f ./abi-compliance/abi-error.txt ]]
'''
),
s3_put(
command_type=EvgCommandType.SYSTEM,
aws_key='${aws_key}',
aws_secret='${aws_secret}',
bucket='mciuploads',
content_type='text/html',
display_name='ABI Report:',
local_files_include_filter='mongoc/abi-compliance/compat_reports/**/*.html',
display_name='ABI Compliance Check: ',
local_files_include_filter='abi-compliance/compat_reports/**/compat_report.html',
permissions='public-read',
remote_file='${project}/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${execution}/abi-compliance-check/',
),
s3_put(
command_type=EvgCommandType.SYSTEM,
aws_key='${aws_key}',
aws_secret='${aws_secret}',
bucket='mciuploads',
content_type='text/plain',
display_name='ABI Compliance Check: ',
local_files_include_filter='abi-compliance/logs/**/log.txt',
permissions='public-read',
remote_file='${project}/${build_variant}/${revision}/${version_id}/${build_id}/abi-compliance/compat_report.html',
remote_file='${project}/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${execution}/abi-compliance-check/',
),
]

44 changes: 32 additions & 12 deletions .evergreen/config_generator/components/c_std_compile.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

from config_generator.etc.distros import find_large_distro
from config_generator.etc.distros import make_distro_str
from config_generator.etc.distros import to_cc
from config_generator.etc.distros import compiler_to_vars
from config_generator.etc.function import Function
from config_generator.etc.utils import bash_exec

@@ -17,14 +17,32 @@
# pylint: disable=line-too-long
# fmt: off
MATRIX = [
('debian92', 'clang', None, [11, ]),
('debian10', 'clang', None, [11, ]),
('debian10', 'gcc', None, [11, 17]),
('debian11', 'clang', None, [11, ]),
('debian11', 'gcc', None, [11, 17]),
('ubuntu2004', 'clang', None, [11, ]),
('ubuntu2004', 'gcc', None, [11, ]),
('windows-vsCurrent', 'vs2017x64', None, [11, 17]),
('rhel80', 'clang', None, [99, 11, 17, ]), # Clang 7.0
('ubuntu2004', 'clang-10', None, [99, 11, 17, 23]), # Clang 10.0 (max: C2x)
('rhel84', 'clang', None, [99, 11, 17, 23]), # Clang 11.0 (max: C2x)
('ubuntu2204', 'clang-12', None, [99, 11, 17, 23]), # Clang 12.0 (max: C2x)
('rhel90', 'clang', None, [99, 11, 17, 23]), # Clang 13.0 (max: C2x)
('rhel91', 'clang', None, [99, 11, 17, 23]), # Clang 14.0 (max: C2x)
('rhel92', 'clang', None, [99, 11, 17, 23]), # Clang 15.0 (max: C2x)
('rhel93', 'clang', None, [99, 11, 17, 23]), # Clang 16.0 (max: C2x)
('rhel94', 'clang', None, [99, 11, 17, 23]), # Clang 17.0 (max: C2x)
('rhel95', 'clang', None, [99, 11, 17, 23]), # Clang 18.0 (max: C23)

('rhel7.9', 'gcc', None, [99, 11, ]), # GCC 4.8 (max: C11)
('rhel80', 'gcc', None, [99, 11, 17, ]), # GCC 8.2 (max: C17)
('debian10', 'gcc-8', None, [99, 11, 17, ]), # GCC 8.3 (max: C17)
('rhel84', 'gcc', None, [99, 11, 17, ]), # GCC 8.4 (max: C17)
('ubuntu2004', 'gcc-9', None, [99, 11, 17, 23]), # GCC 9.4 (max: C2x)
('debian11', 'gcc-10', None, [99, 11, 17, 23]), # GCC 10.2 (max: C2x)
('rhel90', 'gcc', None, [99, 11, 17, 23]), # GCC 11.2 (max: C2x)
('rhel92', 'gcc', None, [99, 11, 17, 23]), # GCC 11.3 (max: C2x)
('rhel94', 'gcc', None, [99, 11, 17, 23]), # GCC 11.4 (max: C2x)
('rhel95', 'gcc', None, [99, 11, 17, 23]), # GCC 11.5 (max: C2x)

('windows-vsCurrent', 'vs2015x64', None, [99, 11, ]), # Max: C11
('windows-vsCurrent', 'vs2017x64', None, [99, 11, ]), # Max: C11
('windows-vsCurrent', 'vs2019x64', None, [99, 11, 17]), # Max: C17
('windows-vsCurrent', 'vs2022x64', None, [99, 11, 17]), # Max: C17
]
# fmt: on
# pylint: enable=line-too-long
@@ -54,18 +72,20 @@ def tasks():
res = []

for distro_name, compiler, arch, stds in MATRIX:
tags = [TAG, distro_name, compiler, 'compile']
compiler_type = compiler.split('-')[0]

tags = [TAG, distro_name, compiler_type, 'compile']

distro = find_large_distro(distro_name)

compile_vars = None
compile_vars = {'CC': to_cc(compiler)}
compile_vars = compiler_to_vars(compiler)

if arch:
tags.append(arch)
compile_vars.update({'MARCH': arch})

distro_str = make_distro_str(distro_name, compiler, arch)
distro_str = make_distro_str(distro_name, compiler_type, arch)

for std in stds:
with_std = {'C_STD_VERSION': std}
1 change: 0 additions & 1 deletion .evergreen/config_generator/components/cse/winssl.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('windows-64-vs2015', 'vs2015x64', None, ['cyrus']),
('windows-vsCurrent', 'vs2017x64', None, ['cyrus']),
]

49 changes: 15 additions & 34 deletions .evergreen/config_generator/components/earthly.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
"alpine3.18",
"alpine3.19",
"archlinux",
"centos7"
"centos7",
]
"Identifiers for environments. These correspond to special 'env.*' targets in the Earthfile."
CompilerName = Literal["gcc", "clang"]
@@ -36,13 +36,13 @@
# Other options: SSPI (Windows only), AUTO (not reliably test-able without more environments)
SASLOption = Literal["Cyrus", "off"]
"Valid options for the SASL configuration parameter"
TLSOption = Literal["LibreSSL", "OpenSSL", "off"]
TLSOption = Literal["OpenSSL", "off"]
"Options for the TLS backend configuration parameter (AKA 'ENABLE_SSL')"
CxxVersion = Literal["r3.8.0", "r3.9.0", "none"]
CxxVersion = Literal["none"] # TODO: Once CXX-3103 is released, add latest C++ release tag.
"C++ driver refs that are under CI test"

# A separator character, since we cannot use whitespace
_SEPARATOR = "\N{no-break space}\N{bullet}\N{no-break space}"
_SEPARATOR = "\N{NO-BREAK SPACE}\N{BULLET}\N{NO-BREAK SPACE}"


def os_split(env: EnvKey) -> tuple[str, None | str]:
@@ -59,9 +59,7 @@ def os_split(env: EnvKey) -> tuple[str, None | str]:
case "centos7":
return "CentOS", "7.0"
case _:
raise ValueError(
f"Failed to split OS env key {env=} into a name+version pair (unrecognized)"
)
raise ValueError(f"Failed to split OS env key {env=} into a name+version pair (unrecognized)")


class EarthlyVariant(NamedTuple):
@@ -135,7 +133,7 @@ class Configuration(NamedTuple):

@property
def suffix(self) -> str:
return f"{_SEPARATOR}".join(f"{k}={v}" for k, v in self._asdict().items())
return _SEPARATOR.join(f"{k}={v}" for k, v in self._asdict().items())


def task_filter(env: EarthlyVariant, conf: Configuration) -> bool:
@@ -144,27 +142,10 @@ def task_filter(env: EarthlyVariant, conf: Configuration) -> bool:
configuration values.
"""
match env, conf:
# We only need one task with "sasl=off"
case ["u22", "gcc"], ("off", "OpenSSL", "r3.8.0"):
return True
# The Ubuntu 18.04 GCC has a bug that fails to build the 3.8.0 C++ driver
case ["u18", "gcc"], [_, _, "r3.8.0"]:
return False
# Other sasl=off tasks we'll just ignore:
case _, ("off", _tls, _cxx):
return False
# Ubuntu and CentOS do not ship with a LibreSSL package:
case e, (_sasl, "LibreSSL", _cxx) if e.display_name.startswith("Ubuntu") or e.display_name.startswith("CentOS"):
return False
# u16 is not capable of building mongocxx
case e, (_, _, "none") if e.display_name.startswith("Ubuntu 16") or e.display_name.startswith("CentOS 7"):
return True
# Exclude u16 for all other configurations
case e, _ if e.display_name.startswith("Ubuntu 16") or e.display_name.startswith("CentOS 7"):
return False
# Exclude all other envs
case _, (_, _, "none"):
return False
# u16/centos7 are not capable of building mongocxx
case e, (_sasl, _tls, cxx) if re.match(r"^Ubuntu 16|^CentOS 7", e.display_name):
# Only build if C++ driver is test is disabled
return cxx == "none"
# Anything else: Allow it to run:
case _:
return True
@@ -230,11 +211,11 @@ def earthly_task(
commands=[
# Ensure subsequent Docker commands are authenticated.
subprocess_exec(
binary='bash',
command_type="setup",
binary="bash",
command_type=EvgCommandType.SETUP,
args=[
"-c",
'docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"'
r'docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"',
],
),
# First, just build the "env-warmup" which will prepare the build environment.
@@ -253,8 +234,8 @@ def earthly_task(
# The "targets" arg is for +run to specify which targets to run
args={"targets": " ".join(targets)} | earthly_args,
),
],
tags=[f"earthly", "pr-merge-gate", *env_tags],
], # type: ignore (The type annots on `commands` is wrong)
tags=["earthly", "pr-merge-gate", *env_tags],
run_on=CONTAINER_RUN_DISTROS,
)

9 changes: 1 addition & 8 deletions .evergreen/config_generator/components/funcs/fetch_source.py
Original file line number Diff line number Diff line change
@@ -18,14 +18,7 @@ class FetchSource(Function):
set -o errexit
set -o pipefail
if [ -n "${github_pr_number}" -o "${is_patch}" = "true" ]; then
# This is a GitHub PR or patch build, probably branched from master
if command -v python3 &>/dev/null; then
# Prefer python3 if it is available
echo $(python3 ./build/calc_release_version.py --next-minor) > VERSION_CURRENT
else
echo $(python ./build/calc_release_version.py --next-minor) > VERSION_CURRENT
fi
VERSION=$VERSION_CURRENT-${version_id}
VERSION=patch-${version_id}
else
VERSION=latest
fi
36 changes: 0 additions & 36 deletions .evergreen/config_generator/components/funcs/prepare_kerberos.py

This file was deleted.

Loading