Skip to content

Commit fb36343

Browse files
committed
fix encryption handling
1 parent d67f3ec commit fb36343

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

.evergreen/config.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,9 +2849,9 @@ buildvariants:
28492849
- rhel87-small
28502850
batchtime: 10080
28512851
expansions:
2852-
TEST_ENCRYPTION: "true"
28532852
AUTH: auth
28542853
SSL: ssl
2854+
test_encryption: "true"
28552855
PYTHON_BINARY: /opt/python/3.9/bin/python3
28562856
tags: [encryption_tag]
28572857
- name: encryption-rhel8-py3.13-auth-ssl
@@ -2864,9 +2864,9 @@ buildvariants:
28642864
- rhel87-small
28652865
batchtime: 10080
28662866
expansions:
2867-
TEST_ENCRYPTION: "true"
28682867
AUTH: auth
28692868
SSL: ssl
2869+
test_encryption: "true"
28702870
PYTHON_BINARY: /opt/python/3.13/bin/python3
28712871
tags: [encryption_tag]
28722872
- name: encryption-rhel8-pypy3.10-auth-ssl
@@ -2879,9 +2879,9 @@ buildvariants:
28792879
- rhel87-small
28802880
batchtime: 10080
28812881
expansions:
2882-
TEST_ENCRYPTION: "true"
28832882
AUTH: auth
28842883
SSL: ssl
2884+
test_encryption: "true"
28852885
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
28862886
tags: [encryption_tag]
28872887
- name: encryption-crypt_shared-rhel8-py3.9-auth-ssl
@@ -2894,9 +2894,9 @@ buildvariants:
28942894
- rhel87-small
28952895
batchtime: 10080
28962896
expansions:
2897-
TEST_ENCRYPTION: "true"
28982897
AUTH: auth
28992898
SSL: ssl
2899+
test_encryption: "true"
29002900
TEST_CRYPT_SHARED: "true"
29012901
PYTHON_BINARY: /opt/python/3.9/bin/python3
29022902
tags: [encryption_tag]
@@ -2910,9 +2910,9 @@ buildvariants:
29102910
- rhel87-small
29112911
batchtime: 10080
29122912
expansions:
2913-
TEST_ENCRYPTION: "true"
29142913
AUTH: auth
29152914
SSL: ssl
2915+
test_encryption: "true"
29162916
TEST_CRYPT_SHARED: "true"
29172917
PYTHON_BINARY: /opt/python/3.13/bin/python3
29182918
tags: [encryption_tag]
@@ -2926,9 +2926,9 @@ buildvariants:
29262926
- rhel87-small
29272927
batchtime: 10080
29282928
expansions:
2929-
TEST_ENCRYPTION: "true"
29302929
AUTH: auth
29312930
SSL: ssl
2931+
test_encryption: "true"
29322932
TEST_CRYPT_SHARED: "true"
29332933
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
29342934
tags: [encryption_tag]
@@ -2942,9 +2942,9 @@ buildvariants:
29422942
- rhel87-small
29432943
batchtime: 10080
29442944
expansions:
2945-
TEST_ENCRYPTION: "true"
29462945
AUTH: auth
29472946
SSL: ssl
2947+
test_encryption: "true"
29482948
TEST_ENCRYPTION_PYOPENSSL: "true"
29492949
PYTHON_BINARY: /opt/python/3.9/bin/python3
29502950
tags: [encryption_tag]
@@ -2958,9 +2958,9 @@ buildvariants:
29582958
- rhel87-small
29592959
batchtime: 10080
29602960
expansions:
2961-
TEST_ENCRYPTION: "true"
29622961
AUTH: auth
29632962
SSL: ssl
2963+
test_encryption: "true"
29642964
TEST_ENCRYPTION_PYOPENSSL: "true"
29652965
PYTHON_BINARY: /opt/python/3.13/bin/python3
29662966
tags: [encryption_tag]
@@ -2974,9 +2974,9 @@ buildvariants:
29742974
- rhel87-small
29752975
batchtime: 10080
29762976
expansions:
2977-
TEST_ENCRYPTION: "true"
29782977
AUTH: auth
29792978
SSL: ssl
2979+
test_encryption: "true"
29802980
TEST_ENCRYPTION_PYOPENSSL: "true"
29812981
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
29822982
tags: [encryption_tag]
@@ -2989,6 +2989,7 @@ buildvariants:
29892989
expansions:
29902990
AUTH: auth
29912991
SSL: ssl
2992+
test_encryption: "true"
29922993
PYTHON_BINARY: /opt/python/3.10/bin/python3
29932994
- name: encryption-crypt_shared-rhel8-py3.11-auth-nossl
29942995
tasks:
@@ -2999,6 +3000,7 @@ buildvariants:
29993000
expansions:
30003001
AUTH: auth
30013002
SSL: nossl
3003+
test_encryption: "true"
30023004
TEST_CRYPT_SHARED: "true"
30033005
PYTHON_BINARY: /opt/python/3.11/bin/python3
30043006
- name: encryption-pyopenssl-rhel8-py3.12-auth-ssl
@@ -3010,6 +3012,7 @@ buildvariants:
30103012
expansions:
30113013
AUTH: auth
30123014
SSL: ssl
3015+
test_encryption: "true"
30133016
TEST_ENCRYPTION_PYOPENSSL: "true"
30143017
PYTHON_BINARY: /opt/python/3.12/bin/python3
30153018
- name: encryption-rhel8-pypy3.9-auth-nossl
@@ -3021,6 +3024,7 @@ buildvariants:
30213024
expansions:
30223025
AUTH: auth
30233026
SSL: nossl
3027+
test_encryption: "true"
30243028
PYTHON_BINARY: /opt/python/pypy3.9/bin/python3
30253029
- name: encryption-macos-py3.9-auth-ssl
30263030
tasks:
@@ -3030,9 +3034,9 @@ buildvariants:
30303034
- macos-14
30313035
batchtime: 10080
30323036
expansions:
3033-
TEST_ENCRYPTION: "true"
30343037
AUTH: auth
30353038
SSL: ssl
3039+
test_encryption: "true"
30363040
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
30373041
tags: [encryption_tag]
30383042
- name: encryption-macos-py3.13-auth-nossl
@@ -3043,9 +3047,9 @@ buildvariants:
30433047
- macos-14
30443048
batchtime: 10080
30453049
expansions:
3046-
TEST_ENCRYPTION: "true"
30473050
AUTH: auth
30483051
SSL: nossl
3052+
test_encryption: "true"
30493053
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
30503054
tags: [encryption_tag]
30513055
- name: encryption-crypt_shared-macos-py3.9-auth-ssl
@@ -3056,9 +3060,9 @@ buildvariants:
30563060
- macos-14
30573061
batchtime: 10080
30583062
expansions:
3059-
TEST_ENCRYPTION: "true"
30603063
AUTH: auth
30613064
SSL: ssl
3065+
test_encryption: "true"
30623066
TEST_CRYPT_SHARED: "true"
30633067
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
30643068
tags: [encryption_tag]
@@ -3070,9 +3074,9 @@ buildvariants:
30703074
- macos-14
30713075
batchtime: 10080
30723076
expansions:
3073-
TEST_ENCRYPTION: "true"
30743077
AUTH: auth
30753078
SSL: nossl
3079+
test_encryption: "true"
30763080
TEST_CRYPT_SHARED: "true"
30773081
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
30783082
tags: [encryption_tag]
@@ -3084,9 +3088,9 @@ buildvariants:
30843088
- windows-64-vsMulti-small
30853089
batchtime: 10080
30863090
expansions:
3087-
TEST_ENCRYPTION: "true"
30883091
AUTH: auth
30893092
SSL: ssl
3093+
test_encryption: "true"
30903094
PYTHON_BINARY: C:/python/Python39/python.exe
30913095
tags: [encryption_tag]
30923096
- name: encryption-win64-py3.13-auth-nossl
@@ -3097,9 +3101,9 @@ buildvariants:
30973101
- windows-64-vsMulti-small
30983102
batchtime: 10080
30993103
expansions:
3100-
TEST_ENCRYPTION: "true"
31013104
AUTH: auth
31023105
SSL: nossl
3106+
test_encryption: "true"
31033107
PYTHON_BINARY: C:/python/Python313/python.exe
31043108
tags: [encryption_tag]
31053109
- name: encryption-crypt_shared-win64-py3.9-auth-ssl
@@ -3110,9 +3114,9 @@ buildvariants:
31103114
- windows-64-vsMulti-small
31113115
batchtime: 10080
31123116
expansions:
3113-
TEST_ENCRYPTION: "true"
31143117
AUTH: auth
31153118
SSL: ssl
3119+
test_encryption: "true"
31163120
TEST_CRYPT_SHARED: "true"
31173121
PYTHON_BINARY: C:/python/Python39/python.exe
31183122
tags: [encryption_tag]
@@ -3124,9 +3128,9 @@ buildvariants:
31243128
- windows-64-vsMulti-small
31253129
batchtime: 10080
31263130
expansions:
3127-
TEST_ENCRYPTION: "true"
31283131
AUTH: auth
31293132
SSL: nossl
3133+
test_encryption: "true"
31303134
TEST_CRYPT_SHARED: "true"
31313135
PYTHON_BINARY: C:/python/Python313/python.exe
31323136
tags: [encryption_tag]

.evergreen/scripts/generate_config.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,20 @@ def create_encryption_variants() -> list[BuildVariant]:
248248
tags = ["encryption_tag"]
249249
batchtime = BATCHTIME_WEEK
250250

251-
def expansions_for_type(encryption, expansions):
251+
def get_encryption_expansions(encryption, ssl="ssl"):
252+
expansions = dict(AUTH="auth", SSL=ssl, test_encryption="true")
252253
if "crypt_shared" in encryption:
253254
expansions["TEST_CRYPT_SHARED"] = "true"
254255
if "PyOpenSSL" in encryption:
255256
expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true"
257+
return expansions
256258

257259
host = "rhel8"
258260

259261
# Test against all server versions and topolgies for the three main python versions.
260262
encryptions = ["Encryption", "Encryption crypt_shared", "Encryption PyOpenSSL"]
261263
for encryption, python in product(encryptions, [*MIN_MAX_PYTHON, PYPYS[-1]]):
262-
expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL="ssl")
263-
expansions_for_type(encryption, expansions)
264+
expansions = get_encryption_expansions(encryption)
264265
display_name = get_display_name(encryption, host, python=python, **expansions)
265266
variant = create_variant(
266267
[f".{t}" for t in TOPOLOGIES],
@@ -277,8 +278,7 @@ def expansions_for_type(encryption, expansions):
277278
for encryption, python, ssl in zip_cycle(
278279
encryptions, CPYTHONS[1:-1] + PYPYS[:-1], ["ssl", "nossl"]
279280
):
280-
expansions = dict(AUTH="auth", SSL=ssl)
281-
expansions_for_type(encryption, expansions)
281+
expansions = get_encryption_expansions(encryption, ssl)
282282
display_name = get_display_name(encryption, host, python=python, **expansions)
283283
variant = create_variant(
284284
[".replica_set"],
@@ -294,8 +294,7 @@ def expansions_for_type(encryption, expansions):
294294
task_names = [".latest .replica_set"]
295295
for host, encryption, python in product(["macos", "win64"], encryptions, MIN_MAX_PYTHON):
296296
ssl = "ssl" if python == CPYTHONS[0] else "nossl"
297-
expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl)
298-
expansions_for_type(encryption, expansions)
297+
expansions = get_encryption_expansions(encryption, ssl)
299298
display_name = get_display_name(encryption, host, python=python, **expansions)
300299
variant = create_variant(
301300
task_names,

0 commit comments

Comments
 (0)