Skip to content

CDRIVER-3620 Add SASL, CSE, and Sanitizers matrices #1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f0e1ba7
Remove unused __hash__ from Distro class
eramongodb Feb 1, 2023
c410922
Relocate DarwinSSL SASL tests to config_generator
eramongodb Jan 31, 2023
764fef3
Relocate WinSSL SASL tests to config_generator
eramongodb Jan 31, 2023
fbce366
Relocate Static OpenSSL SASL tests to config_generator
eramongodb Jan 31, 2023
6b28f76
Relocate OpenSSL SASL tests to config_generator
eramongodb Feb 2, 2023
504925a
Relocate NoSSL SASL tests to config_generator
eramongodb Feb 2, 2023
2e374e8
Relocate DarwinSSL CSE tests to config_generator
eramongodb Feb 2, 2023
c9c9edb
Relocate WinSSL CSE tests to config_generator
eramongodb Feb 2, 2023
7a93cdd
Relocate Static OpenSSL CSE tests to config_generator
eramongodb Feb 2, 2023
68f30ce
Relocate OpenSSL CSE tests to config_generator
eramongodb Feb 2, 2023
1b94e89
Use common generate_compile_tasks function
eramongodb Feb 2, 2023
19ae587
Relocate ASAN tests to config_generator
eramongodb Feb 2, 2023
90c30ed
Relocate TSAN tests to config_generator
eramongodb Feb 3, 2023
d25f90c
Remove UBSAN tasks in favor of ASAN+UBSAN
eramongodb Feb 3, 2023
9cee031
Clean up IntegrationTask -> CoverageTask
eramongodb Feb 3, 2023
2dc72e2
Relocate C11 compatibility tests to config_generator
eramongodb Feb 3, 2023
f842e75
Merge macos-1100-arm64 compile task into sasl.darwinssl
eramongodb Feb 3, 2023
fe36a81
Remove compile tasks without dependent test task
eramongodb Feb 3, 2023
8328206
Sync CSE compile definition
eramongodb Feb 3, 2023
bf90754
Remove trailing tasks from clang34ubuntu variant
eramongodb Feb 3, 2023
9fd7427
Avoid compiling libmongoc when compiling libmongocrypt
eramongodb Feb 9, 2023
fb07ade
Remove unused SSPI compile functions
eramongodb Feb 9, 2023
5838f77
Change sasl-auto -> sasl-cyrus to ensure SASL is required
eramongodb Feb 9, 2023
aa70d79
Fix missing handling of MARCH variable in compile-unix.sh
eramongodb Feb 9, 2023
3e8cc63
Move Static OpenSSL compile coverage into seperate component
eramongodb Feb 9, 2023
6b4467d
Update cse.openssl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
66733f1
Update cse.winssl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
c707338
Update cse.darwinssl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
adc1564
Update sasl.nossl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
1b56bad
Remove noauth from test matrices
eramongodb Feb 9, 2023
f509b96
Update sasl.openssl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
ff2e29f
Update sasl.winssl.TEST_MATRIX as suggested
eramongodb Feb 9, 2023
fbb715c
Update std.std_c11.COMPILE_MATRIX as suggested
eramongodb Feb 9, 2023
23176ab
Add C17 compile coverage
eramongodb Feb 9, 2023
6b74c4a
Group std matrices into single simple component
eramongodb Feb 9, 2023
a80ae16
Silence file exists warning in upload-test-results
eramongodb Feb 9, 2023
fdfe1dc
Resolve merge conflicts
eramongodb Feb 9, 2023
ddf692d
Merge remote-tracking branch 'upstream/master' into HEAD
eramongodb Feb 10, 2023
3374c5a
Limit tests executed to /client_side_encryption for CSE tasks
eramongodb Feb 10, 2023
5a83f05
Remove 4.2 and 4.4 tests on rhel83-zseries
eramongodb Feb 10, 2023
acfc480
CDRIVER-4347 Remove skipped tests due to OCSP verification failure
eramongodb Feb 10, 2023
df3a8c7
Use Cyrus for non-NoSSL tests
eramongodb Feb 10, 2023
1b235fc
Revenge of scan-build warnings of tmp->tm_mon
eramongodb Feb 10, 2023
f73a1c8
Explicitly forbid SASL for SaslOff tasks for compile-unix.sh vs. comp…
eramongodb Feb 10, 2023
cebe32f
Remove TEST_NOSSL_MATRIX from sanitizers.asan_sasl
eramongodb Feb 13, 2023
609c74e
Update sasl.nossl.COMPILE_MATRIX as suggested
eramongodb Feb 13, 2023
7a996d6
Update sasl.openssl.COMPILE_MATRIX as suggested
eramongodb Feb 13, 2023
4781c7c
Remove sasl-off in sasl.openssl.COMPILE_MATRIX
eramongodb Feb 13, 2023
7ff0bbc
Remove unused SASL function generators
eramongodb Feb 13, 2023
eed0b1c
Move cse.darwinssl tasks from macos-1014 to macos-1015
eramongodb Feb 13, 2023
ffd63ad
Merge remote-tracking branch 'upstream/master' into cdriver-3620
eramongodb Feb 13, 2023
c3bab66
Rename EvgTaskWithRunOn to Task and add field disable
eramongodb Feb 14, 2023
731e577
Disable cse.darwinssl tasks
eramongodb Feb 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .evergreen/config_generator/components/c_std_compile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
from shrub.v3.evg_build_variant import BuildVariant
from shrub.v3.evg_command import EvgCommandType
from shrub.v3.evg_task import EvgTaskRef

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.function import Function
from config_generator.etc.utils import bash_exec
from config_generator.etc.utils import EvgTaskWithRunOn


TAG = 'std-matrix'


# pylint: disable=line-too-long
# fmt: off
MATRIX = [
('archlinux', 'clang', None, [11, ]),
('debian81', 'clang', None, [11, ]),
('debian92', 'clang', None, [11, ]),
('ubuntu1604', 'clang', 'i686', [11, ]),
('ubuntu1604', 'clang', None, [11, ]),
('ubuntu1804', 'clang', 'i686', [11, ]),
('ubuntu1804', 'gcc', 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, ]),
]
# fmt: on
# pylint: enable=line-too-long


class StdCompile(Function):
name = 'std-compile'
commands = [
bash_exec(
command_type=EvgCommandType.TEST,
add_expansions_to_env=True,
working_dir='mongoc',
script='.evergreen/scripts/compile-std.sh',
),
]

@classmethod
def call(cls, **kwargs):
return cls.default_call(**kwargs)


def functions():
return StdCompile.defn()


def tasks():
res = []

for distro_name, compiler, arch, stds in MATRIX:
tags = [TAG, distro_name, compiler, 'compile']

distro = find_large_distro(distro_name)

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

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

distro_str = make_distro_str(distro_name, compiler, arch)

for std in stds:
with_std = {}

if std >= 17:
# CMake 3.21 or newer is required to use CMAKE_C_STANDARD to
# specify C17 or newer.
with_std = {'CFLAGS': f'-std=c{std}'}
else:
with_std = {'C_STD_VERSION': std}

task_name = f'std-c{std}-{distro_str}-compile'

res.append(
EvgTaskWithRunOn(
name=task_name,
run_on=distro.name,
tags=tags + [f'std-c{std}'],
commands=[StdCompile.call(vars=compile_vars | with_std)],
)
)

return res


def variants():
return [
BuildVariant(
name=TAG,
display_name=TAG,
tasks=[EvgTaskRef(name=f'.{TAG}')],
),
]
75 changes: 75 additions & 0 deletions .evergreen/config_generator/components/cse/darwinssl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
from shrub.v3.evg_build_variant import BuildVariant
from shrub.v3.evg_task import EvgTaskRef

from config_generator.etc.compile import generate_compile_tasks

from config_generator.etc.cse.compile import CompileCommon
from config_generator.etc.cse.test import generate_test_tasks


SSL = 'darwinssl'
TAG = f'cse-matrix-{SSL}'


# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('macos-1014', 'clang', None, ['cyrus']),
]

# TODO (CDRIVER-3789): test cse with the 'sharded' topology.
TEST_MATRIX = [
('macos-1014', 'clang', None, 'cyrus', ['auth'], ['server', 'replica' ], ['4.2', '4.4', '5.0']),

# Test 6.0+ with a replica set since Queryable Encryption does not support the 'server' topology.
('macos-1014', 'clang', None, 'cyrus', ['auth'], ['server', 'replica' ], ['6.0', 'latest']),
]
# fmt: on
# pylint: enable=line-too-long


class DarwinSSLCompileCommon(CompileCommon):
ssl = 'DARWIN'


class SaslCyrusDarwinSSLCompile(DarwinSSLCompileCommon):
name = 'cse-sasl-cyrus-darwinssl-compile'
commands = DarwinSSLCompileCommon.compile_commands(sasl='CYRUS')


def functions():
return SaslCyrusDarwinSSLCompile.defn()


def tasks():
res = []

SASL_TO_FUNC = {
'cyrus': SaslCyrusDarwinSSLCompile,
}

MORE_TAGS = ['cse']

res += generate_compile_tasks(
SSL, TAG, SASL_TO_FUNC, COMPILE_MATRIX, MORE_TAGS
)

res += generate_test_tasks(SSL, TAG, TEST_MATRIX)

return res


def variants():
expansions = {
'CLIENT_SIDE_ENCRYPTION': 'on',
'DEBUG': 'ON',
}

return [
BuildVariant(
name=TAG,
display_name=TAG,
tasks=[EvgTaskRef(name=f'.{TAG}')],
expansions=expansions,
),
]
103 changes: 103 additions & 0 deletions .evergreen/config_generator/components/cse/openssl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
from shrub.v3.evg_build_variant import BuildVariant
from shrub.v3.evg_task import EvgTaskRef

from config_generator.etc.compile import generate_compile_tasks
from config_generator.etc.function import merge_defns

from config_generator.etc.cse.compile import CompileCommon
from config_generator.etc.cse.test import generate_test_tasks


SSL = 'openssl'
TAG = f'cse-matrix-{SSL}'


# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('debian10', 'gcc', None, ['cyrus']),
('debian11', 'gcc', None, ['cyrus']),
('debian92', 'clang', None, ['cyrus']),
('debian92', 'gcc', None, ['cyrus']),
('rhel80', 'gcc', None, ['cyrus']),
('rhel83-zseries', 'gcc', None, ['cyrus']),
('ubuntu1604', 'clang', None, ['cyrus']),
('ubuntu1804-arm64', 'gcc', None, ['cyrus']),
('ubuntu1804', 'gcc', None, ['cyrus']),
('ubuntu2004', 'gcc', None, ['cyrus']),
('windows-64-vs2017', 'vs2017x64', None, ['cyrus']),
]

# TODO (CDRIVER-3789): test cse with the 'sharded' topology.
TEST_MATRIX = [
# 4.2 and 4.4 not available on rhel83-zseries.
('rhel83-zseries', 'gcc', None, 'cyrus', ['auth'], ['server'], ['5.0']),

('ubuntu1804-arm64', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0']),
('ubuntu1804', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0']),
('windows-64-vs2017', 'vs2017x64', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0']),

# Test 6.0+ with a replica set since Queryable Encryption does not support the 'server' topology.
('ubuntu1804', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['6.0', 'latest']),
('rhel83-zseries', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['6.0', 'latest']),
('ubuntu1804-arm64', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['6.0', 'latest']),
('windows-64-vs2017', 'vs2017x64', None, 'cyrus', ['auth'], ['server', 'replica'], ['6.0', 'latest']),
]
# fmt: on
# pylint: enable=line-too-long


class OpenSSLCompileCommon(CompileCommon):
ssl = 'OPENSSL'


class SaslOffOpenSSLCompile(OpenSSLCompileCommon):
name = 'cse-sasl-off-openssl-compile'
commands = OpenSSLCompileCommon.compile_commands(sasl='OFF')


class SaslCyrusOpenSSLCompile(OpenSSLCompileCommon):
name = 'cse-sasl-cyrus-openssl-compile'
commands = OpenSSLCompileCommon.compile_commands(sasl='CYRUS')


def functions():
return merge_defns(
SaslOffOpenSSLCompile.defn(),
SaslCyrusOpenSSLCompile.defn(),
)


def tasks():
res = []

SASL_TO_FUNC = {
'off': SaslOffOpenSSLCompile,
'cyrus': SaslCyrusOpenSSLCompile,
}

MORE_TAGS = ['cse']

res += generate_compile_tasks(
SSL, TAG, SASL_TO_FUNC, COMPILE_MATRIX, MORE_TAGS
)

res += generate_test_tasks(SSL, TAG, TEST_MATRIX)

return res


def variants():
expansions = {
'CLIENT_SIDE_ENCRYPTION': 'on',
'DEBUG': 'ON',
}

return [
BuildVariant(
name=TAG,
display_name=TAG,
tasks=[EvgTaskRef(name=f'.{TAG}')],
expansions=expansions,
),
]
76 changes: 76 additions & 0 deletions .evergreen/config_generator/components/cse/winssl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
from shrub.v3.evg_build_variant import BuildVariant
from shrub.v3.evg_task import EvgTaskRef

from config_generator.etc.compile import generate_compile_tasks

from config_generator.etc.cse.compile import CompileCommon
from config_generator.etc.cse.test import generate_test_tasks


SSL = 'winssl'
TAG = f'cse-matrix-{SSL}'


# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('windows-64-vs2015', 'vs2015x64', None, ['cyrus']),
('windows-64-vs2017', 'vs2017x64', None, ['cyrus']),
]

# TODO (CDRIVER-3789): test cse with the 'sharded' topology.
TEST_MATRIX = [
('windows-64-vs2017', 'vs2017x64', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0']),

# Test 6.0+ with a replica set since Queryable Encryption does not support the 'server' topology.
('windows-64-vs2017', 'vs2017x64', None, 'cyrus', ['auth'], ['server', 'replica' ], ['6.0', 'latest']),
]
# fmt: on
# pylint: enable=line-too-long


class WinSSLCompileCommon(CompileCommon):
ssl = 'WINDOWS'


class SaslCyrusWinSSLCompile(WinSSLCompileCommon):
name = 'cse-sasl-cyrus-winssl-compile'
commands = WinSSLCompileCommon.compile_commands(sasl='CYRUS')


def functions():
return SaslCyrusWinSSLCompile.defn()


def tasks():
res = []

SASL_TO_FUNC = {
'cyrus': SaslCyrusWinSSLCompile,
}

MORE_TAGS = ['cse']

res += generate_compile_tasks(
SSL, TAG, SASL_TO_FUNC, COMPILE_MATRIX, MORE_TAGS
)

res += generate_test_tasks(SSL, TAG, TEST_MATRIX)

return res


def variants():
expansions = {
'CLIENT_SIDE_ENCRYPTION': 'on',
'DEBUG': 'ON',
}

return [
BuildVariant(
name=TAG,
display_name=TAG,
tasks=[EvgTaskRef(name=f'.{TAG}')],
expansions=expansions,
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class UploadTestResults(Function):
# Ensure attach_results does not fail even if no tests results exist.
bash_exec(
script='''\
mkdir mongoc
mkdir -p mongoc
touch mongoc/test-results.json
'''
),
Expand Down
Loading