Skip to content

Commit ab6eaee

Browse files
bazile-clydekevinAlbs
authored andcommitted
CDRIVER-3697 Ensure MONGODB-AWS is tested on both 4.4 and latest (#634)
1 parent 8af54ef commit ab6eaee

File tree

3 files changed

+148
-45
lines changed

3 files changed

+148
-45
lines changed

.evergreen/config.yml

Lines changed: 99 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14026,7 +14026,7 @@ tasks:
1402614026
$CMAKE -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF .
1402714027
$CMAKE --build . --target mongoc-ping
1402814028
- func: upload build
14029-
- name: test-aws-openssl-regular
14029+
- name: test-aws-openssl-regular-latest
1403014030
depends_on:
1403114031
name: debug-compile-aws
1403214032
commands:
@@ -14042,7 +14042,23 @@ tasks:
1404214042
- func: run aws tests
1404314043
vars:
1404414044
TESTCASE: REGULAR
14045-
- name: test-aws-openssl-ec2
14045+
- name: test-aws-openssl-regular-4.4
14046+
depends_on:
14047+
name: debug-compile-aws
14048+
commands:
14049+
- func: fetch build
14050+
vars:
14051+
BUILD_NAME: debug-compile-aws
14052+
- func: bootstrap mongo-orchestration
14053+
vars:
14054+
AUTH: auth
14055+
ORCHESTRATION_FILE: auth-aws
14056+
TOPOLOGY: server
14057+
VERSION: '4.4'
14058+
- func: run aws tests
14059+
vars:
14060+
TESTCASE: REGULAR
14061+
- name: test-aws-openssl-ec2-latest
1404614062
depends_on:
1404714063
name: debug-compile-aws
1404814064
commands:
@@ -14058,7 +14074,23 @@ tasks:
1405814074
- func: run aws tests
1405914075
vars:
1406014076
TESTCASE: EC2
14061-
- name: test-aws-openssl-ecs
14077+
- name: test-aws-openssl-ec2-4.4
14078+
depends_on:
14079+
name: debug-compile-aws
14080+
commands:
14081+
- func: fetch build
14082+
vars:
14083+
BUILD_NAME: debug-compile-aws
14084+
- func: bootstrap mongo-orchestration
14085+
vars:
14086+
AUTH: auth
14087+
ORCHESTRATION_FILE: auth-aws
14088+
TOPOLOGY: server
14089+
VERSION: '4.4'
14090+
- func: run aws tests
14091+
vars:
14092+
TESTCASE: EC2
14093+
- name: test-aws-openssl-ecs-latest
1406214094
depends_on:
1406314095
name: debug-compile-aws
1406414096
commands:
@@ -14074,7 +14106,23 @@ tasks:
1407414106
- func: run aws tests
1407514107
vars:
1407614108
TESTCASE: ECS
14077-
- name: test-aws-openssl-lambda
14109+
- name: test-aws-openssl-ecs-4.4
14110+
depends_on:
14111+
name: debug-compile-aws
14112+
commands:
14113+
- func: fetch build
14114+
vars:
14115+
BUILD_NAME: debug-compile-aws
14116+
- func: bootstrap mongo-orchestration
14117+
vars:
14118+
AUTH: auth
14119+
ORCHESTRATION_FILE: auth-aws
14120+
TOPOLOGY: server
14121+
VERSION: '4.4'
14122+
- func: run aws tests
14123+
vars:
14124+
TESTCASE: ECS
14125+
- name: test-aws-openssl-lambda-latest
1407814126
depends_on:
1407914127
name: debug-compile-aws
1408014128
commands:
@@ -14090,7 +14138,23 @@ tasks:
1409014138
- func: run aws tests
1409114139
vars:
1409214140
TESTCASE: LAMBDA
14093-
- name: test-aws-openssl-assume_role
14141+
- name: test-aws-openssl-lambda-4.4
14142+
depends_on:
14143+
name: debug-compile-aws
14144+
commands:
14145+
- func: fetch build
14146+
vars:
14147+
BUILD_NAME: debug-compile-aws
14148+
- func: bootstrap mongo-orchestration
14149+
vars:
14150+
AUTH: auth
14151+
ORCHESTRATION_FILE: auth-aws
14152+
TOPOLOGY: server
14153+
VERSION: '4.4'
14154+
- func: run aws tests
14155+
vars:
14156+
TESTCASE: LAMBDA
14157+
- name: test-aws-openssl-assume_role-latest
1409414158
depends_on:
1409514159
name: debug-compile-aws
1409614160
commands:
@@ -14106,6 +14170,22 @@ tasks:
1410614170
- func: run aws tests
1410714171
vars:
1410814172
TESTCASE: ASSUME_ROLE
14173+
- name: test-aws-openssl-assume_role-4.4
14174+
depends_on:
14175+
name: debug-compile-aws
14176+
commands:
14177+
- func: fetch build
14178+
vars:
14179+
BUILD_NAME: debug-compile-aws
14180+
- func: bootstrap mongo-orchestration
14181+
vars:
14182+
AUTH: auth
14183+
ORCHESTRATION_FILE: auth-aws
14184+
TOPOLOGY: server
14185+
VERSION: '4.4'
14186+
- func: run aws tests
14187+
vars:
14188+
TESTCASE: ASSUME_ROLE
1410914189
- name: ocsp-openssl-test_1-rsa-delegate
1411014190
tags:
1411114191
- ocsp-openssl
@@ -16727,7 +16807,8 @@ buildvariants:
1672716807
- debug-compile-lto
1672816808
- debug-compile-lto-thin
1672916809
- debug-compile-aws
16730-
- test-aws-openssl-regular
16810+
- test-aws-openssl-regular-4.4
16811+
- test-aws-openssl-regular-latest
1673116812
- name: windows-2017-32
1673216813
display_name: Windows (i386) (VS 2017)
1673316814
expansions:
@@ -16759,7 +16840,8 @@ buildvariants:
1675916840
- test-dns-winssl
1676016841
- test-dns-auth-winssl
1676116842
- debug-compile-aws
16762-
- test-aws-openssl-regular
16843+
- test-aws-openssl-regular-4.4
16844+
- test-aws-openssl-regular-latest
1676316845
- name: windows-2015
1676416846
display_name: Windows (VS 2015)
1676516847
expansions:
@@ -16988,11 +17070,16 @@ buildvariants:
1698817070
run_on: ubuntu1804-test
1698917071
tasks:
1699017072
- debug-compile-aws
16991-
- test-aws-openssl-regular
16992-
- test-aws-openssl-ec2
16993-
- test-aws-openssl-ecs
16994-
- test-aws-openssl-assume_role
16995-
- test-aws-openssl-lambda
17073+
- test-aws-openssl-regular-latest
17074+
- test-aws-openssl-ec2-latest
17075+
- test-aws-openssl-ecs-latest
17076+
- test-aws-openssl-assume_role-latest
17077+
- test-aws-openssl-lambda-latest
17078+
- test-aws-openssl-regular-4.4
17079+
- test-aws-openssl-ec2-4.4
17080+
- test-aws-openssl-ecs-4.4
17081+
- test-aws-openssl-assume_role-4.4
17082+
- test-aws-openssl-lambda-4.4
1699617083
- name: rhel62
1699717084
display_name: RHEL 6.2
1699817085
expansions:

build/evergreen_config_lib/tasks.py

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from evergreen_config_lib import shell_mongoc
2929
from pkg_resources import parse_version
3030

31+
3132
class CompileTask(NamedTask):
3233
def __init__(self, task_name, tags=None, config='debug',
3334
compression='default', continue_on_err=False,
@@ -73,7 +74,7 @@ def to_dict(self):
7374
script += 'export %s="%s"\n' % (opt, value)
7475

7576
script += "CC='${CC}' MARCH='${MARCH}' sh .evergreen/compile.sh" + \
76-
self.extra_script
77+
self.extra_script
7778
task['commands'].append(shell_mongoc(script))
7879
task['commands'].append(func('upload build'))
7980
task['commands'].extend(self.suffix_commands)
@@ -102,7 +103,7 @@ def __init__(self, *args, **kwargs):
102103
EXTRA_CONFIGURE_FLAGS="-DENABLE_CLIENT_SIDE_ENCRYPTION=ON",
103104
**kwargs).to_dict()
104105
extra_script = "rm CMakeCache.txt\n" + \
105-
compile_with_cse["commands"][0]["params"]["script"]
106+
compile_with_cse["commands"][0]["params"]["script"]
106107

107108
# Skip running mock server tests, because those were already run in the non-CSE build.
108109
super(CompileWithClientSideEncryption, self).__init__(*args, CFLAGS="-fPIC",
@@ -123,7 +124,7 @@ def __init__(self, *args, **kwargs):
123124
PATH='/usr/lib/llvm-3.8/bin:$PATH',
124125
**kwargs).to_dict()
125126
extra_script = "rm CMakeCache.txt\n" + \
126-
compile_with_cse["commands"][0]["params"]["script"]
127+
compile_with_cse["commands"][0]["params"]["script"]
127128

128129
# Skip running mock server tests, because those were already run in the non-CSE build.
129130
super(CompileWithClientSideEncryptionAsan, self).__init__(*args,
@@ -156,7 +157,8 @@ def __init__(self, task_name, suffix_commands, orchestration=True, **kwargs):
156157

157158
all_tasks = [
158159
NamedTask('check-headers',
159-
commands=[shell_mongoc('sh ./.evergreen/check-public-decls.sh'), shell_mongoc('python ./.evergreen/check-preludes.py .')]),
160+
commands=[shell_mongoc('sh ./.evergreen/check-public-decls.sh'),
161+
shell_mongoc('python ./.evergreen/check-preludes.py .')]),
160162
FuncTask('make-release-archive',
161163
'release archive', 'upload docs', 'upload man pages',
162164
'upload release', 'upload build'),
@@ -405,16 +407,16 @@ def __init__(self, task_name, suffix_commands, orchestration=True, **kwargs):
405407
CompileTask('debug-compile-with-warnings',
406408
CFLAGS='-Werror -Wno-cast-align'),
407409
CompileWithClientSideEncryption('debug-compile-sasl-openssl-cse', tags=[
408-
'debug-compile', 'sasl', 'openssl'], SASL="AUTO", SSL="OPENSSL"),
410+
'debug-compile', 'sasl', 'openssl'], SASL="AUTO", SSL="OPENSSL"),
409411
CompileWithClientSideEncryption('debug-compile-sasl-darwinssl-cse', tags=[
410-
'debug-compile', 'sasl', 'darwinssl'], SASL="AUTO", SSL="DARWIN"),
412+
'debug-compile', 'sasl', 'darwinssl'], SASL="AUTO", SSL="DARWIN"),
411413
CompileWithClientSideEncryption('debug-compile-sasl-winssl-cse', tags=[
412-
'debug-compile', 'sasl', 'winssl'], SASL="AUTO", SSL="WINDOWS"),
414+
'debug-compile', 'sasl', 'winssl'], SASL="AUTO", SSL="WINDOWS"),
413415
CompileWithClientSideEncryptionAsan('debug-compile-asan-openssl-cse', tags=[
414-
'debug-compile', 'asan-clang'], SSL="OPENSSL"),
415-
CompileTask ('debug-compile-nosasl-openssl-1.0.1',
416-
prefix_commands=[func("install ssl", SSL="openssl-1.0.1u")],
417-
CFLAGS="-Wno-redundant-decls", SSL="OPENSSL", SASL="OFF")
416+
'debug-compile', 'asan-clang'], SSL="OPENSSL"),
417+
CompileTask('debug-compile-nosasl-openssl-1.0.1',
418+
prefix_commands=[func("install ssl", SSL="openssl-1.0.1u")],
419+
CFLAGS="-Wno-redundant-decls", SSL="OPENSSL", SASL="OFF")
418420
]
419421

420422

@@ -883,8 +885,10 @@ def _check_allowed(self):
883885

884886
all_tasks = chain(all_tasks, [aws_compile_task])
885887

888+
886889
class AWSTestTask(MatrixTask):
887-
axes = OD([('testcase', ['regular', 'ec2', 'ecs', 'lambda', 'assume_role'])])
890+
axes = OD([('testcase', ['regular', 'ec2', 'ecs', 'lambda', 'assume_role']),
891+
('version', ['latest', '4.4'])])
888892

889893
name_prefix = 'test-aws-openssl'
890894

@@ -893,17 +897,20 @@ def __init__(self, *args, **kwargs):
893897
self.add_dependency('debug-compile-aws')
894898
self.commands.extend([
895899
func('fetch build', BUILD_NAME=self.depends_on['name']),
896-
bootstrap(AUTH="auth", ORCHESTRATION_FILE="auth-aws", VERSION="latest", TOPOLOGY="server"),
900+
bootstrap(AUTH="auth", ORCHESTRATION_FILE="auth-aws", VERSION=self.version, TOPOLOGY="server"),
897901
func('run aws tests', TESTCASE=self.testcase.upper())])
898902

899903
@property
900904
def name(self):
901-
return '-'.join([self.name_prefix, self.testcase])
905+
return '-'.join([self.name_prefix, self.testcase, self.version])
906+
902907

903908
all_tasks = chain(all_tasks, AWSTestTask.matrix())
904909

910+
905911
class OCSPTask(MatrixTask):
906-
axes = OD([('test', ['test_1', 'test_2', 'test_3', 'test_4', 'soft_fail_test', 'malicious_server_test_1', 'malicious_server_test_2', 'cache']),
912+
axes = OD([('test', ['test_1', 'test_2', 'test_3', 'test_4', 'soft_fail_test', 'malicious_server_test_1',
913+
'malicious_server_test_2', 'cache']),
907914
('delegate', ['delegate', 'nodelegate']),
908915
('cert', ['rsa', 'ecdsa']),
909916
('ssl', ['openssl', 'openssl-1.0.1', 'darwinssl', 'winssl'])])
@@ -917,7 +924,8 @@ def __init__(self, *args, **kwargs):
917924

918925
@property
919926
def name(self):
920-
return 'ocsp-' + self.display('ssl') + '-' + self.display('test') + '-' + self.display('cert') + '-' + self.display ('delegate')
927+
return 'ocsp-' + self.display('ssl') + '-' + self.display('test') + '-' + self.display(
928+
'cert') + '-' + self.display('delegate')
921929

922930
def to_dict(self):
923931
task = super(MatrixTask, self).to_dict()
@@ -926,9 +934,9 @@ def to_dict(self):
926934
func('fetch build', BUILD_NAME=self.depends_on['name']))
927935

928936
stapling = 'mustStaple'
929-
if self.test in [ 'test_3', 'test_4', 'soft_fail_test', 'cache']:
937+
if self.test in ['test_3', 'test_4', 'soft_fail_test', 'cache']:
930938
stapling = 'disableStapling'
931-
if self.test in [ 'malicious_server_test_1', 'malicious_server_test_2' ]:
939+
if self.test in ['malicious_server_test_1', 'malicious_server_test_2']:
932940
stapling = 'mustStaple-disableStapling'
933941

934942
orchestration_file = '%s-basic-tls-ocsp-%s' % (self.cert, stapling)
@@ -937,35 +945,36 @@ def to_dict(self):
937945
# The cache test expects a revoked response from an OCSP responder, exactly like TEST_4.
938946
test_column = 'TEST_4' if self.test == 'cache' else self.test.upper()
939947

940-
commands.append(shell_mongoc('TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh' % (test_column, self.cert, 'on' if self.delegate == 'delegate' else 'off')))
948+
commands.append(shell_mongoc(
949+
'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh' % (
950+
test_column, self.cert, 'on' if self.delegate == 'delegate' else 'off')))
941951
commands.append(orchestration)
942952
if self.test == 'cache':
943953
commands.append(shell_mongoc('CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self.cert))
944954
else:
945-
commands.append(shell_mongoc('TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self.test.upper(), self.cert)))
955+
commands.append(shell_mongoc(
956+
'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self.test.upper(), self.cert)))
946957

947958
return task
948959

949960
# Testing in OCSP has a lot of exceptions.
950961
def _check_allowed(self):
951962
if self.ssl == 'darwinssl':
952963
# Secure Transport quietly ignores a must-staple certificate with no stapled response.
953-
prohibit (self.test == 'malicious_server_test_2')
964+
prohibit(self.test == 'malicious_server_test_2')
954965

955966
# ECDSA certs can't be loaded (in the PEM format they're stored) on Windows/macOS. Skip them.
956967
if self.ssl == 'darwinssl' or self.ssl == 'winssl':
957-
prohibit (self.cert == 'ecdsa')
968+
prohibit(self.cert == 'ecdsa')
958969

959970
# OCSP stapling is not supported on macOS or Windows.
960971
if self.ssl == 'darwinssl' or self.ssl == 'winssl':
961-
prohibit (self.test in ['test_1', 'test_2', 'cache'])
972+
prohibit(self.test in ['test_1', 'test_2', 'cache'])
962973

963974
if self.test == 'soft_fail_test' or self.test == 'malicious_server_test_2' or self.test == 'cache':
964975
prohibit(self.delegate == 'delegate')
965976

966977

967-
968978
all_tasks = chain(all_tasks, OCSPTask.matrix())
969979

970-
971-
all_tasks = list(all_tasks)
980+
all_tasks = list(all_tasks)

build/evergreen_config_lib/variants.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ def days(n):
321321
'debug-compile-lto',
322322
'debug-compile-lto-thin',
323323
'debug-compile-aws',
324-
'test-aws-openssl-regular'
324+
'test-aws-openssl-regular-4.4',
325+
'test-aws-openssl-regular-latest'
325326
],
326327
{'CC': 'clang'}),
327328
Variant ('windows-2017-32',
@@ -351,7 +352,8 @@ def days(n):
351352
'test-dns-winssl',
352353
'test-dns-auth-winssl',
353354
'debug-compile-aws',
354-
'test-aws-openssl-regular'
355+
'test-aws-openssl-regular-4.4',
356+
'test-aws-openssl-regular-latest'
355357
],
356358
{'CC': 'Visual Studio 15 2017 Win64'}),
357359
Variant('windows-2015',
@@ -554,11 +556,16 @@ def days(n):
554556
batchtime=days(1)),
555557
Variant ('clang60ubuntu', 'clang 6.0 (Ubuntu 18.04)', 'ubuntu1804-test', [
556558
'debug-compile-aws',
557-
'test-aws-openssl-regular',
558-
'test-aws-openssl-ec2',
559-
'test-aws-openssl-ecs',
560-
'test-aws-openssl-assume_role',
561-
'test-aws-openssl-lambda'
559+
'test-aws-openssl-regular-latest',
560+
'test-aws-openssl-ec2-latest',
561+
'test-aws-openssl-ecs-latest',
562+
'test-aws-openssl-assume_role-latest',
563+
'test-aws-openssl-lambda-latest',
564+
'test-aws-openssl-regular-4.4',
565+
'test-aws-openssl-ec2-4.4',
566+
'test-aws-openssl-ecs-4.4',
567+
'test-aws-openssl-assume_role-4.4',
568+
'test-aws-openssl-lambda-4.4'
562569
], {'CC': 'clang'}),
563570
Variant('rhel62',
564571
'RHEL 6.2',

0 commit comments

Comments
 (0)