Skip to content

Commit 973cc7d

Browse files
committed
PYTHON-5313 Create min-max Evergreen tests
1 parent 3723edc commit 973cc7d

File tree

3 files changed

+98
-40
lines changed

3 files changed

+98
-40
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
tasks:
2-
# Atlas connect tests
3-
- name: test-atlas-connect
4-
commands:
5-
- func: assume ec2 role
6-
- func: run tests
7-
vars:
8-
TEST_NAME: atlas_connect
9-
tags: [atlas_connect]
10-
112
# Atlas data lake tests
123
- name: test-atlas-data-lake-without_ext
134
commands:
@@ -1166,6 +1157,72 @@ tasks:
11661157
TEST_NAME: load_balancer
11671158
tags: [load-balancer, noauth, nossl]
11681159

1160+
# Min max tests
1161+
- name: test-v4.0-python3.9-noauth-nossl-standalone
1162+
commands:
1163+
- func: assume ec2 role
1164+
- func: run server
1165+
vars:
1166+
AUTH: noauth
1167+
SSL: nossl
1168+
TOPOLOGY: standalone
1169+
VERSION: "4.0"
1170+
- func: run tests
1171+
vars:
1172+
AUTH: noauth
1173+
SSL: nossl
1174+
TOPOLOGY: standalone
1175+
VERSION: "4.0"
1176+
PYTHON_VERSION: "3.9"
1177+
tags:
1178+
- min-max-tests
1179+
- server-4.0
1180+
- python-3.9
1181+
- standalone-noauth-nossl
1182+
- name: test-latest-python3.13-auth-ssl-sharded-cluster
1183+
commands:
1184+
- func: assume ec2 role
1185+
- func: run server
1186+
vars:
1187+
AUTH: auth
1188+
SSL: ssl
1189+
TOPOLOGY: sharded_cluster
1190+
VERSION: latest
1191+
- func: run tests
1192+
vars:
1193+
AUTH: auth
1194+
SSL: ssl
1195+
TOPOLOGY: sharded_cluster
1196+
VERSION: latest
1197+
PYTHON_VERSION: "3.13"
1198+
tags:
1199+
- min-max-tests
1200+
- server-latest
1201+
- python-3.13
1202+
- sharded_cluster-auth-ssl
1203+
- name: test-v4.0-pypy3.10-noauth-ssl-replica-set
1204+
commands:
1205+
- func: assume ec2 role
1206+
- func: run server
1207+
vars:
1208+
AUTH: noauth
1209+
SSL: ssl
1210+
TOPOLOGY: replica_set
1211+
VERSION: "4.0"
1212+
- func: run tests
1213+
vars:
1214+
AUTH: noauth
1215+
SSL: ssl
1216+
TOPOLOGY: replica_set
1217+
VERSION: "4.0"
1218+
PYTHON_VERSION: pypy3.10
1219+
tags:
1220+
- min-max-tests
1221+
- server-4.0
1222+
- python-pypy3.10
1223+
- replica_set-noauth-ssl
1224+
- pypy
1225+
11691226
# Mockupdb tests
11701227
- name: test-mockupdb
11711228
commands:

.evergreen/generated_configs/variants.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,6 @@ buildvariants:
5959
NO_EXT: "1"
6060

6161
# Atlas connect tests
62-
- name: atlas-connect-rhel8-python3.9
63-
tasks:
64-
- name: .atlas_connect
65-
display_name: Atlas connect RHEL8 Python3.9
66-
run_on:
67-
- rhel87-small
68-
expansions:
69-
PYTHON_BINARY: /opt/python/3.9/bin/python3
70-
- name: atlas-connect-rhel8-python3.13
71-
tasks:
72-
- name: .atlas_connect
73-
display_name: Atlas connect RHEL8 Python3.13
74-
run_on:
75-
- rhel87-small
76-
expansions:
77-
PYTHON_BINARY: /opt/python/3.13/bin/python3
7862

7963
# Atlas data lake tests
8064
- name: atlas-data-lake-ubuntu-22-python3.9

.evergreen/scripts/generate_config.py

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -475,14 +475,12 @@ def create_doctests_variants():
475475

476476
def create_atlas_connect_variants():
477477
host = DEFAULT_HOST
478-
return [
478+
[
479479
create_variant(
480-
[".atlas_connect"],
481-
get_variant_name("Atlas connect", host, python=python),
482-
python=python,
483-
host=host,
480+
[".min-max-python"],
481+
get_variant_name("Atlas connect", host),
482+
host=DEFAULT_HOST,
484483
)
485-
for python in MIN_MAX_PYTHON
486484
]
487485

488486

@@ -663,6 +661,34 @@ def create_server_tasks():
663661
return tasks
664662

665663

664+
def create_min_max_tasks():
665+
tasks = []
666+
versions = [ALL_VERSIONS[0], ALL_VERSIONS[-1]]
667+
pythons = [*MIN_MAX_PYTHON, PYPYS[-1]]
668+
topologies = ["standalone", "sharded_cluster", "replica_set"]
669+
for version, python, topology in zip_cycle(versions, pythons, topologies):
670+
auth = "auth" if topology == "sharded_cluster" else "noauth"
671+
ssl = "nossl" if topology == "standalone" else "ssl"
672+
tags = [
673+
"min-max-tests",
674+
f"server-{version}",
675+
f"python-{python}",
676+
f"{topology}-{auth}-{ssl}",
677+
]
678+
if "pypy" in python:
679+
tags.append("pypy")
680+
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
681+
name = get_task_name("test", python=python, **expansions)
682+
assume_func = FunctionCall(func="assume ec2 role")
683+
server_func = FunctionCall(func="run server", vars=expansions)
684+
test_vars = expansions.copy()
685+
test_vars["PYTHON_VERSION"] = python
686+
test_func = FunctionCall(func="run tests", vars=test_vars)
687+
commands = [assume_func, server_func, test_func]
688+
tasks.append(EvgTask(name=name, tags=tags, commands=commands))
689+
return tasks
690+
691+
666692
def create_load_balancer_tasks():
667693
tasks = []
668694
for (auth, ssl), version in product(AUTH_SSLS, get_versions_from("6.0")):
@@ -854,15 +880,6 @@ def create_search_index_tasks():
854880
return [EvgTask(name=task_name, tags=tags, commands=commands)]
855881

856882

857-
def create_atlas_connect_tasks():
858-
vars = dict(TEST_NAME="atlas_connect")
859-
assume_func = FunctionCall(func="assume ec2 role")
860-
test_func = FunctionCall(func="run tests", vars=vars)
861-
task_name = "test-atlas-connect"
862-
tags = ["atlas_connect"]
863-
return [EvgTask(name=task_name, tags=tags, commands=[assume_func, test_func])]
864-
865-
866883
def create_enterprise_auth_tasks():
867884
tasks = []
868885
for python in [*MIN_MAX_PYTHON, PYPYS[-1]]:

0 commit comments

Comments
 (0)