Skip to content

PYTHON-5339 Clean up GitHub PR definitions in Evergreen Project #2331

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 8 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
14 changes: 13 additions & 1 deletion .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ tasks:
commands:
- func: download and merge coverage
depends_on: [{ name: .server-version, variant: .coverage_tag, status: "*", patch_optional: true }]
tags: [coverage]
tags: [coverage, pr]

# Free threading tests
- name: test-free-threading
Expand Down Expand Up @@ -2490,6 +2490,7 @@ tasks:
- python-3.9
- standalone-noauth-nossl
- sync
- pr
- name: test-server-version-python3.10-async-noauth-nossl-standalone-cov
commands:
- func: run server
Expand All @@ -2511,6 +2512,7 @@ tasks:
- python-3.10
- standalone-noauth-nossl
- async
- pr
- name: test-server-version-python3.11-sync-auth-ssl-replica-set-cov
commands:
- func: run server
Expand Down Expand Up @@ -2656,6 +2658,7 @@ tasks:
- python-3.11
- replica_set-noauth-nossl
- sync
- pr
- name: test-server-version-python3.12-async-noauth-nossl-replica-set-cov
commands:
- func: run server
Expand All @@ -2677,6 +2680,7 @@ tasks:
- python-3.12
- replica_set-noauth-nossl
- async
- pr
- name: test-server-version-python3.13-sync-auth-ssl-sharded-cluster-cov
commands:
- func: run server
Expand All @@ -2698,6 +2702,7 @@ tasks:
- python-3.13
- sharded_cluster-auth-ssl
- sync
- pr
- name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster
commands:
- func: run server
Expand All @@ -2717,6 +2722,7 @@ tasks:
- python-pypy3.10
- sharded_cluster-auth-ssl
- async
- pr
- name: test-server-version-python3.9-sync-auth-nossl-sharded-cluster-cov
commands:
- func: run server
Expand Down Expand Up @@ -3611,6 +3617,7 @@ tasks:
- python-3.13
- standalone-noauth-nossl
- sync
- pr
- name: test-standard-latest-python3.9-async-noauth-ssl-replica-set
commands:
- func: run server
Expand All @@ -3633,6 +3640,7 @@ tasks:
- python-3.9
- replica_set-noauth-ssl
- async
- pr
- name: test-standard-latest-python3.10-sync-auth-ssl-sharded-cluster
commands:
- func: run server
Expand All @@ -3655,6 +3663,7 @@ tasks:
- python-3.10
- sharded_cluster-auth-ssl
- sync
- pr
- name: test-standard-v4.0-pypy3.10-sync-noauth-nossl-standalone
commands:
- func: run server
Expand Down Expand Up @@ -4389,6 +4398,7 @@ tasks:
- python-3.13
- standalone-noauth-nossl
- noauth
- pr
- name: test-non-standard-latest-python3.9-noauth-ssl-replica-set
commands:
- func: run server
Expand All @@ -4410,6 +4420,7 @@ tasks:
- python-3.9
- replica_set-noauth-ssl
- noauth
- pr
- name: test-non-standard-latest-python3.10-auth-ssl-sharded-cluster
commands:
- func: run server
Expand All @@ -4431,6 +4442,7 @@ tasks:
- python-3.10
- sharded_cluster-auth-ssl
- auth
- pr
- name: test-non-standard-v4.0-pypy3.10-noauth-nossl-standalone
commands:
- func: run server
Expand Down
33 changes: 25 additions & 8 deletions .evergreen/scripts/generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,19 @@ def create_server_version_tasks():
task_inputs.append(task_input)

# Assemble the tasks.
seen = set()
for topology, auth, ssl, sync, python in task_inputs:
tags = ["server-version", f"python-{python}", f"{topology}-{auth}-{ssl}", sync]
combo = f"{topology}-{auth}-{ssl}"
tags = ["server-version", f"python-{python}", combo, sync]
if combo in [
"standalone-noauth-nossl",
"replica_set-noauth-nossl",
"sharded_cluster-auth-ssl",
]:
combo = f"{combo}-{sync}"
if combo not in seen:
seen.add(combo)
tags.append("pr")
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology)
if python not in PYPYS:
expansions["COVERAGE"] = "1"
Expand Down Expand Up @@ -593,11 +604,12 @@ def create_test_non_standard_tasks():
task_combos = []
# For each version and topology, rotate through the CPythons.
for (version, topology), python in zip_cycle(list(product(ALL_VERSIONS, TOPOLOGIES)), CPYTHONS):
task_combos.append((version, topology, python))
pr = version == "latest"
task_combos.append((version, topology, python, pr))
# For each PyPy and topology, rotate through the the versions.
for (python, topology), version in zip_cycle(list(product(PYPYS, TOPOLOGIES)), ALL_VERSIONS):
task_combos.append((version, topology, python))
for version, topology, python in task_combos:
task_combos.append((version, topology, python, False))
for version, topology, python, pr in task_combos:
auth, ssl = get_standard_auth_ssl(topology)
tags = [
"test-non-standard",
Expand All @@ -608,6 +620,8 @@ def create_test_non_standard_tasks():
]
if python in PYPYS:
tags.append("pypy")
if pr:
tags.append("pr")
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
name = get_task_name("test-non-standard", python=python, **expansions)
server_func = FunctionCall(func="run server", vars=expansions)
Expand All @@ -626,14 +640,15 @@ def create_standard_tasks():
for (version, topology), python, sync in zip_cycle(
list(product(ALL_VERSIONS, TOPOLOGIES)), CPYTHONS, SYNCS
):
task_combos.append((version, topology, python, sync))
pr = version == "latest"
task_combos.append((version, topology, python, sync, pr))
# For each PyPy and topology, rotate through the the versions and sync/async.
for (python, topology), version, sync in zip_cycle(
list(product(PYPYS, TOPOLOGIES)), ALL_VERSIONS, SYNCS
):
task_combos.append((version, topology, python, sync))
task_combos.append((version, topology, python, sync, False))

for version, topology, python, sync in task_combos:
for version, topology, python, sync, pr in task_combos:
auth, ssl = get_standard_auth_ssl(topology)
tags = [
"test-standard",
Expand All @@ -644,6 +659,8 @@ def create_standard_tasks():
]
if python in PYPYS:
tags.append("pypy")
if pr:
tags.append("pr")
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
name = get_task_name("test-standard", python=python, sync=sync, **expansions)
server_func = FunctionCall(func="run server", vars=expansions)
Expand Down Expand Up @@ -843,7 +860,7 @@ def create_getdata_tasks():


def create_coverage_report_tasks():
tags = ["coverage"]
tags = ["coverage", "pr"]
task_name = "coverage-report"
# BUILD-3165: We can't use "*" (all tasks) and specify "variant".
# Instead list out all coverage tasks using tags.
Expand Down