From 118a115afc6cda253d420e608ce34bac596696a2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 2 May 2025 12:57:21 -0500 Subject: [PATCH 1/8] trigger change --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0b6260e21..e81285097e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -225,6 +225,7 @@ the pages will re-render and the browser will automatically refresh. - Run `just run-tests` to run the tests in an appropriate Python environment. - When done, run `just teardown-tests` to clean up and `just stop-server` to stop the server. +foo ### Encryption tests - Run `just run-server` to start the server. From cd64ecadba37c25ab32a398843ead654b39c5259 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 09:11:34 -0500 Subject: [PATCH 2/8] try with tags --- .evergreen/generated_configs/tasks.yml | 24 ++++++++++++++++++++++++ .evergreen/scripts/generate_config.py | 13 ++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 5083b456c5..a844af81c7 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -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 @@ -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 @@ -2614,6 +2616,7 @@ tasks: - python-3.9 - replica_set-noauth-ssl - sync + - pr - name: test-server-version-python3.10-async-noauth-ssl-replica-set-cov commands: - func: run server @@ -2635,6 +2638,7 @@ tasks: - python-3.10 - replica_set-noauth-ssl - async + - pr - name: test-server-version-python3.11-sync-noauth-nossl-replica-set-cov commands: - func: run server @@ -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 @@ -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 @@ -2862,6 +2868,7 @@ tasks: - python-3.9 - sharded_cluster-auth-ssl - sync + - pr - name: test-server-version-python3.9-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2883,6 +2890,7 @@ tasks: - python-3.9 - sharded_cluster-auth-ssl - async + - pr - name: test-server-version-python3.10-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2904,6 +2912,7 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - sync + - pr - name: test-server-version-python3.10-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2925,6 +2934,7 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - async + - pr - name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2946,6 +2956,7 @@ tasks: - python-3.11 - sharded_cluster-auth-ssl - sync + - pr - name: test-server-version-python3.11-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2967,6 +2978,7 @@ tasks: - python-3.11 - sharded_cluster-auth-ssl - async + - pr - name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2988,6 +3000,7 @@ tasks: - python-3.12 - sharded_cluster-auth-ssl - sync + - pr - name: test-server-version-python3.12-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -3009,6 +3022,7 @@ tasks: - python-3.12 - sharded_cluster-auth-ssl - async + - pr - name: test-server-version-python3.13-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -3030,6 +3044,7 @@ tasks: - python-3.13 - sharded_cluster-auth-ssl - async + - pr - name: test-server-version-pypy3.10-sync-auth-ssl-sharded-cluster commands: - func: run server @@ -3049,6 +3064,7 @@ tasks: - python-pypy3.10 - sharded_cluster-auth-ssl - sync + - pr # Serverless tests - name: test-serverless @@ -3611,6 +3627,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 @@ -3633,6 +3650,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 @@ -3655,6 +3673,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 @@ -3862,6 +3881,7 @@ tasks: - sharded_cluster-auth-ssl - sync - pypy + - pr # Test non standard tests - name: test-non-standard-v4.0-python3.9-noauth-nossl-standalone @@ -4389,6 +4409,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 @@ -4410,6 +4431,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 @@ -4431,6 +4453,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 @@ -4629,3 +4652,4 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy + - pr diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index e13976d8c7..539e06da48 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -554,7 +554,14 @@ def create_server_version_tasks(): # Assemble the tasks. 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-ssl", + "sharded_cluster-auth-ssl", + ]: + tags.append("pr") expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: expansions["COVERAGE"] = "1" @@ -608,6 +615,8 @@ def create_test_non_standard_tasks(): ] if python in PYPYS: tags.append("pypy") + if version == "latest": + 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) @@ -644,6 +653,8 @@ def create_standard_tasks(): ] if python in PYPYS: tags.append("pypy") + if version == "latest": + 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) From 170a89c475341f0514578a60e8deeb8013519f98 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 09:18:35 -0500 Subject: [PATCH 3/8] reduce variants --- .evergreen/generated_configs/tasks.yml | 52 ++++++++++++++++++++------ .evergreen/scripts/generate_config.py | 39 ++++++++++--------- 2 files changed, 61 insertions(+), 30 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index a844af81c7..340850520b 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -2868,7 +2868,6 @@ tasks: - python-3.9 - sharded_cluster-auth-ssl - sync - - pr - name: test-server-version-python3.9-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2890,7 +2889,6 @@ tasks: - python-3.9 - sharded_cluster-auth-ssl - async - - pr - name: test-server-version-python3.10-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2912,7 +2910,6 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - sync - - pr - name: test-server-version-python3.10-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2934,7 +2931,6 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - async - - pr - name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2956,7 +2952,6 @@ tasks: - python-3.11 - sharded_cluster-auth-ssl - sync - - pr - name: test-server-version-python3.11-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -2978,7 +2973,6 @@ tasks: - python-3.11 - sharded_cluster-auth-ssl - async - - pr - name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -3000,7 +2994,6 @@ tasks: - python-3.12 - sharded_cluster-auth-ssl - sync - - pr - name: test-server-version-python3.12-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -3022,7 +3015,27 @@ tasks: - python-3.12 - sharded_cluster-auth-ssl - async - - pr + - name: test-server-version-python3.13-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.13" + TEST_NAME: default_sync + tags: + - server-version + - python-3.13 + - sharded_cluster-auth-ssl + - sync - name: test-server-version-python3.13-async-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -3044,7 +3057,6 @@ tasks: - python-3.13 - sharded_cluster-auth-ssl - async - - pr - name: test-server-version-pypy3.10-sync-auth-ssl-sharded-cluster commands: - func: run server @@ -3064,7 +3076,25 @@ tasks: - python-pypy3.10 - sharded_cluster-auth-ssl - sync - - pr + - name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + PYTHON_VERSION: pypy3.10 + TEST_NAME: default_async + tags: + - server-version + - python-pypy3.10 + - sharded_cluster-auth-ssl + - async # Serverless tests - name: test-serverless @@ -3881,7 +3911,6 @@ tasks: - sharded_cluster-auth-ssl - sync - pypy - - pr # Test non standard tests - name: test-non-standard-v4.0-python3.9-noauth-nossl-standalone @@ -4652,4 +4681,3 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - pr diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 539e06da48..d620a9cdd4 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -544,23 +544,24 @@ def create_server_version_tasks(): for (topology, auth, ssl, sync), python in zip_cycle( list(product(TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"], SYNCS)), ALL_PYTHONS ): - task_inputs.append((topology, auth, ssl, sync, python)) + combo = f"{topology}-{auth}-{ssl}" + pr = combo in [ + "standalone-noauth-nossl", + "replica_set-noauth-ssl", + "sharded_cluster-auth-ssl", + ] + task_inputs.append((topology, auth, ssl, sync, python, pr)) # Every python should be tested with sharded cluster, auth, ssl, with sync and async. for python, sync in product(ALL_PYTHONS, SYNCS): - task_input = ("sharded_cluster", "auth", "ssl", sync, python) + task_input = ("sharded_cluster", "auth", "ssl", sync, python, False) if task_input not in task_inputs: task_inputs.append(task_input) # Assemble the tasks. - for topology, auth, ssl, sync, python in task_inputs: - combo = f"{topology}-{auth}-{ssl}" - tags = ["server-version", f"python-{python}", combo, sync] - if combo in [ - "standalone-noauth-nossl", - "replica_set-noauth-ssl", - "sharded_cluster-auth-ssl", - ]: + for topology, auth, ssl, sync, python, pr in task_inputs: + tags = ["server-version", f"python-{python}", f"{topology}-{auth}-{ssl}", sync] + if pr: tags.append("pr") expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: @@ -600,11 +601,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", @@ -615,7 +617,7 @@ def create_test_non_standard_tasks(): ] if python in PYPYS: tags.append("pypy") - if version == "latest": + 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) @@ -635,14 +637,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", @@ -653,7 +656,7 @@ def create_standard_tasks(): ] if python in PYPYS: tags.append("pypy") - if version == "latest": + 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) From cd7453fa30657acfa457280601c7d4de602c1329 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 09:27:12 -0500 Subject: [PATCH 4/8] reduce variants --- .evergreen/generated_configs/tasks.yml | 314 +------------------------ .evergreen/scripts/generate_config.py | 25 +- 2 files changed, 15 insertions(+), 324 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 340850520b..a3b4c672df 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -2491,28 +2491,6 @@ tasks: - standalone-noauth-nossl - sync - pr - - name: test-server-version-python3.10-async-noauth-nossl-standalone-cov - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - COVERAGE: "1" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - COVERAGE: "1" - PYTHON_VERSION: "3.10" - TEST_NAME: default_async - tags: - - server-version - - python-3.10 - - standalone-noauth-nossl - - async - - pr - name: test-server-version-python3.11-sync-auth-ssl-replica-set-cov commands: - func: run server @@ -2616,7 +2594,6 @@ tasks: - python-3.9 - replica_set-noauth-ssl - sync - - pr - name: test-server-version-python3.10-async-noauth-ssl-replica-set-cov commands: - func: run server @@ -2638,7 +2615,6 @@ tasks: - python-3.10 - replica_set-noauth-ssl - async - - pr - name: test-server-version-python3.11-sync-noauth-nossl-replica-set-cov commands: - func: run server @@ -2660,27 +2636,7 @@ tasks: - python-3.11 - replica_set-noauth-nossl - sync - - name: test-server-version-python3.12-async-noauth-nossl-replica-set-cov - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: replica_set - COVERAGE: "1" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: replica_set - COVERAGE: "1" - PYTHON_VERSION: "3.12" - TEST_NAME: default_async - tags: - - server-version - - 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 @@ -2703,26 +2659,6 @@ tasks: - sharded_cluster-auth-ssl - sync - pr - - name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - PYTHON_VERSION: pypy3.10 - TEST_NAME: default_async - tags: - - server-version - - 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 @@ -2847,254 +2783,6 @@ tasks: - python-pypy3.10 - sharded_cluster-noauth-nossl - async - - name: test-server-version-python3.9-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.9" - TEST_NAME: default_sync - tags: - - server-version - - python-3.9 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-python3.9-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.9" - TEST_NAME: default_async - tags: - - server-version - - python-3.9 - - sharded_cluster-auth-ssl - - async - - name: test-server-version-python3.10-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.10" - TEST_NAME: default_sync - tags: - - server-version - - python-3.10 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-python3.10-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.10" - TEST_NAME: default_async - tags: - - server-version - - python-3.10 - - sharded_cluster-auth-ssl - - async - - name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.11" - TEST_NAME: default_sync - tags: - - server-version - - python-3.11 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-python3.11-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.11" - TEST_NAME: default_async - tags: - - server-version - - python-3.11 - - sharded_cluster-auth-ssl - - async - - name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.12" - TEST_NAME: default_sync - tags: - - server-version - - python-3.12 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-python3.12-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.12" - TEST_NAME: default_async - tags: - - server-version - - python-3.12 - - sharded_cluster-auth-ssl - - async - - name: test-server-version-python3.13-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.13" - TEST_NAME: default_sync - tags: - - server-version - - python-3.13 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-python3.13-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.13" - TEST_NAME: default_async - tags: - - server-version - - python-3.13 - - sharded_cluster-auth-ssl - - async - - name: test-server-version-pypy3.10-sync-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - PYTHON_VERSION: pypy3.10 - TEST_NAME: default_sync - tags: - - server-version - - python-pypy3.10 - - sharded_cluster-auth-ssl - - sync - - name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - PYTHON_VERSION: pypy3.10 - TEST_NAME: default_async - tags: - - server-version - - python-pypy3.10 - - sharded_cluster-auth-ssl - - async # Serverless tests - name: test-serverless diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index d620a9cdd4..b1fff02900 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -544,24 +544,27 @@ def create_server_version_tasks(): for (topology, auth, ssl, sync), python in zip_cycle( list(product(TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"], SYNCS)), ALL_PYTHONS ): - combo = f"{topology}-{auth}-{ssl}" - pr = combo in [ - "standalone-noauth-nossl", - "replica_set-noauth-ssl", - "sharded_cluster-auth-ssl", - ] - task_inputs.append((topology, auth, ssl, sync, python, pr)) + task_inputs.append((topology, auth, ssl, sync, python)) # Every python should be tested with sharded cluster, auth, ssl, with sync and async. for python, sync in product(ALL_PYTHONS, SYNCS): - task_input = ("sharded_cluster", "auth", "ssl", sync, python, False) + task_input = ("sharded_cluster", "auth", "ssl", sync, python) if task_input not in task_inputs: task_inputs.append(task_input) # Assemble the tasks. - for topology, auth, ssl, sync, python, pr in task_inputs: - tags = ["server-version", f"python-{python}", f"{topology}-{auth}-{ssl}", sync] - if pr: + seen = set() + for topology, auth, ssl, sync, python in task_inputs: + combo = f"{topology}-{auth}-{ssl}" + tags = ["server-version", f"python-{python}", combo, sync] + if combo in seen: + continue + if combo in [ + "standalone-noauth-nossl", + "replica_set-noauth-nossl", + "sharded_cluster-auth-ssl", + ]: + seen.add(combo) tags.append("pr") expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: From cfc0820358cad4b6721e74b2de928b28963bc8f9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 09:28:56 -0500 Subject: [PATCH 5/8] reduce variants --- .evergreen/generated_configs/tasks.yml | 272 +++++++++++++++++++++++++ .evergreen/scripts/generate_config.py | 8 +- 2 files changed, 276 insertions(+), 4 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index a3b4c672df..051d2e6cc9 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -2491,6 +2491,28 @@ tasks: - standalone-noauth-nossl - sync - pr + - name: test-server-version-python3.10-async-noauth-nossl-standalone-cov + commands: + - func: run server + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + COVERAGE: "1" + - func: run tests + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + COVERAGE: "1" + PYTHON_VERSION: "3.10" + TEST_NAME: default_async + tags: + - server-version + - python-3.10 + - standalone-noauth-nossl + - async + - pr - name: test-server-version-python3.11-sync-auth-ssl-replica-set-cov commands: - func: run server @@ -2637,6 +2659,28 @@ tasks: - replica_set-noauth-nossl - sync - pr + - name: test-server-version-python3.12-async-noauth-nossl-replica-set-cov + commands: + - func: run server + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: replica_set + COVERAGE: "1" + - func: run tests + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: replica_set + COVERAGE: "1" + PYTHON_VERSION: "3.12" + TEST_NAME: default_async + tags: + - server-version + - 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 @@ -2659,6 +2703,26 @@ tasks: - sharded_cluster-auth-ssl - sync - pr + - name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + PYTHON_VERSION: pypy3.10 + TEST_NAME: default_async + tags: + - server-version + - 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 @@ -2783,6 +2847,214 @@ tasks: - python-pypy3.10 - sharded_cluster-noauth-nossl - async + - name: test-server-version-python3.9-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.9" + TEST_NAME: default_sync + tags: + - server-version + - python-3.9 + - sharded_cluster-auth-ssl + - sync + - name: test-server-version-python3.9-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.9" + TEST_NAME: default_async + tags: + - server-version + - python-3.9 + - sharded_cluster-auth-ssl + - async + - name: test-server-version-python3.10-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.10" + TEST_NAME: default_sync + tags: + - server-version + - python-3.10 + - sharded_cluster-auth-ssl + - sync + - name: test-server-version-python3.10-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.10" + TEST_NAME: default_async + tags: + - server-version + - python-3.10 + - sharded_cluster-auth-ssl + - async + - name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.11" + TEST_NAME: default_sync + tags: + - server-version + - python-3.11 + - sharded_cluster-auth-ssl + - sync + - name: test-server-version-python3.11-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.11" + TEST_NAME: default_async + tags: + - server-version + - python-3.11 + - sharded_cluster-auth-ssl + - async + - name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.12" + TEST_NAME: default_sync + tags: + - server-version + - python-3.12 + - sharded_cluster-auth-ssl + - sync + - name: test-server-version-python3.12-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.12" + TEST_NAME: default_async + tags: + - server-version + - python-3.12 + - sharded_cluster-auth-ssl + - async + - name: test-server-version-python3.13-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + PYTHON_VERSION: "3.13" + TEST_NAME: default_async + tags: + - server-version + - python-3.13 + - sharded_cluster-auth-ssl + - async + - name: test-server-version-pypy3.10-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + PYTHON_VERSION: pypy3.10 + TEST_NAME: default_sync + tags: + - server-version + - python-pypy3.10 + - sharded_cluster-auth-ssl + - sync # Serverless tests - name: test-serverless diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index b1fff02900..ee3abc4179 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -557,15 +557,15 @@ def create_server_version_tasks(): for topology, auth, ssl, sync, python in task_inputs: combo = f"{topology}-{auth}-{ssl}" tags = ["server-version", f"python-{python}", combo, sync] - if combo in seen: - continue if combo in [ "standalone-noauth-nossl", "replica_set-noauth-nossl", "sharded_cluster-auth-ssl", ]: - seen.add(combo) - tags.append("pr") + 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" From 8f1ed862c6a22aedcb1f3054d32f742b492cbd6d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 09:36:29 -0500 Subject: [PATCH 6/8] add pr tag to coverage report --- .evergreen/generated_configs/tasks.yml | 2 +- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 051d2e6cc9..db3e5d0e3d 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -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 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index ee3abc4179..9a72957a76 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -860,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. From 6d3221156c760f7cd07a41b718259878797b12ec Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 10:14:27 -0500 Subject: [PATCH 7/8] address review --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e81285097e..e0b6260e21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -225,7 +225,6 @@ the pages will re-render and the browser will automatically refresh. - Run `just run-tests` to run the tests in an appropriate Python environment. - When done, run `just teardown-tests` to clean up and `just stop-server` to stop the server. -foo ### Encryption tests - Run `just run-server` to start the server. From 1ff31d7705730610fd10a39d7800274ea08d18eb Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 6 May 2025 13:02:15 -0500 Subject: [PATCH 8/8] run mod_wsgi tasks --- .evergreen/generated_configs/tasks.yml | 10 +++++----- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index db3e5d0e3d..eb5b49e6f2 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -211,7 +211,7 @@ tasks: TEST_NAME: mod_wsgi SUB_TEST_NAME: standalone PYTHON_VERSION: "3.9" - tags: [mod_wsgi] + tags: [mod_wsgi, pr] - name: mod-wsgi-embedded-mode-replica-set-python3.10 commands: - func: run server @@ -223,7 +223,7 @@ tasks: TEST_NAME: mod_wsgi SUB_TEST_NAME: embedded PYTHON_VERSION: "3.10" - tags: [mod_wsgi] + tags: [mod_wsgi, pr] - name: mod-wsgi-replica-set-python3.11 commands: - func: run server @@ -235,7 +235,7 @@ tasks: TEST_NAME: mod_wsgi SUB_TEST_NAME: standalone PYTHON_VERSION: "3.11" - tags: [mod_wsgi] + tags: [mod_wsgi, pr] - name: mod-wsgi-embedded-mode-replica-set-python3.12 commands: - func: run server @@ -247,7 +247,7 @@ tasks: TEST_NAME: mod_wsgi SUB_TEST_NAME: embedded PYTHON_VERSION: "3.12" - tags: [mod_wsgi] + tags: [mod_wsgi, pr] - name: mod-wsgi-replica-set-python3.13 commands: - func: run server @@ -259,7 +259,7 @@ tasks: TEST_NAME: mod_wsgi SUB_TEST_NAME: standalone PYTHON_VERSION: "3.13" - tags: [mod_wsgi] + tags: [mod_wsgi, pr] # No orchestration tests - name: test-no-orchestration-python3.9 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 9a72957a76..c54fab6e64 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -775,7 +775,7 @@ def create_mod_wsgi_tasks(): server_func = FunctionCall(func="run server", vars=server_vars) vars = dict(TEST_NAME="mod_wsgi", SUB_TEST_NAME=test.split("-")[0], PYTHON_VERSION=python) test_func = FunctionCall(func="run tests", vars=vars) - tags = ["mod_wsgi"] + tags = ["mod_wsgi", "pr"] commands = [server_func, test_func] tasks.append(EvgTask(name=task_name, tags=tags, commands=commands)) return tasks