diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 5083b456c5..eb5b49e6f2 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index e13976d8c7..c54fab6e64 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -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" @@ -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", @@ -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) @@ -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", @@ -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) @@ -758,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 @@ -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.