Skip to content

Commit 27d4cba

Browse files
eramongodbkevinAlbsconnorsmacd
authored
Update the r1.30 branch with recent EVG config updates and fixes (#2158)
* Fix unused test_framework_skip_if_not_single_version_5 warning * CDRIVER-5990 skip auth tests on zSeries (#1996) zSeries hosts are unable to connect to test server. See: DEVPROD-16954 * CDRIVER-6071 replace build-and-test-with-toolchain with openssl-compat (#2082) * Remove build-and-test-with-toolchain task * Add openssl-downloader.sh * CDRIVER-5995: unskip relevant auth tests * Fix and update run-auth-tests.sh * Fix and update run-aws-tests.sh * Fix and update run-ocsp-test.sh * Migrate OpenSSL compatibility checks into openssl-compat matrix * Disable failing OCSP darwinssl tasks * Add verification of shared vs. static linkage of OpenSSL * Remove obsolete BYPASS_FIND_CMAKE branches * Support forwarding extra CMake flags to compile_libmongocrypt * Add reference to CDRIVER-3759 * CDRIVER-6075 fix and update EVG task coverage on MacOS distros (#2088) * CDRIVER-6075 fix and update EVG task coverage on MacOS distros * CDRIVER-6079 skip /scram/cache_invalidation on macos-14-arm64 * CDRIVER-5987 remove serverless testing (#2116) * CDRIVER-6065 remove atlas data lake testing (#2117) * DRIVERS-3279 check for new "too-large" error code (#2106) * Address -Wuninitialized-const-pointer with Clang 21 (#2155) --------- Co-authored-by: Kevin Albertson <[email protected]> Co-authored-by: Connor MacDonald <[email protected]>
1 parent d0a72a2 commit 27d4cba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2601
-9277
lines changed

.evergreen/config_generator/components/c_std_compile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@
3939
('rhel95', 'gcc', None, [99, 11, 17, 23]), # GCC 11.5 (max: C2x)
4040
('ubuntu2404', 'gcc-13', None, [99, 11, 17, 23]), # GCC 13.3 (max: C2x)
4141

42-
('windows-vsCurrent', 'vs2017x64', None, [99, 11, 17, 'latest']), # Max: C17, clatest (C2x)
43-
('windows-vsCurrent', 'vs2019x64', None, [99, 11, 17, 'latest']), # Max: C17, clatest (C2x)
44-
('windows-vsCurrent', 'vs2022x64', None, [99, 11, 17, 'latest']), # Max: C17, clatest (C2x)
42+
('macos-14-arm64', 'clang', None, [99, 11, 17, 23]), # Apple Clang
43+
44+
('windows-vsCurrent', 'vs2015x64', None, [99, 11, ]), # Max: C11
45+
('windows-vsCurrent', 'vs2017x64', None, [99, 11, ]), # Max: C11
46+
('windows-vsCurrent', 'vs2019x64', None, [99, 11, 17]), # Max: C17
47+
('windows-vsCurrent', 'vs2022x64', None, [99, 11, 17]), # Max: C17
4548
]
4649
# fmt: on
4750
# pylint: enable=line-too-long

.evergreen/config_generator/components/cse/darwinssl.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,18 @@
1414
# pylint: disable=line-too-long
1515
# fmt: off
1616
COMPILE_MATRIX = [
17-
('macos-14', 'clang', None, ['cyrus']),
18-
19-
('macos-11-arm64', 'clang', None, ['cyrus']),
2017
('macos-14-arm64', 'clang', None, ['cyrus']),
18+
('macos-14', 'clang', None, ['cyrus']),
2119
]
2220

2321
# TODO (CDRIVER-3789): test cse with the 'sharded' topology.
2422
TEST_MATRIX = [
25-
('macos-14', 'clang', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0']),
26-
27-
('macos-11-arm64', 'clang', None, 'cyrus', ['auth'], ['server'], ['6.0']),
28-
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['server'], ['6.0']),
29-
23+
# Prefer macos-14-arm64 which is less resource-limited than macos-14. Provides 6.0+.
3024
# Test 7.0+ with a replica set since Queryable Encryption does not support the 'server' topology. Queryable Encryption tests require 7.0+.
31-
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['server', 'replica' ], ['7.0', '8.0', 'latest']),
25+
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['replica'], ['6.0', '7.0', '8.0', 'latest']),
26+
27+
# Pre-6.0 coverage. Resource-limited: use sparingly.
28+
('macos-14', 'clang', None, 'cyrus', ['auth'], ['replica'], ['4.2', '4.4', '5.0']),
3229
]
3330
# fmt: on
3431
# pylint: enable=line-too-long
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
from config_generator.etc.distros import find_large_distro, make_distro_str
2+
from config_generator.etc.function import Function
3+
from config_generator.etc.utils import bash_exec
4+
5+
from config_generator.components.funcs.fetch_source import FetchSource
6+
from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest
7+
8+
from shrub.v3.evg_build_variant import BuildVariant
9+
from shrub.v3.evg_command import EvgCommandType, FunctionCall
10+
from shrub.v3.evg_task import EvgTask, EvgTaskRef
11+
12+
from itertools import product
13+
14+
TAG = 'openssl-compat'
15+
16+
# pylint: disable=line-too-long
17+
# fmt: off
18+
OPENSSL_MATRIX = [
19+
('ubuntu2404', 'gcc', ['shared', 'static'], ['1.0.2', '1.1.1', '3.0.9', '3.1.2', '3.2.5', '3.3.4', '3.4.2', '3.5.1']),
20+
]
21+
# fmt: on
22+
23+
# pylint: disable=line-too-long
24+
# fmt: off
25+
OPENSSL_FIPS_MATRIX = [
26+
# https://openssl-library.org/source/
27+
# > The following OpenSSL version(s) are FIPS validated:
28+
# > - 3.1.2: FIPS 140-3
29+
# > - 3.0.9: FIPS 140-2
30+
# > - ...
31+
('ubuntu2404', 'gcc', ['shared', 'static'], ['3.0.9', '3.1.2']),
32+
]
33+
# fmt: on
34+
35+
36+
class OpenSSLSetup(Function):
37+
name = 'openssl-compat'
38+
commands = [
39+
bash_exec(
40+
command_type=EvgCommandType.SETUP,
41+
working_dir='mongoc',
42+
include_expansions_in_env=['OPENSSL_VERSION', 'OPENSSL_ENABLE_FIPS', 'OPENSSL_USE_STATIC_LIBS'],
43+
script='.evergreen/scripts/openssl-compat-setup.sh',
44+
),
45+
bash_exec(
46+
command_type=EvgCommandType.SETUP,
47+
working_dir='mongoc',
48+
include_expansions_in_env=['OPENSSL_VERSION', 'OPENSSL_USE_STATIC_LIBS'],
49+
script='.evergreen/scripts/openssl-compat-check.sh',
50+
),
51+
]
52+
53+
@classmethod
54+
def call(cls, **kwargs):
55+
return cls.default_call(**kwargs)
56+
57+
58+
def functions():
59+
return OpenSSLSetup.defn()
60+
61+
62+
def tasks():
63+
for distro_name, compiler, link_types, versions in OPENSSL_MATRIX:
64+
distro_str = make_distro_str(distro_name, compiler, None)
65+
66+
for link_type, version in product(link_types, versions):
67+
vars = {'OPENSSL_VERSION': version}
68+
69+
if link_type == 'static':
70+
vars |= {'OPENSSL_USE_STATIC_LIBS': 'ON'}
71+
72+
yield EvgTask(
73+
name=f'{TAG}-{version}-{link_type}-{distro_str}',
74+
run_on=find_large_distro(distro_name).name,
75+
tags=[TAG, f'openssl-{version}', f'openssl-{link_type}', distro_name, compiler],
76+
commands=[
77+
FetchSource.call(),
78+
FindCMakeLatest.call(),
79+
OpenSSLSetup.call(vars=vars),
80+
FunctionCall(func="run auth tests"),
81+
],
82+
)
83+
84+
for distro_name, compiler, link_types, versions in OPENSSL_FIPS_MATRIX:
85+
distro_str = make_distro_str(distro_name, compiler, None)
86+
87+
for link_type, version in product(link_types, versions):
88+
vars = {'OPENSSL_VERSION': version, 'OPENSSL_ENABLE_FIPS': 'ON'}
89+
90+
if link_type == 'static':
91+
vars |= {'OPENSSL_USE_STATIC_LIBS': 'ON'}
92+
93+
yield EvgTask(
94+
name=f'{TAG}-fips-{version}-{link_type}-{distro_str}',
95+
run_on=find_large_distro(distro_name).name,
96+
tags=[TAG, f'openssl-fips-{version}', f'openssl-{link_type}', distro_name, compiler],
97+
commands=[
98+
FetchSource.call(),
99+
FindCMakeLatest.call(),
100+
OpenSSLSetup.call(vars=vars),
101+
FunctionCall(func="run auth tests"),
102+
],
103+
)
104+
105+
106+
def variants():
107+
return [
108+
BuildVariant(
109+
name=f'{TAG}-matrix',
110+
display_name='OpenSSL Compatibility Matrix',
111+
tasks=[EvgTaskRef(name=f'.{TAG}')],
112+
),
113+
]

.evergreen/config_generator/components/openssl_static_compile.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

.evergreen/config_generator/components/sasl/darwinssl.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@
1515
# pylint: disable=line-too-long
1616
# fmt: off
1717
COMPILE_MATRIX = [
18-
('macos-14', 'clang', None, ['cyrus']),
19-
20-
('macos-11-arm64', 'clang', None, ['cyrus']),
2118
('macos-14-arm64', 'clang', None, ['cyrus']),
19+
('macos-14', 'clang', None, ['cyrus']),
2220
]
2321

2422
TEST_MATRIX = [
25-
('macos-14', 'clang', None, 'cyrus', ['auth'], ['server'], ['4.0', '4.2', '4.4', '5.0']),
23+
# Prefer macos-14-arm64 which is less resource-limited than macos-14. Provides 6.0+.
24+
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['replica'], ['6.0', '7.0', '8.0', 'latest']),
2625

27-
('macos-11-arm64', 'clang', None, 'cyrus', ['auth'], ['server'], ['6.0', '7.0', ]),
28-
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['server'], ['6.0', '7.0', '8.0', 'latest']),
26+
# Pre-6.0 coverage. Resource-limited: use sparingly.
27+
('macos-14', 'clang', None, 'cyrus', ['auth'], ['replica'], ['4.2', '4.4', '5.0']),
2928
]
3029
# fmt: on
3130
# pylint: enable=line-too-long

.evergreen/config_generator/etc/distros.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def ls_distro(name, **kwargs):
5757
]
5858

5959
MACOS_ARM64_DISTROS = [
60-
Distro(name='macos-11-arm64', os='macos', os_type='macos', os_ver='11', arch='arm64'),
6160
Distro(name='macos-14-arm64', os='macos', os_type='macos', os_ver='14', arch='arm64'),
6261
]
6362

.evergreen/generated_configs/functions.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,16 +327,30 @@ functions:
327327
- |
328328
# See SphinxBuild.cmake for EVG_DOCS_BUILD reasoning
329329
uv run --frozen --only-group docs env EVG_DOCS_BUILD=1 .evergreen/scripts/build-docs.sh
330-
openssl-static-compile:
330+
openssl-compat:
331331
- command: subprocess.exec
332-
type: test
332+
type: setup
333333
params:
334334
binary: bash
335335
working_dir: mongoc
336-
add_expansions_to_env: true
336+
include_expansions_in_env:
337+
- OPENSSL_VERSION
338+
- OPENSSL_ENABLE_FIPS
339+
- OPENSSL_USE_STATIC_LIBS
340+
args:
341+
- -c
342+
- .evergreen/scripts/openssl-compat-setup.sh
343+
- command: subprocess.exec
344+
type: setup
345+
params:
346+
binary: bash
347+
working_dir: mongoc
348+
include_expansions_in_env:
349+
- OPENSSL_VERSION
350+
- OPENSSL_USE_STATIC_LIBS
337351
args:
338352
- -c
339-
- .evergreen/scripts/compile-openssl-static.sh
353+
- .evergreen/scripts/openssl-compat-check.sh
340354
restore-instance-profile:
341355
- command: subprocess.exec
342356
params:

0 commit comments

Comments
 (0)