From 6aed1be8b0a619880c02f5221910166ee6c2a2ab Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 18:54:52 -0500 Subject: [PATCH 01/18] PYTHON-5286 Create server version variants --- .evergreen/generated_configs/tasks.yml | 218 ++++++++++++++++++++++ .evergreen/generated_configs/variants.yml | 173 +++++++---------- .evergreen/scripts/generate_config.py | 60 +++--- 3 files changed, 315 insertions(+), 136 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index b2b8dc1191..ec7206dd8a 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8031,6 +8031,224 @@ tasks: - nossl - sync_async + # Server version tests + - name: test--python3.9 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--python3.9 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--python3.9 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test--python3.10 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--python3.10 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--python3.10 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test--python3.11 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--python3.11 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--python3.11 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test--python3.12 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--python3.12 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--python3.12 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test--python3.13 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--python3.13 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--python3.13 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test--pypy3.10 + commands: + - func: run server + vars: + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl + - func: run tests + vars: + AUTH: noauth + SSL: nossl + tags: [server-version] + - name: test--pypy3.10 + commands: + - func: run server + vars: + TOPOLOGY: replica_set + AUTH: noauth + SSL: ssl + - func: run tests + vars: + AUTH: noauth + SSL: ssl + tags: [server-version] + - name: test--pypy3.10 + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl + tags: [server-version] + # Serverless tests - name: test-serverless commands: diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 940c4e9b0c..2dd5629773 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -805,114 +805,6 @@ buildvariants: PYTHON_BINARY: /opt/python/3.9/bin/python3 # Server tests - - name: test-rhel8-python3.9-cov-no-c - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 Python3.9 cov No C" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - NO_EXT: "1" - PYTHON_BINARY: /opt/python/3.9/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-python3.9-cov - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 Python3.9 cov" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/3.9/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-python3.13-cov-no-c - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 Python3.13 cov No C" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - NO_EXT: "1" - PYTHON_BINARY: /opt/python/3.13/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-python3.13-cov - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 Python3.13 cov" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/3.13/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-pypy3.10-cov-no-c - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 PyPy3.10 cov No C" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - NO_EXT: "1" - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-pypy3.10-cov - tasks: - - name: .standalone .sync_async - - name: .replica_set .sync_async - - name: .sharded_cluster .sync_async - display_name: "* Test RHEL8 PyPy3.10 cov" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - tags: [coverage_tag] - - name: test-rhel8-python3.10 - tasks: - - name: .sharded_cluster .auth .ssl .sync_async - - name: .replica_set .noauth .ssl .sync_async - - name: .standalone .noauth .nossl .sync_async - display_name: "* Test RHEL8 Python3.10" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/3.10/bin/python3 - - name: test-rhel8-python3.11 - tasks: - - name: .sharded_cluster .auth .ssl .sync_async - - name: .replica_set .noauth .ssl .sync_async - - name: .standalone .noauth .nossl .sync_async - display_name: "* Test RHEL8 Python3.11" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/3.11/bin/python3 - - name: test-rhel8-python3.12 - tasks: - - name: .sharded_cluster .auth .ssl .sync_async - - name: .replica_set .noauth .ssl .sync_async - - name: .standalone .noauth .nossl .sync_async - display_name: "* Test RHEL8 Python3.12" - run_on: - - rhel87-small - expansions: - COVERAGE: coverage - PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: test-macos-python3.9 tasks: - name: .sharded_cluster .auth .ssl !.sync_async @@ -1018,6 +910,71 @@ buildvariants: expansions: PYTHON_BINARY: C:/python/32/Python313/python.exe + # Server version tests + - name: mongodb-v4.0 + tasks: + - name: .server-version + display_name: "* MongoDB v4.0" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v4.2 + tasks: + - name: .server-version + display_name: "* MongoDB v4.2" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v4.4 + tasks: + - name: .server-version + display_name: "* MongoDB v4.4" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v5.0 + tasks: + - name: .server-version + display_name: "* MongoDB v5.0" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v6.0 + tasks: + - name: .server-version + display_name: "* MongoDB v6.0" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v7.0 + tasks: + - name: .server-version + display_name: "* MongoDB v7.0" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-v8.0 + tasks: + - name: .server-version + display_name: "* MongoDB v8.0" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-rapid + tasks: + - name: .server-version + display_name: "* MongoDB rapid" + run_on: + - rhel87-small + tags: [server-version] + - name: mongodb-latest + tasks: + - name: .server-version + display_name: "* MongoDB latest" + run_on: + - rhel87-small + tags: [server-version] + # Serverless tests - name: serverless-rhel8-python3.9 tasks: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index afa97f3906..5f6c099f87 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -66,39 +66,20 @@ def create_ocsp_variants() -> list[BuildVariant]: return variants -def create_server_variants() -> list[BuildVariant]: +def create_server_version_variants() -> list[BuildVariant]: variants = [] - - # Run the full matrix on linux with min and max CPython, and latest pypy. - host = DEFAULT_HOST - # Prefix the display name with an asterisk so it is sorted first. - base_display_name = "* Test" - for python, c_ext in product([*MIN_MAX_PYTHON, PYPYS[-1]], C_EXTS): - expansions = dict(COVERAGE="coverage") - handle_c_ext(c_ext, expansions) - display_name = get_variant_name(base_display_name, host, python=python, **expansions) + for version in ALL_VERSIONS: + display_name = get_variant_name("* MongoDB", version=version) variant = create_variant( - [f".{t} .sync_async" for t in TOPOLOGIES], - display_name, - python=python, - host=host, - tags=["coverage_tag"], - expansions=expansions, + [".server-version"], display_name, host=DEFAULT_HOST, tags=["server-version"] ) variants.append(variant) + return variants - # Test the rest of the pythons. - for python in CPYTHONS[1:-1] + PYPYS[:-1]: - display_name = f"Test {host}" - display_name = get_variant_name(base_display_name, host, python=python) - variant = create_variant( - [f"{t} .sync_async" for t in SUB_TASKS], - display_name, - python=python, - host=host, - expansions=expansions, - ) - variants.append(variant) + +def create_server_variants() -> list[BuildVariant]: + variants = [] + base_display_name = "* Test" # Test a subset on each of the other platforms. for host_name in ("macos", "macos-arm64", "win64", "win32"): @@ -597,6 +578,29 @@ def create_aws_lambda_variants(): ############## +def create_server_version_tasks(): + tasks = [] + for python, topology in product(ALL_PYTHONS, TOPOLOGIES): + tags = ["server-version"] + + if topology == "standalone": + auth = "noauth" + ssl = "nossl" + elif topology == "replica_set": + auth = "noauth" + ssl = "ssl" + else: + auth = "auth" + ssl = "ssl" + name = get_task_name("test-", python=python, topology=topology) + server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl) + server_func = FunctionCall(func="run server", vars=server_vars) + test_vars = dict(AUTH=auth, SSL=ssl) + test_func = FunctionCall(func="run tests", vars=test_vars) + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) + return tasks + + def create_server_tasks(): tasks = [] for topo, version, (auth, ssl), sync in product(TOPOLOGIES, ALL_VERSIONS, AUTH_SSLS, SYNCS): From 01f232993e2c876b1557632a6c1b43eea529fc8e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 18:56:33 -0500 Subject: [PATCH 02/18] cleanup --- .evergreen/generated_configs/tasks.yml | 36 ++++++++++----------- .evergreen/scripts/generate_config_utils.py | 3 ++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index ec7206dd8a..4e3b7661d7 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,7 +8032,7 @@ tasks: - sync_async # Server version tests - - name: test--python3.9 + - name: test--python3.9-standalone commands: - func: run server vars: @@ -8044,7 +8044,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.9 + - name: test--python3.9-replica-set commands: - func: run server vars: @@ -8056,7 +8056,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.9 + - name: test--python3.9-sharded-cluster commands: - func: run server vars: @@ -8068,7 +8068,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.10 + - name: test--python3.10-standalone commands: - func: run server vars: @@ -8080,7 +8080,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.10 + - name: test--python3.10-replica-set commands: - func: run server vars: @@ -8092,7 +8092,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.10 + - name: test--python3.10-sharded-cluster commands: - func: run server vars: @@ -8104,7 +8104,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.11 + - name: test--python3.11-standalone commands: - func: run server vars: @@ -8116,7 +8116,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.11 + - name: test--python3.11-replica-set commands: - func: run server vars: @@ -8128,7 +8128,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.11 + - name: test--python3.11-sharded-cluster commands: - func: run server vars: @@ -8140,7 +8140,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.12 + - name: test--python3.12-standalone commands: - func: run server vars: @@ -8152,7 +8152,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.12 + - name: test--python3.12-replica-set commands: - func: run server vars: @@ -8164,7 +8164,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.12 + - name: test--python3.12-sharded-cluster commands: - func: run server vars: @@ -8176,7 +8176,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.13 + - name: test--python3.13-standalone commands: - func: run server vars: @@ -8188,7 +8188,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.13 + - name: test--python3.13-replica-set commands: - func: run server vars: @@ -8200,7 +8200,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.13 + - name: test--python3.13-sharded-cluster commands: - func: run server vars: @@ -8212,7 +8212,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--pypy3.10 + - name: test--pypy3.10-standalone commands: - func: run server vars: @@ -8224,7 +8224,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--pypy3.10 + - name: test--pypy3.10-replica-set commands: - func: run server vars: @@ -8236,7 +8236,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--pypy3.10 + - name: test--pypy3.10-sharded-cluster commands: - func: run server vars: diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index a91501cf25..0d0feb0c0e 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -40,6 +40,9 @@ DISPLAY_LOOKUP = dict( ssl=dict(ssl="SSL", nossl="NoSSL"), auth=dict(auth="Auth", noauth="NoAuth"), + topology=dict( + standalone="Standalone", replica_set="Replica Set", sharded_cluster="Sharded Cluster" + ), test_suites=dict(default="Sync", default_async="Async"), coverage=dict(coverage="cov"), no_ext={"1": "No C"}, From c7daf38f493ffa9e4cfcb4805111367fd11a3b45 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 18:57:01 -0500 Subject: [PATCH 03/18] cleanup --- .evergreen/generated_configs/tasks.yml | 36 +++++++++++++------------- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 4e3b7661d7..bd9ada23d4 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,7 +8032,7 @@ tasks: - sync_async # Server version tests - - name: test--python3.9-standalone + - name: test-python3.9-standalone commands: - func: run server vars: @@ -8044,7 +8044,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.9-replica-set + - name: test-python3.9-replica-set commands: - func: run server vars: @@ -8056,7 +8056,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.9-sharded-cluster + - name: test-python3.9-sharded-cluster commands: - func: run server vars: @@ -8068,7 +8068,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.10-standalone + - name: test-python3.10-standalone commands: - func: run server vars: @@ -8080,7 +8080,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.10-replica-set + - name: test-python3.10-replica-set commands: - func: run server vars: @@ -8092,7 +8092,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.10-sharded-cluster + - name: test-python3.10-sharded-cluster commands: - func: run server vars: @@ -8104,7 +8104,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.11-standalone + - name: test-python3.11-standalone commands: - func: run server vars: @@ -8116,7 +8116,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.11-replica-set + - name: test-python3.11-replica-set commands: - func: run server vars: @@ -8128,7 +8128,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.11-sharded-cluster + - name: test-python3.11-sharded-cluster commands: - func: run server vars: @@ -8140,7 +8140,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.12-standalone + - name: test-python3.12-standalone commands: - func: run server vars: @@ -8152,7 +8152,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.12-replica-set + - name: test-python3.12-replica-set commands: - func: run server vars: @@ -8164,7 +8164,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.12-sharded-cluster + - name: test-python3.12-sharded-cluster commands: - func: run server vars: @@ -8176,7 +8176,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--python3.13-standalone + - name: test-python3.13-standalone commands: - func: run server vars: @@ -8188,7 +8188,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--python3.13-replica-set + - name: test-python3.13-replica-set commands: - func: run server vars: @@ -8200,7 +8200,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--python3.13-sharded-cluster + - name: test-python3.13-sharded-cluster commands: - func: run server vars: @@ -8212,7 +8212,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test--pypy3.10-standalone + - name: test-pypy3.10-standalone commands: - func: run server vars: @@ -8224,7 +8224,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test--pypy3.10-replica-set + - name: test-pypy3.10-replica-set commands: - func: run server vars: @@ -8236,7 +8236,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test--pypy3.10-sharded-cluster + - name: test-pypy3.10-sharded-cluster commands: - func: run server vars: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 5f6c099f87..f88619f01f 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -592,7 +592,7 @@ def create_server_version_tasks(): else: auth = "auth" ssl = "ssl" - name = get_task_name("test-", python=python, topology=topology) + name = get_task_name("test", python=python, topology=topology) server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl) server_func = FunctionCall(func="run server", vars=server_vars) test_vars = dict(AUTH=auth, SSL=ssl) From d3c716f5b9bf499d0289c9f6146ca6db0c923d34 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 18:59:33 -0500 Subject: [PATCH 04/18] cleanup --- .evergreen/generated_configs/variants.yml | 18 +++++++++--------- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 2dd5629773..0aa2ac7454 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -917,63 +917,63 @@ buildvariants: display_name: "* MongoDB v4.0" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v4.2 tasks: - name: .server-version display_name: "* MongoDB v4.2" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v4.4 tasks: - name: .server-version display_name: "* MongoDB v4.4" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v5.0 tasks: - name: .server-version display_name: "* MongoDB v5.0" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v6.0 tasks: - name: .server-version display_name: "* MongoDB v6.0" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v7.0 tasks: - name: .server-version display_name: "* MongoDB v7.0" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-v8.0 tasks: - name: .server-version display_name: "* MongoDB v8.0" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-rapid tasks: - name: .server-version display_name: "* MongoDB rapid" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] - name: mongodb-latest tasks: - name: .server-version display_name: "* MongoDB latest" run_on: - rhel87-small - tags: [server-version] + tags: [coverage_tag] # Serverless tests - name: serverless-rhel8-python3.9 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index f88619f01f..4dad567140 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -71,7 +71,7 @@ def create_server_version_variants() -> list[BuildVariant]: for version in ALL_VERSIONS: display_name = get_variant_name("* MongoDB", version=version) variant = create_variant( - [".server-version"], display_name, host=DEFAULT_HOST, tags=["server-version"] + [".server-version"], display_name, host=DEFAULT_HOST, tags=["coverage_tag"] ) variants.append(variant) return variants From d5a6ce44b56bc81fe28ee23db4f17c0c828898f0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 19:02:12 -0500 Subject: [PATCH 05/18] cleanup --- .evergreen/generated_configs/tasks.yml | 36 +++++++++++++------------- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index bd9ada23d4..2a0e85d2ec 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,7 +8032,7 @@ tasks: - sync_async # Server version tests - - name: test-python3.9-standalone + - name: test-python3.9-standalone-noauth-nossl commands: - func: run server vars: @@ -8044,7 +8044,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.9-replica-set + - name: test-python3.9-replica-set-noauth-ssl commands: - func: run server vars: @@ -8056,7 +8056,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.9-sharded-cluster + - name: test-python3.9-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8068,7 +8068,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-python3.10-standalone + - name: test-python3.10-standalone-noauth-nossl commands: - func: run server vars: @@ -8080,7 +8080,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.10-replica-set + - name: test-python3.10-replica-set-noauth-ssl commands: - func: run server vars: @@ -8092,7 +8092,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.10-sharded-cluster + - name: test-python3.10-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8104,7 +8104,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-python3.11-standalone + - name: test-python3.11-standalone-noauth-nossl commands: - func: run server vars: @@ -8116,7 +8116,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.11-replica-set + - name: test-python3.11-replica-set-noauth-ssl commands: - func: run server vars: @@ -8128,7 +8128,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.11-sharded-cluster + - name: test-python3.11-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8140,7 +8140,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-python3.12-standalone + - name: test-python3.12-standalone-noauth-nossl commands: - func: run server vars: @@ -8152,7 +8152,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.12-replica-set + - name: test-python3.12-replica-set-noauth-ssl commands: - func: run server vars: @@ -8164,7 +8164,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.12-sharded-cluster + - name: test-python3.12-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8176,7 +8176,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-python3.13-standalone + - name: test-python3.13-standalone-noauth-nossl commands: - func: run server vars: @@ -8188,7 +8188,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.13-replica-set + - name: test-python3.13-replica-set-noauth-ssl commands: - func: run server vars: @@ -8200,7 +8200,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.13-sharded-cluster + - name: test-python3.13-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8212,7 +8212,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-pypy3.10-standalone + - name: test-pypy3.10-standalone-noauth-nossl commands: - func: run server vars: @@ -8224,7 +8224,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-pypy3.10-replica-set + - name: test-pypy3.10-replica-set-noauth-ssl commands: - func: run server vars: @@ -8236,7 +8236,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-pypy3.10-sharded-cluster + - name: test-pypy3.10-sharded-cluster-auth-ssl commands: - func: run server vars: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4dad567140..4fb4d8e6ef 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -592,7 +592,7 @@ def create_server_version_tasks(): else: auth = "auth" ssl = "ssl" - name = get_task_name("test", python=python, topology=topology) + name = get_task_name("test", python=python, topology=topology, auth=auth, ssl=ssl) server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl) server_func = FunctionCall(func="run server", vars=server_vars) test_vars = dict(AUTH=auth, SSL=ssl) From 9d3d1501ef10dcb384a3dc9af7160790709e4f0c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 19:38:36 -0500 Subject: [PATCH 06/18] pare down matrix --- .evergreen/generated_configs/tasks.yml | 102 ++++--------------------- .evergreen/scripts/generate_config.py | 6 +- 2 files changed, 19 insertions(+), 89 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 2a0e85d2ec..26ec9f4605 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8044,30 +8044,6 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.9-replica-set-noauth-ssl - commands: - - func: run server - vars: - TOPOLOGY: replica_set - AUTH: noauth - SSL: ssl - - func: run tests - vars: - AUTH: noauth - SSL: ssl - tags: [server-version] - - name: test-python3.9-sharded-cluster-auth-ssl - commands: - - func: run server - vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl - - func: run tests - vars: - AUTH: auth - SSL: ssl - tags: [server-version] - name: test-python3.10-standalone-noauth-nossl commands: - func: run server @@ -8080,31 +8056,19 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.10-replica-set-noauth-ssl + - name: test-python3.11-standalone-noauth-nossl commands: - func: run server vars: - TOPOLOGY: replica_set + TOPOLOGY: standalone AUTH: noauth - SSL: ssl + SSL: nossl - func: run tests vars: AUTH: noauth - SSL: ssl - tags: [server-version] - - name: test-python3.10-sharded-cluster-auth-ssl - commands: - - func: run server - vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl - - func: run tests - vars: - AUTH: auth - SSL: ssl + SSL: nossl tags: [server-version] - - name: test-python3.11-standalone-noauth-nossl + - name: test-python3.12-standalone-noauth-nossl commands: - func: run server vars: @@ -8116,31 +8080,19 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.11-replica-set-noauth-ssl + - name: test-python3.13-standalone-noauth-nossl commands: - func: run server vars: - TOPOLOGY: replica_set + TOPOLOGY: standalone AUTH: noauth - SSL: ssl + SSL: nossl - func: run tests vars: AUTH: noauth - SSL: ssl - tags: [server-version] - - name: test-python3.11-sharded-cluster-auth-ssl - commands: - - func: run server - vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl - - func: run tests - vars: - AUTH: auth - SSL: ssl + SSL: nossl tags: [server-version] - - name: test-python3.12-standalone-noauth-nossl + - name: test-pypy3.10-standalone-noauth-nossl commands: - func: run server vars: @@ -8152,7 +8104,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.12-replica-set-noauth-ssl + - name: test-python3.9-replica-set-noauth-ssl commands: - func: run server vars: @@ -8164,7 +8116,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.12-sharded-cluster-auth-ssl + - name: test-python3.10-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8176,19 +8128,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-python3.13-standalone-noauth-nossl - commands: - - func: run server - vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl - - func: run tests - vars: - AUTH: noauth - SSL: nossl - tags: [server-version] - - name: test-python3.13-replica-set-noauth-ssl + - name: test-python3.11-replica-set-noauth-ssl commands: - func: run server vars: @@ -8200,7 +8140,7 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.13-sharded-cluster-auth-ssl + - name: test-python3.12-sharded-cluster-auth-ssl commands: - func: run server vars: @@ -8212,19 +8152,7 @@ tasks: AUTH: auth SSL: ssl tags: [server-version] - - name: test-pypy3.10-standalone-noauth-nossl - commands: - - func: run server - vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl - - func: run tests - vars: - AUTH: noauth - SSL: nossl - tags: [server-version] - - name: test-pypy3.10-replica-set-noauth-ssl + - name: test-python3.13-replica-set-noauth-ssl commands: - func: run server vars: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4fb4d8e6ef..4b6bcabc02 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -580,9 +580,11 @@ def create_aws_lambda_variants(): def create_server_version_tasks(): tasks = [] - for python, topology in product(ALL_PYTHONS, TOPOLOGIES): + variants = [(p, "standalone") for p in ALL_PYTHONS] + for python, topology in zip_cycle(ALL_PYTHONS, ["replica_set", "sharded_cluster"]): + variants.append((python, topology)) + for python, topology in variants: tags = ["server-version"] - if topology == "standalone": auth = "noauth" ssl = "nossl" From 708aff31ef394e057bd3c303abf6433c617ce145 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 19:38:55 -0500 Subject: [PATCH 07/18] pare down matrix --- .evergreen/generated_configs/tasks.yml | 116 ++++++++++++------------- .evergreen/scripts/generate_config.py | 4 +- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 26ec9f4605..e7ec07a2a0 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,67 +8032,79 @@ tasks: - sync_async # Server version tests - - name: test-python3.9-standalone-noauth-nossl + - name: test-python3.9-sharded-cluster-auth-ssl commands: - func: run server vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl tags: [server-version] - - name: test-python3.10-standalone-noauth-nossl + - name: test-python3.10-sharded-cluster-auth-ssl commands: - func: run server vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl tags: [server-version] - - name: test-python3.11-standalone-noauth-nossl + - name: test-python3.11-sharded-cluster-auth-ssl commands: - func: run server vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl tags: [server-version] - - name: test-python3.12-standalone-noauth-nossl + - name: test-python3.12-sharded-cluster-auth-ssl commands: - func: run server vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl tags: [server-version] - - name: test-python3.13-standalone-noauth-nossl + - name: test-python3.13-sharded-cluster-auth-ssl commands: - func: run server vars: - TOPOLOGY: standalone - AUTH: noauth - SSL: nossl + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl + tags: [server-version] + - name: test-pypy3.10-sharded-cluster-auth-ssl + commands: + - func: run server + vars: + TOPOLOGY: sharded_cluster + AUTH: auth + SSL: ssl + - func: run tests + vars: + AUTH: auth + SSL: ssl tags: [server-version] - - name: test-pypy3.10-standalone-noauth-nossl + - name: test-python3.9-standalone-noauth-nossl commands: - func: run server vars: @@ -8104,7 +8116,7 @@ tasks: AUTH: noauth SSL: nossl tags: [server-version] - - name: test-python3.9-replica-set-noauth-ssl + - name: test-python3.10-replica-set-noauth-ssl commands: - func: run server vars: @@ -8116,19 +8128,19 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.10-sharded-cluster-auth-ssl + - name: test-python3.11-standalone-noauth-nossl commands: - func: run server vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl - func: run tests vars: - AUTH: auth - SSL: ssl + AUTH: noauth + SSL: nossl tags: [server-version] - - name: test-python3.11-replica-set-noauth-ssl + - name: test-python3.12-replica-set-noauth-ssl commands: - func: run server vars: @@ -8140,19 +8152,19 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-python3.12-sharded-cluster-auth-ssl + - name: test-python3.13-standalone-noauth-nossl commands: - func: run server vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl + TOPOLOGY: standalone + AUTH: noauth + SSL: nossl - func: run tests vars: - AUTH: auth - SSL: ssl + AUTH: noauth + SSL: nossl tags: [server-version] - - name: test-python3.13-replica-set-noauth-ssl + - name: test-pypy3.10-replica-set-noauth-ssl commands: - func: run server vars: @@ -8164,18 +8176,6 @@ tasks: AUTH: noauth SSL: ssl tags: [server-version] - - name: test-pypy3.10-sharded-cluster-auth-ssl - commands: - - func: run server - vars: - TOPOLOGY: sharded_cluster - AUTH: auth - SSL: ssl - - func: run tests - vars: - AUTH: auth - SSL: ssl - tags: [server-version] # Serverless tests - name: test-serverless diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4b6bcabc02..948252ba20 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -580,8 +580,8 @@ def create_aws_lambda_variants(): def create_server_version_tasks(): tasks = [] - variants = [(p, "standalone") for p in ALL_PYTHONS] - for python, topology in zip_cycle(ALL_PYTHONS, ["replica_set", "sharded_cluster"]): + variants = [(p, "sharded_cluster") for p in ALL_PYTHONS] + for python, topology in zip_cycle(ALL_PYTHONS, ["standalone", "replica_set"]): variants.append((python, topology)) for python, topology in variants: tags = ["server-version"] From 6bb70b6ea21ec9d320ad25a985f99b7768cd2136 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 19:46:49 -0500 Subject: [PATCH 08/18] enable coverage --- .evergreen/generated_configs/tasks.yml | 48 +++++++++++++++++++------- .evergreen/scripts/generate_config.py | 8 +++-- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index e7ec07a2a0..c56d62c3f0 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,149 +8032,173 @@ tasks: - sync_async # Server version tests - - name: test-python3.9-sharded-cluster-auth-ssl + - name: test-python3.9-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-sharded-cluster-auth-ssl + - name: test-python3.10-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-sharded-cluster-auth-ssl + - name: test-python3.11-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: "3.11" tags: [server-version] - - name: test-python3.12-sharded-cluster-auth-ssl + - name: test-python3.12-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-sharded-cluster-auth-ssl + - name: test-python3.13-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: "3.13" tags: [server-version] - - name: test-pypy3.10-sharded-cluster-auth-ssl + - name: test-pypy3.10-sharded-cluster-auth-ssl-cov commands: - func: run server vars: TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl + PYTHON_VERSION: pypy3.10 tags: [server-version] - - name: test-python3.9-standalone-noauth-nossl + - name: test-python3.9-standalone-noauth-nossl-cov commands: - func: run server vars: TOPOLOGY: standalone AUTH: noauth SSL: nossl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl + PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-replica-set-noauth-ssl + - name: test-python3.10-replica-set-noauth-ssl-cov commands: - func: run server vars: TOPOLOGY: replica_set AUTH: noauth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl + PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-standalone-noauth-nossl + - name: test-python3.11-standalone-noauth-nossl-cov commands: - func: run server vars: TOPOLOGY: standalone AUTH: noauth SSL: nossl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl + PYTHON_VERSION: "3.11" tags: [server-version] - - name: test-python3.12-replica-set-noauth-ssl + - name: test-python3.12-replica-set-noauth-ssl-cov commands: - func: run server vars: TOPOLOGY: replica_set AUTH: noauth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl + PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-standalone-noauth-nossl + - name: test-python3.13-standalone-noauth-nossl-cov commands: - func: run server vars: TOPOLOGY: standalone AUTH: noauth SSL: nossl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl + PYTHON_VERSION: "3.13" tags: [server-version] - - name: test-pypy3.10-replica-set-noauth-ssl + - name: test-pypy3.10-replica-set-noauth-ssl-cov commands: - func: run server vars: TOPOLOGY: replica_set AUTH: noauth SSL: ssl + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl + PYTHON_VERSION: pypy3.10 tags: [server-version] # Serverless tests diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 948252ba20..9c82ccdcd5 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -594,10 +594,12 @@ def create_server_version_tasks(): else: auth = "auth" ssl = "ssl" - name = get_task_name("test", python=python, topology=topology, auth=auth, ssl=ssl) - server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl) + name = get_task_name( + "test", python=python, topology=topology, auth=auth, ssl=ssl, coverage="coverage" + ) + server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl, COVERAGE="1") server_func = FunctionCall(func="run server", vars=server_vars) - test_vars = dict(AUTH=auth, SSL=ssl) + test_vars = dict(AUTH=auth, SSL=ssl, PYTHON_VERSION=python) test_func = FunctionCall(func="run tests", vars=test_vars) tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) return tasks From b895b8d8cd29385f831dbdb23049b69cc5478597 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 20:12:52 -0500 Subject: [PATCH 09/18] disable coverage on pypy --- .evergreen/generated_configs/tasks.yml | 48 ++++++++++----------- .evergreen/scripts/generate_config.py | 13 +++--- .evergreen/scripts/generate_config_utils.py | 2 +- 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index c56d62c3f0..8408893def 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,11 +8032,10 @@ tasks: - sync_async # Server version tests - - name: test-python3.9-sharded-cluster-auth-ssl-cov + - name: test-python3.9-auth-ssl-cov commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl COVERAGE: "1" @@ -8044,13 +8043,13 @@ tasks: vars: AUTH: auth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-sharded-cluster-auth-ssl-cov + - name: test-python3.10-auth-ssl-cov commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl COVERAGE: "1" @@ -8058,13 +8057,13 @@ tasks: vars: AUTH: auth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-sharded-cluster-auth-ssl-cov + - name: test-python3.11-auth-ssl-cov commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl COVERAGE: "1" @@ -8072,13 +8071,13 @@ tasks: vars: AUTH: auth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.11" tags: [server-version] - - name: test-python3.12-sharded-cluster-auth-ssl-cov + - name: test-python3.12-auth-ssl-cov commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl COVERAGE: "1" @@ -8086,13 +8085,13 @@ tasks: vars: AUTH: auth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-sharded-cluster-auth-ssl-cov + - name: test-python3.13-auth-ssl-cov commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl COVERAGE: "1" @@ -8100,27 +8099,25 @@ tasks: vars: AUTH: auth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.13" tags: [server-version] - - name: test-pypy3.10-sharded-cluster-auth-ssl-cov + - name: test-pypy3.10-auth-ssl commands: - func: run server vars: - TOPOLOGY: sharded_cluster AUTH: auth SSL: ssl - COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: ssl PYTHON_VERSION: pypy3.10 tags: [server-version] - - name: test-python3.9-standalone-noauth-nossl-cov + - name: test-python3.9-noauth-nossl-cov commands: - func: run server vars: - TOPOLOGY: standalone AUTH: noauth SSL: nossl COVERAGE: "1" @@ -8128,13 +8125,13 @@ tasks: vars: AUTH: noauth SSL: nossl + COVERAGE: "1" PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-replica-set-noauth-ssl-cov + - name: test-python3.10-noauth-ssl-cov commands: - func: run server vars: - TOPOLOGY: replica_set AUTH: noauth SSL: ssl COVERAGE: "1" @@ -8142,13 +8139,13 @@ tasks: vars: AUTH: noauth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-standalone-noauth-nossl-cov + - name: test-python3.11-noauth-nossl-cov commands: - func: run server vars: - TOPOLOGY: standalone AUTH: noauth SSL: nossl COVERAGE: "1" @@ -8156,13 +8153,13 @@ tasks: vars: AUTH: noauth SSL: nossl + COVERAGE: "1" PYTHON_VERSION: "3.11" tags: [server-version] - - name: test-python3.12-replica-set-noauth-ssl-cov + - name: test-python3.12-noauth-ssl-cov commands: - func: run server vars: - TOPOLOGY: replica_set AUTH: noauth SSL: ssl COVERAGE: "1" @@ -8170,13 +8167,13 @@ tasks: vars: AUTH: noauth SSL: ssl + COVERAGE: "1" PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-standalone-noauth-nossl-cov + - name: test-python3.13-noauth-nossl-cov commands: - func: run server vars: - TOPOLOGY: standalone AUTH: noauth SSL: nossl COVERAGE: "1" @@ -8184,16 +8181,15 @@ tasks: vars: AUTH: noauth SSL: nossl + COVERAGE: "1" PYTHON_VERSION: "3.13" tags: [server-version] - - name: test-pypy3.10-replica-set-noauth-ssl-cov + - name: test-pypy3.10-noauth-ssl commands: - func: run server vars: - TOPOLOGY: replica_set AUTH: noauth SSL: ssl - COVERAGE: "1" - func: run tests vars: AUTH: noauth diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 9c82ccdcd5..1453b27b0c 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -594,12 +594,13 @@ def create_server_version_tasks(): else: auth = "auth" ssl = "ssl" - name = get_task_name( - "test", python=python, topology=topology, auth=auth, ssl=ssl, coverage="coverage" - ) - server_vars = dict(TOPOLOGY=topology, AUTH=auth, SSL=ssl, COVERAGE="1") - server_func = FunctionCall(func="run server", vars=server_vars) - test_vars = dict(AUTH=auth, SSL=ssl, PYTHON_VERSION=python) + expansions = dict(AUTH=auth, SSL=ssl) + if python not in PYPYS: + expansions["COVERAGE"] = "1" + name = get_task_name("test", python=python, **expansions) + server_func = FunctionCall(func="run server", vars=expansions) + test_vars = expansions.copy() + test_vars["PYTHON_VERSION"] = python test_func = FunctionCall(func="run tests", vars=test_vars) tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) return tasks diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index 0d0feb0c0e..59de5beb70 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -44,7 +44,7 @@ standalone="Standalone", replica_set="Replica Set", sharded_cluster="Sharded Cluster" ), test_suites=dict(default="Sync", default_async="Async"), - coverage=dict(coverage="cov"), + coverage={"1": "cov"}, no_ext={"1": "No C"}, ) HOSTS = dict() From 9512c7a5347d8460ac132c56a329a0285f0be394 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 20:30:13 -0500 Subject: [PATCH 10/18] clean up --- .evergreen/generated_configs/tasks.yml | 48 +++++++++++++++++++------- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 8408893def..5eedfc43fd 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8032,168 +8032,192 @@ tasks: - sync_async # Server version tests - - name: test-python3.9-auth-ssl-cov + - name: test-python3.9-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" tags: [server-version] - - name: test-python3.10-auth-ssl-cov + - name: test-python3.10-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" tags: [server-version] - - name: test-python3.11-auth-ssl-cov + - name: test-python3.11-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" tags: [server-version] - - name: test-python3.12-auth-ssl-cov + - name: test-python3.12-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" tags: [server-version] - - name: test-python3.13-auth-ssl-cov + - name: test-python3.13-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" tags: [server-version] - - name: test-pypy3.10-auth-ssl + - name: test-pypy3.10-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 tags: [server-version] - - name: test-python3.9-noauth-nossl-cov + - name: test-python3.9-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.9" tags: [server-version] - - name: test-python3.10-noauth-ssl-cov + - name: test-python3.10-noauth-ssl-replica-set-cov commands: - func: run server vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-noauth-nossl-cov + - name: test-python3.11-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.11" tags: [server-version] - - name: test-python3.12-noauth-ssl-cov + - name: test-python3.12-noauth-ssl-replica-set-cov commands: - func: run server vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-noauth-nossl-cov + - name: test-python3.13-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.13" tags: [server-version] - - name: test-pypy3.10-noauth-ssl + - name: test-pypy3.10-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set - func: run tests vars: AUTH: noauth SSL: ssl + TOPOLOGY: replica_set PYTHON_VERSION: pypy3.10 tags: [server-version] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 1453b27b0c..1bbbab74b8 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -594,7 +594,7 @@ def create_server_version_tasks(): else: auth = "auth" ssl = "ssl" - expansions = dict(AUTH=auth, SSL=ssl) + expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: expansions["COVERAGE"] = "1" name = get_task_name("test", python=python, **expansions) From 48afdf6c0f7bad28f07fce0730ef07c9ed3f4b1f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 8 Apr 2025 20:43:41 -0500 Subject: [PATCH 11/18] clean up variable names --- .evergreen/scripts/generate_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 1bbbab74b8..676ec2bc8c 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -580,10 +580,10 @@ def create_aws_lambda_variants(): def create_server_version_tasks(): tasks = [] - variants = [(p, "sharded_cluster") for p in ALL_PYTHONS] + task_types = [(p, "sharded_cluster") for p in ALL_PYTHONS] for python, topology in zip_cycle(ALL_PYTHONS, ["standalone", "replica_set"]): - variants.append((python, topology)) - for python, topology in variants: + task_types.append((python, topology)) + for python, topology in task_types: tags = ["server-version"] if topology == "standalone": auth = "noauth" From 11a8cb63db00eea16b76dfcd21c5f53bb4572047 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 10:25:49 -0500 Subject: [PATCH 12/18] address review --- .evergreen/generated_configs/tasks.yml | 50 +++++++++----------------- .evergreen/scripts/generate_config.py | 24 ++++++------- 2 files changed, 28 insertions(+), 46 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 5eedfc43fd..eef20195cb 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8126,39 +8126,39 @@ tasks: TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 tags: [server-version] - - name: test-python3.9-noauth-nossl-standalone-cov + - name: test-python3.9-auth-ssl-standalone-cov commands: - func: run server vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl TOPOLOGY: standalone COVERAGE: "1" - func: run tests vars: - AUTH: noauth - SSL: nossl + AUTH: auth + SSL: ssl TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-noauth-ssl-replica-set-cov + - name: test-python3.10-noauth-nossl-replica-set-cov commands: - func: run server vars: AUTH: noauth - SSL: ssl + SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" - func: run tests vars: AUTH: noauth - SSL: ssl + SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.11-noauth-nossl-standalone-cov + - name: test-python3.12-noauth-nossl-standalone-cov commands: - func: run server vars: @@ -8172,52 +8172,36 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.12-noauth-ssl-replica-set-cov + - name: test-python3.13-auth-ssl-replica-set-cov commands: - func: run server vars: - AUTH: noauth + AUTH: auth SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - func: run tests vars: - AUTH: noauth + AUTH: auth SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" tags: [server-version] - - name: test-python3.13-noauth-nossl-standalone-cov + - name: test-pypy3.10-noauth-nossl-sharded-cluster commands: - func: run server vars: AUTH: noauth SSL: nossl - TOPOLOGY: standalone - COVERAGE: "1" + TOPOLOGY: sharded_cluster - func: run tests vars: AUTH: noauth SSL: nossl - TOPOLOGY: standalone - COVERAGE: "1" - PYTHON_VERSION: "3.13" - tags: [server-version] - - name: test-pypy3.10-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 tags: [server-version] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 676ec2bc8c..7418103bdb 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -580,20 +580,18 @@ def create_aws_lambda_variants(): def create_server_version_tasks(): tasks = [] - task_types = [(p, "sharded_cluster") for p in ALL_PYTHONS] - for python, topology in zip_cycle(ALL_PYTHONS, ["standalone", "replica_set"]): - task_types.append((python, topology)) - for python, topology in task_types: + # Test all pythons with sharded_cluster, auth, and ssl. + task_types = [(p, "sharded_cluster", "auth", "ssl") for p in ALL_PYTHONS] + # Test all combinations of topology, auth, and ssl, with rotating pythons. + for python, topology, auth, ssl in zip_cycle( + ALL_PYTHONS, TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"] + ): + # Skip the ones we already have. + if topology == "sharded_cluster" and auth == "auth" and ssl == "ssl": + continue + task_types.append((python, topology, auth, ssl)) + for python, topology, auth, ssl in task_types: tags = ["server-version"] - if topology == "standalone": - auth = "noauth" - ssl = "nossl" - elif topology == "replica_set": - auth = "noauth" - ssl = "ssl" - else: - auth = "auth" - ssl = "ssl" expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: expansions["COVERAGE"] = "1" From 7c8dcb086a76bdf9a83dc13de0bab53ae39a25a0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 10:27:31 -0500 Subject: [PATCH 13/18] address review --- .evergreen/generated_configs/tasks.yml | 44 ++++++++++++++++++-------- .evergreen/scripts/generate_config.py | 4 +-- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index eef20195cb..590c202d2a 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8126,67 +8126,83 @@ tasks: TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 tags: [server-version] - - name: test-python3.9-auth-ssl-standalone-cov + - name: test-python3.9-auth-nossl-standalone-cov commands: - func: run server vars: AUTH: auth - SSL: ssl + SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - func: run tests vars: AUTH: auth - SSL: ssl + SSL: nossl TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.10-noauth-nossl-replica-set-cov + - name: test-python3.10-noauth-nossl-standalone-cov commands: - func: run server vars: AUTH: noauth SSL: nossl - TOPOLOGY: replica_set + TOPOLOGY: standalone COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl - TOPOLOGY: replica_set + TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.12-noauth-nossl-standalone-cov + - name: test-python3.11-auth-nossl-replica-set-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: nossl + TOPOLOGY: replica_set + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: nossl + TOPOLOGY: replica_set + COVERAGE: "1" + PYTHON_VERSION: "3.11" + tags: [server-version] + - name: test-python3.12-noauth-nossl-replica-set-cov commands: - func: run server vars: AUTH: noauth SSL: nossl - TOPOLOGY: standalone + TOPOLOGY: replica_set COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl - TOPOLOGY: standalone + TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.13-auth-ssl-replica-set-cov + - name: test-python3.13-auth-nossl-sharded-cluster-cov commands: - func: run server vars: AUTH: auth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: sharded_cluster COVERAGE: "1" - func: run tests vars: AUTH: auth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.13" tags: [server-version] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 7418103bdb..9eabc3e807 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -583,8 +583,8 @@ def create_server_version_tasks(): # Test all pythons with sharded_cluster, auth, and ssl. task_types = [(p, "sharded_cluster", "auth", "ssl") for p in ALL_PYTHONS] # Test all combinations of topology, auth, and ssl, with rotating pythons. - for python, topology, auth, ssl in zip_cycle( - ALL_PYTHONS, TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"] + for python, (topology, auth, ssl) in zip_cycle( + ALL_PYTHONS, product(TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"]) ): # Skip the ones we already have. if topology == "sharded_cluster" and auth == "auth" and ssl == "ssl": From 58f3120f57e4b24251519aaeb9647924ac187b25 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 10:34:39 -0500 Subject: [PATCH 14/18] update --- .evergreen/generated_configs/tasks.yml | 98 +++++++++++++++++++++++--- .evergreen/scripts/generate_config.py | 4 +- 2 files changed, 90 insertions(+), 12 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 590c202d2a..39010f8318 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8126,7 +8126,23 @@ tasks: TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 tags: [server-version] - - name: test-python3.9-auth-nossl-standalone-cov + - name: test-python3.9-auth-ssl-standalone-cov + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: standalone + COVERAGE: "1" + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: standalone + COVERAGE: "1" + PYTHON_VERSION: "3.9" + tags: [server-version] + - name: test-python3.10-auth-nossl-standalone-cov commands: - func: run server vars: @@ -8140,9 +8156,25 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" + tags: [server-version] + - name: test-python3.11-noauth-ssl-standalone-cov + commands: + - func: run server + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: standalone + COVERAGE: "1" + - func: run tests + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: standalone + COVERAGE: "1" + PYTHON_VERSION: "3.11" tags: [server-version] - - name: test-python3.10-noauth-nossl-standalone-cov + - name: test-python3.12-noauth-nossl-standalone-cov commands: - func: run server vars: @@ -8156,25 +8188,55 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: [server-version] - - name: test-python3.11-auth-nossl-replica-set-cov + - name: test-python3.13-auth-ssl-replica-set-cov commands: - func: run server vars: AUTH: auth - SSL: nossl + SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: replica_set + COVERAGE: "1" + PYTHON_VERSION: "3.13" + tags: [server-version] + - name: test-pypy3.10-auth-nossl-replica-set + commands: + - func: run server vars: AUTH: auth SSL: nossl TOPOLOGY: replica_set + - func: run tests + vars: + AUTH: auth + SSL: nossl + TOPOLOGY: replica_set + PYTHON_VERSION: pypy3.10 + tags: [server-version] + - name: test-python3.9-noauth-ssl-replica-set-cov + commands: + - func: run server + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.11" + - func: run tests + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + COVERAGE: "1" + PYTHON_VERSION: "3.9" tags: [server-version] - - name: test-python3.12-noauth-nossl-replica-set-cov + - name: test-python3.10-noauth-nossl-replica-set-cov commands: - func: run server vars: @@ -8188,9 +8250,9 @@ tasks: SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.10" tags: [server-version] - - name: test-python3.13-auth-nossl-sharded-cluster-cov + - name: test-python3.12-auth-nossl-sharded-cluster-cov commands: - func: run server vars: @@ -8204,6 +8266,22 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster COVERAGE: "1" + PYTHON_VERSION: "3.12" + tags: [server-version] + - name: test-python3.13-noauth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" + - func: run tests + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: sharded_cluster + COVERAGE: "1" PYTHON_VERSION: "3.13" tags: [server-version] - name: test-pypy3.10-noauth-nossl-sharded-cluster diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 9eabc3e807..49abacbf02 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -583,8 +583,8 @@ def create_server_version_tasks(): # Test all pythons with sharded_cluster, auth, and ssl. task_types = [(p, "sharded_cluster", "auth", "ssl") for p in ALL_PYTHONS] # Test all combinations of topology, auth, and ssl, with rotating pythons. - for python, (topology, auth, ssl) in zip_cycle( - ALL_PYTHONS, product(TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"]) + for (topology, auth, ssl), python in zip_cycle( + list(product(TOPOLOGIES, ["auth", "noauth"], ["ssl", "nossl"])), ALL_PYTHONS ): # Skip the ones we already have. if topology == "sharded_cluster" and auth == "auth" and ssl == "ssl": From 6f2e5f1cde12f4e6d64ec0d7199a158eb19782da Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 14:00:33 -0500 Subject: [PATCH 15/18] add more tags --- .evergreen/generated_configs/tasks.yml | 119 +++++++++++++++++++++---- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 103 insertions(+), 18 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 39010f8318..871949efa5 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8047,7 +8047,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: [server-version] + tags: + - server-version + - "3.9" + - sharded_cluster + - auth + - ssl - name: test-python3.10-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8063,7 +8068,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: [server-version] + tags: + - server-version + - "3.10" + - sharded_cluster + - auth + - ssl - name: test-python3.11-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8079,7 +8089,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.11" - tags: [server-version] + tags: + - server-version + - "3.11" + - sharded_cluster + - auth + - ssl - name: test-python3.12-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8095,7 +8110,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: [server-version] + tags: + - server-version + - "3.12" + - sharded_cluster + - auth + - ssl - name: test-python3.13-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8111,7 +8131,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: [server-version] + tags: + - server-version + - "3.13" + - sharded_cluster + - auth + - ssl - name: test-pypy3.10-auth-ssl-sharded-cluster commands: - func: run server @@ -8125,7 +8150,12 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 - tags: [server-version] + tags: + - server-version + - pypy3.10 + - sharded_cluster + - auth + - ssl - name: test-python3.9-auth-ssl-standalone-cov commands: - func: run server @@ -8141,7 +8171,12 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: [server-version] + tags: + - server-version + - "3.9" + - standalone + - auth + - ssl - name: test-python3.10-auth-nossl-standalone-cov commands: - func: run server @@ -8157,7 +8192,12 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: [server-version] + tags: + - server-version + - "3.10" + - standalone + - auth + - nossl - name: test-python3.11-noauth-ssl-standalone-cov commands: - func: run server @@ -8173,7 +8213,12 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.11" - tags: [server-version] + tags: + - server-version + - "3.11" + - standalone + - noauth + - ssl - name: test-python3.12-noauth-nossl-standalone-cov commands: - func: run server @@ -8189,7 +8234,12 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: [server-version] + tags: + - server-version + - "3.12" + - standalone + - noauth + - nossl - name: test-python3.13-auth-ssl-replica-set-cov commands: - func: run server @@ -8205,7 +8255,12 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: [server-version] + tags: + - server-version + - "3.13" + - replica_set + - auth + - ssl - name: test-pypy3.10-auth-nossl-replica-set commands: - func: run server @@ -8219,7 +8274,12 @@ tasks: SSL: nossl TOPOLOGY: replica_set PYTHON_VERSION: pypy3.10 - tags: [server-version] + tags: + - server-version + - pypy3.10 + - replica_set + - auth + - nossl - name: test-python3.9-noauth-ssl-replica-set-cov commands: - func: run server @@ -8235,7 +8295,12 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: [server-version] + tags: + - server-version + - "3.9" + - replica_set + - noauth + - ssl - name: test-python3.10-noauth-nossl-replica-set-cov commands: - func: run server @@ -8251,7 +8316,12 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: [server-version] + tags: + - server-version + - "3.10" + - replica_set + - noauth + - nossl - name: test-python3.12-auth-nossl-sharded-cluster-cov commands: - func: run server @@ -8267,7 +8337,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: [server-version] + tags: + - server-version + - "3.12" + - sharded_cluster + - auth + - nossl - name: test-python3.13-noauth-ssl-sharded-cluster-cov commands: - func: run server @@ -8283,7 +8358,12 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: [server-version] + tags: + - server-version + - "3.13" + - sharded_cluster + - noauth + - ssl - name: test-pypy3.10-noauth-nossl-sharded-cluster commands: - func: run server @@ -8297,7 +8377,12 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 - tags: [server-version] + tags: + - server-version + - pypy3.10 + - sharded_cluster + - noauth + - nossl # Serverless tests - name: test-serverless diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 49abacbf02..23f430adc4 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -591,7 +591,7 @@ def create_server_version_tasks(): continue task_types.append((python, topology, auth, ssl)) for python, topology, auth, ssl in task_types: - tags = ["server-version"] + tags = ["server-version", python, topology, auth, ssl] expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: expansions["COVERAGE"] = "1" From bb1fbfda4b6534a2b92bcedc8c1015ad2e0e39f4 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 14:21:07 -0500 Subject: [PATCH 16/18] combine topo auth ssl --- .evergreen/generated_configs/tasks.yml | 119 ++++--------------------- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 18 insertions(+), 103 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 871949efa5..94757104ee 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -8047,12 +8047,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: - - server-version - - "3.9" - - sharded_cluster - - auth - - ssl + tags: [server-version, "3.9", sharded_cluster-auth-ssl] - name: test-python3.10-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8068,12 +8063,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: - - server-version - - "3.10" - - sharded_cluster - - auth - - ssl + tags: [server-version, "3.10", sharded_cluster-auth-ssl] - name: test-python3.11-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8089,12 +8079,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.11" - tags: - - server-version - - "3.11" - - sharded_cluster - - auth - - ssl + tags: [server-version, "3.11", sharded_cluster-auth-ssl] - name: test-python3.12-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8110,12 +8095,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: - - server-version - - "3.12" - - sharded_cluster - - auth - - ssl + tags: [server-version, "3.12", sharded_cluster-auth-ssl] - name: test-python3.13-auth-ssl-sharded-cluster-cov commands: - func: run server @@ -8131,12 +8111,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: - - server-version - - "3.13" - - sharded_cluster - - auth - - ssl + tags: [server-version, "3.13", sharded_cluster-auth-ssl] - name: test-pypy3.10-auth-ssl-sharded-cluster commands: - func: run server @@ -8150,12 +8125,7 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 - tags: - - server-version - - pypy3.10 - - sharded_cluster - - auth - - ssl + tags: [server-version, pypy3.10, sharded_cluster-auth-ssl] - name: test-python3.9-auth-ssl-standalone-cov commands: - func: run server @@ -8171,12 +8141,7 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: - - server-version - - "3.9" - - standalone - - auth - - ssl + tags: [server-version, "3.9", standalone-auth-ssl] - name: test-python3.10-auth-nossl-standalone-cov commands: - func: run server @@ -8192,12 +8157,7 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: - - server-version - - "3.10" - - standalone - - auth - - nossl + tags: [server-version, "3.10", standalone-auth-nossl] - name: test-python3.11-noauth-ssl-standalone-cov commands: - func: run server @@ -8213,12 +8173,7 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.11" - tags: - - server-version - - "3.11" - - standalone - - noauth - - ssl + tags: [server-version, "3.11", standalone-noauth-ssl] - name: test-python3.12-noauth-nossl-standalone-cov commands: - func: run server @@ -8234,12 +8189,7 @@ tasks: TOPOLOGY: standalone COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: - - server-version - - "3.12" - - standalone - - noauth - - nossl + tags: [server-version, "3.12", standalone-noauth-nossl] - name: test-python3.13-auth-ssl-replica-set-cov commands: - func: run server @@ -8255,12 +8205,7 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: - - server-version - - "3.13" - - replica_set - - auth - - ssl + tags: [server-version, "3.13", replica_set-auth-ssl] - name: test-pypy3.10-auth-nossl-replica-set commands: - func: run server @@ -8274,12 +8219,7 @@ tasks: SSL: nossl TOPOLOGY: replica_set PYTHON_VERSION: pypy3.10 - tags: - - server-version - - pypy3.10 - - replica_set - - auth - - nossl + tags: [server-version, pypy3.10, replica_set-auth-nossl] - name: test-python3.9-noauth-ssl-replica-set-cov commands: - func: run server @@ -8295,12 +8235,7 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.9" - tags: - - server-version - - "3.9" - - replica_set - - noauth - - ssl + tags: [server-version, "3.9", replica_set-noauth-ssl] - name: test-python3.10-noauth-nossl-replica-set-cov commands: - func: run server @@ -8316,12 +8251,7 @@ tasks: TOPOLOGY: replica_set COVERAGE: "1" PYTHON_VERSION: "3.10" - tags: - - server-version - - "3.10" - - replica_set - - noauth - - nossl + tags: [server-version, "3.10", replica_set-noauth-nossl] - name: test-python3.12-auth-nossl-sharded-cluster-cov commands: - func: run server @@ -8337,12 +8267,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.12" - tags: - - server-version - - "3.12" - - sharded_cluster - - auth - - nossl + tags: [server-version, "3.12", sharded_cluster-auth-nossl] - name: test-python3.13-noauth-ssl-sharded-cluster-cov commands: - func: run server @@ -8358,12 +8283,7 @@ tasks: TOPOLOGY: sharded_cluster COVERAGE: "1" PYTHON_VERSION: "3.13" - tags: - - server-version - - "3.13" - - sharded_cluster - - noauth - - ssl + tags: [server-version, "3.13", sharded_cluster-noauth-ssl] - name: test-pypy3.10-noauth-nossl-sharded-cluster commands: - func: run server @@ -8377,12 +8297,7 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster PYTHON_VERSION: pypy3.10 - tags: - - server-version - - pypy3.10 - - sharded_cluster - - noauth - - nossl + tags: [server-version, pypy3.10, sharded_cluster-noauth-nossl] # Serverless tests - name: test-serverless diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 23f430adc4..8130359152 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -591,7 +591,7 @@ def create_server_version_tasks(): continue task_types.append((python, topology, auth, ssl)) for python, topology, auth, ssl in task_types: - tags = ["server-version", python, topology, auth, ssl] + tags = ["server-version", python, f"{topology}-{auth}-{ssl}"] expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology) if python not in PYPYS: expansions["COVERAGE"] = "1" From a7c58610f67a42b4334d592f91355452683bd89b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 15:47:36 -0500 Subject: [PATCH 17/18] fix coverage --- .evergreen/generated_configs/tasks.yml | 14 +------------- .evergreen/scripts/generate_config.py | 8 ++++---- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 94757104ee..4588ccdbc2 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -820,19 +820,7 @@ tasks: - name: coverage-report commands: - func: download and merge coverage - depends_on: - - name: .standalone - variant: .coverage_tag - status: "*" - patch_optional: true - - name: .replica_set - variant: .coverage_tag - status: "*" - patch_optional: true - - name: .sharded_cluster - variant: .coverage_tag - status: "*" - patch_optional: true + depends_on: [{ name: .server_version, variant: .coverage_tag, status: "*", patch_optional: true }] tags: [coverage] # Doctest tests diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 8130359152..8a75957643 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -889,11 +889,11 @@ def create_coverage_report_tasks(): # Instead list out all coverage tasks using tags. # Run the coverage task even if some tasks fail. # Run the coverage task even if some tasks are not scheduled in a patch build. - task_deps = [] - for name in [".standalone", ".replica_set", ".sharded_cluster"]: - task_deps.append( - EvgTaskDependency(name=name, variant=".coverage_tag", status="*", patch_optional=True) + task_deps = [ + EvgTaskDependency( + name=".server_version", variant=".coverage_tag", status="*", patch_optional=True ) + ] cmd = FunctionCall(func="download and merge coverage") return [EvgTask(name=task_name, tags=tags, depends_on=task_deps, commands=[cmd])] From 32965bb86d3a000c6fc9ed1625b68fc29e4c8e51 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Apr 2025 15:50:11 -0500 Subject: [PATCH 18/18] udpate tag --- .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 4588ccdbc2..89d8ff8d6c 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -820,7 +820,7 @@ tasks: - name: coverage-report commands: - func: download and merge coverage - depends_on: [{ name: .server_version, variant: .coverage_tag, status: "*", patch_optional: true }] + depends_on: [{ name: .server-version, variant: .coverage_tag, status: "*", patch_optional: true }] tags: [coverage] # Doctest tests diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 8a75957643..2f1e978252 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -891,7 +891,7 @@ def create_coverage_report_tasks(): # Run the coverage task even if some tasks are not scheduled in a patch build. task_deps = [ EvgTaskDependency( - name=".server_version", variant=".coverage_tag", status="*", patch_optional=True + name=".server-version", variant=".coverage_tag", status="*", patch_optional=True ) ] cmd = FunctionCall(func="download and merge coverage")