-
Notifications
You must be signed in to change notification settings - Fork 455
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
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
f0e1ba7
Remove unused __hash__ from Distro class
eramongodb c410922
Relocate DarwinSSL SASL tests to config_generator
eramongodb 764fef3
Relocate WinSSL SASL tests to config_generator
eramongodb fbce366
Relocate Static OpenSSL SASL tests to config_generator
eramongodb 6b28f76
Relocate OpenSSL SASL tests to config_generator
eramongodb 504925a
Relocate NoSSL SASL tests to config_generator
eramongodb 2e374e8
Relocate DarwinSSL CSE tests to config_generator
eramongodb c9c9edb
Relocate WinSSL CSE tests to config_generator
eramongodb 7a93cdd
Relocate Static OpenSSL CSE tests to config_generator
eramongodb 68f30ce
Relocate OpenSSL CSE tests to config_generator
eramongodb 1b94e89
Use common generate_compile_tasks function
eramongodb 19ae587
Relocate ASAN tests to config_generator
eramongodb 90c30ed
Relocate TSAN tests to config_generator
eramongodb d25f90c
Remove UBSAN tasks in favor of ASAN+UBSAN
eramongodb 9cee031
Clean up IntegrationTask -> CoverageTask
eramongodb 2dc72e2
Relocate C11 compatibility tests to config_generator
eramongodb f842e75
Merge macos-1100-arm64 compile task into sasl.darwinssl
eramongodb fe36a81
Remove compile tasks without dependent test task
eramongodb 8328206
Sync CSE compile definition
eramongodb bf90754
Remove trailing tasks from clang34ubuntu variant
eramongodb 9fd7427
Avoid compiling libmongoc when compiling libmongocrypt
eramongodb fb07ade
Remove unused SSPI compile functions
eramongodb 5838f77
Change sasl-auto -> sasl-cyrus to ensure SASL is required
eramongodb aa70d79
Fix missing handling of MARCH variable in compile-unix.sh
eramongodb 3e8cc63
Move Static OpenSSL compile coverage into seperate component
eramongodb 6b4467d
Update cse.openssl.TEST_MATRIX as suggested
eramongodb 66733f1
Update cse.winssl.TEST_MATRIX as suggested
eramongodb c707338
Update cse.darwinssl.TEST_MATRIX as suggested
eramongodb adc1564
Update sasl.nossl.TEST_MATRIX as suggested
eramongodb 1b56bad
Remove noauth from test matrices
eramongodb f509b96
Update sasl.openssl.TEST_MATRIX as suggested
eramongodb ff2e29f
Update sasl.winssl.TEST_MATRIX as suggested
eramongodb fbb715c
Update std.std_c11.COMPILE_MATRIX as suggested
eramongodb 23176ab
Add C17 compile coverage
eramongodb 6b74c4a
Group std matrices into single simple component
eramongodb a80ae16
Silence file exists warning in upload-test-results
eramongodb fdfe1dc
Resolve merge conflicts
eramongodb ddf692d
Merge remote-tracking branch 'upstream/master' into HEAD
eramongodb 3374c5a
Limit tests executed to /client_side_encryption for CSE tasks
eramongodb 5a83f05
Remove 4.2 and 4.4 tests on rhel83-zseries
eramongodb acfc480
CDRIVER-4347 Remove skipped tests due to OCSP verification failure
eramongodb df3a8c7
Use Cyrus for non-NoSSL tests
eramongodb 1b235fc
Revenge of scan-build warnings of tmp->tm_mon
eramongodb f73a1c8
Explicitly forbid SASL for SaslOff tasks for compile-unix.sh vs. comp…
eramongodb cebe32f
Remove TEST_NOSSL_MATRIX from sanitizers.asan_sasl
eramongodb 609c74e
Update sasl.nossl.COMPILE_MATRIX as suggested
eramongodb 7a996d6
Update sasl.openssl.COMPILE_MATRIX as suggested
eramongodb 4781c7c
Remove sasl-off in sasl.openssl.COMPILE_MATRIX
eramongodb 7ff0bbc
Remove unused SASL function generators
eramongodb eed0b1c
Move cse.darwinssl tasks from macos-1014 to macos-1015
eramongodb ffd63ad
Merge remote-tracking branch 'upstream/master' into cdriver-3620
eramongodb c3bab66
Rename EvgTaskWithRunOn to Task and add field disable
eramongodb 731e577
Disable cse.darwinssl tasks
eramongodb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
.evergreen/config_generator/components/c_std_compile.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Task | ||
|
||
|
||
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( | ||
Task( | ||
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}')], | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
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-1015', 'clang', None, ['cyrus']), | ||
] | ||
|
||
# TODO (CDRIVER-3789): test cse with the 'sharded' topology. | ||
TEST_MATRIX = [ | ||
('macos-1015', '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-1015', '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) | ||
|
||
# TODO: remove once MONGOCRYPT-443 is resolved. | ||
for task in res: | ||
task.disable = True | ||
|
||
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, | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
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 SaslCyrusOpenSSLCompile(OpenSSLCompileCommon): | ||
name = 'cse-sasl-cyrus-openssl-compile' | ||
commands = OpenSSLCompileCommon.compile_commands(sasl='CYRUS') | ||
|
||
|
||
def functions(): | ||
return merge_defns( | ||
SaslCyrusOpenSSLCompile.defn(), | ||
) | ||
|
||
|
||
def tasks(): | ||
res = [] | ||
|
||
SASL_TO_FUNC = { | ||
'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, | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']), | ||
eramongodb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
# 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, | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this task may be blocked by macos-1015 not yet(?) providing the CoreFoundation library (aka Secure Transport) required by both libmongocrypt and libmongoc when Client Side Encryption is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot I found the same problem in libmongocrypt before and filed MONGOCRYPT-443. I suggest commenting out cse tasks on macOS until MONGOCRYPT-443 is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than commenting out the tasks, I added
disable: true
to the tasks instead and renamedEvgTaskWithRunOn
to simplyTask
accordingly. Per docs: