From 96080229f7dd51fb12a0e231f9e83269cbf7e1ed Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Oct 2024 20:22:20 -0500 Subject: [PATCH 01/20] PYTHON-4838 Generate OCSP tasks and build variants using shrub.py --- .evergreen/config.yml | 187 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 154 insertions(+), 33 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1ef8751501..829f881e94 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2826,42 +2826,163 @@ buildvariants: - "test-6.0-standalone" - "test-5.0-standalone" -- matrix_name: "ocsp-test" - matrix_spec: - platform: rhel8 - python-version: ["3.9", "3.10", "pypy3.9", "pypy3.10"] - mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "latest"] - auth: "noauth" - ssl: "ssl" - display_name: "OCSP test ${platform} ${python-version} ${mongodb-version}" - batchtime: 20160 # 14 days +# OCSP test matrix. +- name: ocsp-test-rhel8-v4.0 tasks: - - name: ".ocsp" - -- matrix_name: "ocsp-test-windows" - matrix_spec: - platform: windows - python-version-windows: ["3.9", "3.10"] - mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "latest"] - auth: "noauth" - ssl: "ssl" - display_name: "OCSP test ${platform} ${python-version-windows} ${mongodb-version}" - batchtime: 20160 # 14 days + - name: .ocsp + display_name: OCSP test RHEL8 v4.0 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "4.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: ocsp-test-rhel8-v4.4 tasks: - # Windows MongoDB servers do not staple OCSP responses and only support RSA. - - name: ".ocsp-rsa !.ocsp-staple" - -- matrix_name: "ocsp-test-macos" - matrix_spec: - platform: macos - mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "latest"] - auth: "noauth" - ssl: "ssl" - display_name: "OCSP test ${platform} ${mongodb-version}" - batchtime: 20160 # 14 days + - name: .ocsp + display_name: OCSP test RHEL8 v4.4 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "4.4" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: ocsp-test-rhel8-v5.0 + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 v5.0 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "5.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: ocsp-test-rhel8-v6.0 tasks: - # macOS MongoDB servers do not staple OCSP responses and only support RSA. - - name: ".ocsp-rsa !.ocsp-staple" + - name: .ocsp + display_name: OCSP test RHEL8 v6.0 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "6.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: ocsp-test-rhel8-v7.0 + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 v7.0 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "7.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: ocsp-test-rhel8-v8.0 + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 v8.0 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: "8.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: ocsp-test-rhel8-rapid + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 rapid + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: rapid + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 +- name: ocsp-test-rhel8-latest + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 latest + run_on: + - rhel87-small + batchtime: 20160 + expansions: + VERSION: latest + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: ocsp-test-win64-v4.4 + tasks: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test Win64 v4.4 + run_on: + - windows-64-vsMulti-small + batchtime: 20160 + expansions: + VERSION: "4.4" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: C:/python/Python39/python.exe +- name: ocsp-test-win64-v8.0 + tasks: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test Win64 v8.0 + run_on: + - windows-64-vsMulti-small + batchtime: 20160 + expansions: + VERSION: "8.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: C:/python/Python39/python.exe +- name: ocsp-test-macos-v4.4 + tasks: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test macOS v4.4 + run_on: + - macos-14 + batchtime: 20160 + expansions: + VERSION: "4.4" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: ocsp-test-macos-v8.0 + tasks: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test macOS v8.0 + run_on: + - macos-14 + batchtime: 20160 + expansions: + VERSION: "8.0" + AUTH: noauth + SSL: ssl + TOPOLOGY: server + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - matrix_name: "oidc-auth-test" matrix_spec: From 486e95ef61f0b8d9c67d603f89631c26967cd8e2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Oct 2024 20:23:35 -0500 Subject: [PATCH 02/20] Add script --- .evergreen/scripts/generate_config.py | 178 ++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 .evergreen/scripts/generate_config.py diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py new file mode 100644 index 0000000000..4b363a082a --- /dev/null +++ b/.evergreen/scripts/generate_config.py @@ -0,0 +1,178 @@ +# /// script +# requires-python = ">=3.9" +# dependencies = [ +# "shrub.py>=3.2.0", +# "pyyaml>=6.0.2" +# ] +# /// + +# Note: Run this file with `hatch run`, `pipx run`, or `uv run`. +from __future__ import annotations + +import os +import sys +from itertools import product +from pathlib import Path + +from shrub.v3.evg_build_variant import BuildVariant +from shrub.v3.evg_command import FunctionCall +from shrub.v3.evg_project import EvgProject +from shrub.v3.evg_task import EvgTask, EvgTaskRef +from shrub.v3.shrub_service import ShrubService + +# Top level variables. +ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] +CPYTHONS = ["py3.9", "py3.10", "py3.11", "py3.12", "py3.13"] +PYPYS = ["pypy3.9", "pypy3.10"] +ALL_PYTHONS = CPYTHONS + PYPYS +ALL_WIN_PYTHONS = CPYTHONS.copy() +ALL_WIN_PYTHONS = ALL_WIN_PYTHONS + [f"32-bit {p}" for p in ALL_WIN_PYTHONS] +AUTHS = ["noauth", "auth"] +SSLS = ["nossl", "ssl"] +AUTH_SSLS = list(product(AUTHS, SSLS)) +TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"] +C_EXTS = ["without c extensions", "with c extensions"] +BATCHTIME_WEEK = 10080 +HOSTS = dict(rhel8="rhel87-small", Win64="windows-64-vsMulti-small", macOS="macos-14") + + +# Helper functions. +def create_variant(task_names, display_name, *, python=None, host=None, **kwargs): + task_refs = [EvgTaskRef(name=n) for n in task_names] + kwargs.setdefault("expansions", dict()) + expansions = kwargs.pop("expansions") + host = host or "rhel8" + run_on = [HOSTS[host]] + name = display_name.replace(" ", "-").lower() + if python: + expansions["PYTHON_BINARY"] = get_python_binary(python, host) + expansions = expansions or None + return BuildVariant( + name=name, + display_name=display_name, + tasks=task_refs, + expansions=expansions, + run_on=run_on, + **kwargs, + ) + + +def get_python_binary(python, host): + if host.lower() == "win64": + is_32 = python.startswith("32-bit") + if is_32: + _, python = python.split() + base = "C:/python/32/" + else: + base = "C:/python/" + middle = python.replace("py", "Python").replace(".", "") + return base + middle + "/python.exe" + + if host.lower() == "rhel8": + if python.startswith("pypy"): + return f"/opt/python/{python}/bin/python3" + return f"/opt/python/{python[2:]}/bin/python3" + + if host.lower() == "macos": + ver = python.replace("py", "") + return f"/Library/Frameworks/Python.Framework/Versions/{ver}/bin/python3" + + raise ValueError(f"no match found for {python} on {host}") + + +def write_output(project: EvgProject, target: str) -> str: + HERE = Path(__file__).resolve().parent + with open(HERE.parent / "generated_configs" / target, "w") as fid: + fid.write(ShrubService.generate_yaml(project)) + + +############## +# OCSP +############## + + +def create_ocsp_task(file_name, server_type): + algo = file_name.split("-")[0] + + # Create ocsp server call. + vars = dict(OCSP_ALGORITHM=algo, SERVER_TYPE=server_type) + server_func = FunctionCall(func="run-ocsp-server", vars=vars) + + # Create bootstrap function call. + vars = dict(ORCHESTRATION_FILE=file_name) + bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=vars) + + # Create test function call. + should_succeed = "true" if "valid" in server_type else "false" + vars = dict(OCSP_ALGORITHM=algo, OCSP_TLS_SHOULD_SUCCEED=should_succeed) + test_func = FunctionCall(func="run tests", vars=vars) + + # Handle tags. + tags = ["ocsp", f"ocsp-{algo}"] + if "mustStaple" in file_name: + tags.append("ocsp-staple") + + # Create task. + name = file_name.replace(".json", "") + task_name = f"test-ocsp-{server_type}-{name}" + commands = [server_func, bootstrap_func, test_func] + return EvgTask(name=task_name, tags=tags, commands=commands) + + +tasks = [] + +# Create OCSP tasks. +if not os.environ.get("DRIVERS_TOOLS"): + print("Set DRIVERS_TOOLS environment variable!") # noqa: T201 + sys.exit(1) +config = Path(os.environ["DRIVERS_TOOLS"]) / ".evergreen/orchestration/configs/servers" +for path in config.glob("*ocsp*"): + for server_type in ["valid", "revoked", "valid-delegate", "revoked-delegate"]: + task = create_ocsp_task(path.name, server_type) + tasks.append(task) + +# Create build variants. +variants = [] + +# OCSP tests on rhel8 with rotating CPython versions. +for version in ALL_VERSIONS: + task_refs = [EvgTaskRef(name=".ocsp")] + expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") + batchtime = BATCHTIME_WEEK * 2 + python = ALL_PYTHONS[len(variants) % len(ALL_PYTHONS)] + host = "rhel8" + if version in ["rapid", "latest"]: + display_name = f"OCSP test RHEL8 {version}" + else: + display_name = f"OCSP test RHEL8 v{version}" + variant = create_variant( + [".ocsp"], + display_name, + python=python, + batchtime=batchtime, + host=host, + expansions=expansions, + ) + variants.append(variant) + +# OCSP tests on Windows and MacOS with lowest CPython version. +for host, version in product(["Win64", "macOS"], ["4.4", "8.0"]): + # MongoDB servers do not staple OCSP responses and only support RSA. + task_names = [".ocsp-rsa !.ocsp-staple"] + expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") + batchtime = BATCHTIME_WEEK * 2 + display_name = f"OCSP test {host} v{version}" + variant = create_variant( + task_names, + display_name, + python=CPYTHONS[0], + host=host, + expansions=expansions, + batchtime=batchtime, + ) + variants.append(variant) + +# Generate OCSP config. +# project = EvgProject(tasks=None, buildvariants=variants) +# write_output(project, "ocsp.yaml") +# print(ShrubService.generate_yaml(project)) From 9c0c060f7cfd238936d69cdb5736cffae7564fbf Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Oct 2024 20:25:23 -0500 Subject: [PATCH 03/20] produce just the variants --- .evergreen/scripts/generate_config.py | 58 +-------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4b363a082a..8ce48790ab 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -9,16 +9,10 @@ # Note: Run this file with `hatch run`, `pipx run`, or `uv run`. from __future__ import annotations -import os -import sys from itertools import product -from pathlib import Path from shrub.v3.evg_build_variant import BuildVariant -from shrub.v3.evg_command import FunctionCall -from shrub.v3.evg_project import EvgProject -from shrub.v3.evg_task import EvgTask, EvgTaskRef -from shrub.v3.shrub_service import ShrubService +from shrub.v3.evg_task import EvgTaskRef # Top level variables. ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] @@ -80,58 +74,11 @@ def get_python_binary(python, host): raise ValueError(f"no match found for {python} on {host}") -def write_output(project: EvgProject, target: str) -> str: - HERE = Path(__file__).resolve().parent - with open(HERE.parent / "generated_configs" / target, "w") as fid: - fid.write(ShrubService.generate_yaml(project)) - - ############## # OCSP ############## - -def create_ocsp_task(file_name, server_type): - algo = file_name.split("-")[0] - - # Create ocsp server call. - vars = dict(OCSP_ALGORITHM=algo, SERVER_TYPE=server_type) - server_func = FunctionCall(func="run-ocsp-server", vars=vars) - - # Create bootstrap function call. - vars = dict(ORCHESTRATION_FILE=file_name) - bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=vars) - - # Create test function call. - should_succeed = "true" if "valid" in server_type else "false" - vars = dict(OCSP_ALGORITHM=algo, OCSP_TLS_SHOULD_SUCCEED=should_succeed) - test_func = FunctionCall(func="run tests", vars=vars) - - # Handle tags. - tags = ["ocsp", f"ocsp-{algo}"] - if "mustStaple" in file_name: - tags.append("ocsp-staple") - - # Create task. - name = file_name.replace(".json", "") - task_name = f"test-ocsp-{server_type}-{name}" - commands = [server_func, bootstrap_func, test_func] - return EvgTask(name=task_name, tags=tags, commands=commands) - - -tasks = [] - -# Create OCSP tasks. -if not os.environ.get("DRIVERS_TOOLS"): - print("Set DRIVERS_TOOLS environment variable!") # noqa: T201 - sys.exit(1) -config = Path(os.environ["DRIVERS_TOOLS"]) / ".evergreen/orchestration/configs/servers" -for path in config.glob("*ocsp*"): - for server_type in ["valid", "revoked", "valid-delegate", "revoked-delegate"]: - task = create_ocsp_task(path.name, server_type) - tasks.append(task) - -# Create build variants. +# Create OCSP build variants. variants = [] # OCSP tests on rhel8 with rotating CPython versions. @@ -174,5 +121,4 @@ def create_ocsp_task(file_name, server_type): # Generate OCSP config. # project = EvgProject(tasks=None, buildvariants=variants) -# write_output(project, "ocsp.yaml") # print(ShrubService.generate_yaml(project)) From e333adbd4f3bcff7b3a0bff1a513f4c4134057d0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Oct 2024 20:30:47 -0500 Subject: [PATCH 04/20] show python name --- .evergreen/config.yml | 48 +++++++++++++-------------- .evergreen/scripts/generate_config.py | 15 +++++---- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 829f881e94..a869d014bc 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2827,10 +2827,10 @@ buildvariants: - "test-5.0-standalone" # OCSP test matrix. -- name: ocsp-test-rhel8-v4.0 +- name: ocsp-test-rhel8-py3.9-v4.0 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v4.0 + display_name: OCSP test RHEL8 py3.9 v4.0 run_on: - rhel87-small batchtime: 20160 @@ -2840,10 +2840,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-rhel8-v4.4 +- name: ocsp-test-rhel8-py3.10-v4.4 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v4.4 + display_name: OCSP test RHEL8 py3.10 v4.4 run_on: - rhel87-small batchtime: 20160 @@ -2853,10 +2853,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.10/bin/python3 -- name: ocsp-test-rhel8-v5.0 +- name: ocsp-test-rhel8-py3.11-v5.0 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v5.0 + display_name: OCSP test RHEL8 py3.11 v5.0 run_on: - rhel87-small batchtime: 20160 @@ -2866,10 +2866,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.11/bin/python3 -- name: ocsp-test-rhel8-v6.0 +- name: ocsp-test-rhel8-py3.12-v6.0 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v6.0 + display_name: OCSP test RHEL8 py3.12 v6.0 run_on: - rhel87-small batchtime: 20160 @@ -2879,10 +2879,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.12/bin/python3 -- name: ocsp-test-rhel8-v7.0 +- name: ocsp-test-rhel8-py3.13-v7.0 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v7.0 + display_name: OCSP test RHEL8 py3.13 v7.0 run_on: - rhel87-small batchtime: 20160 @@ -2892,10 +2892,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.13/bin/python3 -- name: ocsp-test-rhel8-v8.0 +- name: ocsp-test-rhel8-pypy3.9-v8.0 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v8.0 + display_name: OCSP test RHEL8 pypy3.9 v8.0 run_on: - rhel87-small batchtime: 20160 @@ -2905,10 +2905,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 -- name: ocsp-test-rhel8-rapid +- name: ocsp-test-rhel8-pypy3.10-rapid tasks: - name: .ocsp - display_name: OCSP test RHEL8 rapid + display_name: OCSP test RHEL8 pypy3.10 rapid run_on: - rhel87-small batchtime: 20160 @@ -2918,10 +2918,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 -- name: ocsp-test-rhel8-latest +- name: ocsp-test-rhel8-py3.9-latest tasks: - name: .ocsp - display_name: OCSP test RHEL8 latest + display_name: OCSP test RHEL8 py3.9 latest run_on: - rhel87-small batchtime: 20160 @@ -2931,10 +2931,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-win64-v4.4 +- name: ocsp-test-win64-py3.9-v4.4 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 v4.4 + display_name: OCSP test Win64 py3.9 v4.4 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2944,10 +2944,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-win64-v8.0 +- name: ocsp-test-win64-py3.9-v8.0 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 v8.0 + display_name: OCSP test Win64 py3.9 v8.0 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2957,10 +2957,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-macos-v4.4 +- name: ocsp-test-macos-py3.9-v4.4 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v4.4 + display_name: OCSP test macOS py3.9 v4.4 run_on: - macos-14 batchtime: 20160 @@ -2970,10 +2970,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 -- name: ocsp-test-macos-v8.0 +- name: ocsp-test-macos-py3.9-v8.0 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v8.0 + display_name: OCSP test macOS py3.9 v8.0 run_on: - macos-14 batchtime: 20160 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 8ce48790ab..7801fe0fff 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -12,7 +12,9 @@ from itertools import product from shrub.v3.evg_build_variant import BuildVariant +from shrub.v3.evg_project import EvgProject from shrub.v3.evg_task import EvgTaskRef +from shrub.v3.shrub_service import ShrubService # Top level variables. ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] @@ -89,9 +91,9 @@ def get_python_binary(python, host): python = ALL_PYTHONS[len(variants) % len(ALL_PYTHONS)] host = "rhel8" if version in ["rapid", "latest"]: - display_name = f"OCSP test RHEL8 {version}" + display_name = f"OCSP test RHEL8 {python} {version}" else: - display_name = f"OCSP test RHEL8 v{version}" + display_name = f"OCSP test RHEL8 {python} v{version}" variant = create_variant( [".ocsp"], display_name, @@ -108,11 +110,12 @@ def get_python_binary(python, host): task_names = [".ocsp-rsa !.ocsp-staple"] expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") batchtime = BATCHTIME_WEEK * 2 - display_name = f"OCSP test {host} v{version}" + python = CPYTHONS[0] + display_name = f"OCSP test {host} {python} v{version}" variant = create_variant( task_names, display_name, - python=CPYTHONS[0], + python=python, host=host, expansions=expansions, batchtime=batchtime, @@ -120,5 +123,5 @@ def get_python_binary(python, host): variants.append(variant) # Generate OCSP config. -# project = EvgProject(tasks=None, buildvariants=variants) -# print(ShrubService.generate_yaml(project)) +project = EvgProject(tasks=None, buildvariants=variants) +print(ShrubService.generate_yaml(project)) # noqa: T201 From 4670f240204e6546cf45127bd699af9cdfb8ba50 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Oct 2024 20:35:23 -0500 Subject: [PATCH 05/20] update display --- .evergreen/config.yml | 48 +++++++++++++-------------- .evergreen/scripts/generate_config.py | 6 ++-- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index a869d014bc..2d2959e2e4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2827,10 +2827,10 @@ buildvariants: - "test-5.0-standalone" # OCSP test matrix. -- name: ocsp-test-rhel8-py3.9-v4.0 +- name: ocsp-test-rhel8-v4.0-py3.9 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.9 v4.0 + display_name: OCSP test RHEL8 v4.0 py3.9 run_on: - rhel87-small batchtime: 20160 @@ -2840,10 +2840,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-rhel8-py3.10-v4.4 +- name: ocsp-test-rhel8-v4.4-py3.10 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.10 v4.4 + display_name: OCSP test RHEL8 v4.4 py3.10 run_on: - rhel87-small batchtime: 20160 @@ -2853,10 +2853,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.10/bin/python3 -- name: ocsp-test-rhel8-py3.11-v5.0 +- name: ocsp-test-rhel8-v5.0-py3.11 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.11 v5.0 + display_name: OCSP test RHEL8 v5.0 py3.11 run_on: - rhel87-small batchtime: 20160 @@ -2866,10 +2866,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.11/bin/python3 -- name: ocsp-test-rhel8-py3.12-v6.0 +- name: ocsp-test-rhel8-v6.0-py3.12 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.12 v6.0 + display_name: OCSP test RHEL8 v6.0 py3.12 run_on: - rhel87-small batchtime: 20160 @@ -2879,10 +2879,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.12/bin/python3 -- name: ocsp-test-rhel8-py3.13-v7.0 +- name: ocsp-test-rhel8-v7.0-py3.13 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.13 v7.0 + display_name: OCSP test RHEL8 v7.0 py3.13 run_on: - rhel87-small batchtime: 20160 @@ -2892,10 +2892,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.13/bin/python3 -- name: ocsp-test-rhel8-pypy3.9-v8.0 +- name: ocsp-test-rhel8-v8.0-pypy3.9 tasks: - name: .ocsp - display_name: OCSP test RHEL8 pypy3.9 v8.0 + display_name: OCSP test RHEL8 v8.0 pypy3.9 run_on: - rhel87-small batchtime: 20160 @@ -2905,10 +2905,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 -- name: ocsp-test-rhel8-pypy3.10-rapid +- name: ocsp-test-rhel8-rapid-pypy3.10 tasks: - name: .ocsp - display_name: OCSP test RHEL8 pypy3.10 rapid + display_name: OCSP test RHEL8 rapid pypy3.10 run_on: - rhel87-small batchtime: 20160 @@ -2918,10 +2918,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 -- name: ocsp-test-rhel8-py3.9-latest +- name: ocsp-test-rhel8-latest-py3.9 tasks: - name: .ocsp - display_name: OCSP test RHEL8 py3.9 latest + display_name: OCSP test RHEL8 latest py3.9 run_on: - rhel87-small batchtime: 20160 @@ -2931,10 +2931,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-win64-py3.9-v4.4 +- name: ocsp-test-win64-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 py3.9 v4.4 + display_name: OCSP test Win64 v4.4 py3.9 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2944,10 +2944,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-win64-py3.9-v8.0 +- name: ocsp-test-win64-v8.0-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 py3.9 v8.0 + display_name: OCSP test Win64 v8.0 py3.9 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2957,10 +2957,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-macos-py3.9-v4.4 +- name: ocsp-test-macos-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS py3.9 v4.4 + display_name: OCSP test macOS v4.4 py3.9 run_on: - macos-14 batchtime: 20160 @@ -2970,10 +2970,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 -- name: ocsp-test-macos-py3.9-v8.0 +- name: ocsp-test-macos-v8.0-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS py3.9 v8.0 + display_name: OCSP test macOS v8.0 py3.9 run_on: - macos-14 batchtime: 20160 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 7801fe0fff..aaf5dd6447 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -91,9 +91,9 @@ def get_python_binary(python, host): python = ALL_PYTHONS[len(variants) % len(ALL_PYTHONS)] host = "rhel8" if version in ["rapid", "latest"]: - display_name = f"OCSP test RHEL8 {python} {version}" + display_name = f"OCSP test RHEL8 {version} {python}" else: - display_name = f"OCSP test RHEL8 {python} v{version}" + display_name = f"OCSP test RHEL8 v{version} {python}" variant = create_variant( [".ocsp"], display_name, @@ -111,7 +111,7 @@ def get_python_binary(python, host): expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") batchtime = BATCHTIME_WEEK * 2 python = CPYTHONS[0] - display_name = f"OCSP test {host} {python} v{version}" + display_name = f"OCSP test {host} v{version} {python}" variant = create_variant( task_names, display_name, From 07e030b7352e466e1b14b59f435295451fcb2a5d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 05:15:49 -0500 Subject: [PATCH 06/20] update matrix --- .evergreen/config.yml | 79 +++++++++++---------------- .evergreen/scripts/generate_config.py | 10 +++- 2 files changed, 41 insertions(+), 48 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 2d2959e2e4..8cd2e38c79 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2827,23 +2827,10 @@ buildvariants: - "test-5.0-standalone" # OCSP test matrix. -- name: ocsp-test-rhel8-v4.0-py3.9 +- name: ocsp-test-rhel8-v4.4-py3.9 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v4.0 py3.9 - run_on: - - rhel87-small - batchtime: 20160 - expansions: - VERSION: "4.0" - AUTH: noauth - SSL: ssl - TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-rhel8-v4.4-py3.10 - tasks: - - name: .ocsp - display_name: OCSP test RHEL8 v4.4 py3.10 + display_name: OCSP test RHEL8 v4.4 py3.9 run_on: - rhel87-small batchtime: 20160 @@ -2852,11 +2839,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.10/bin/python3 -- name: ocsp-test-rhel8-v5.0-py3.11 + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: ocsp-test-rhel8-v5.0-py3.10 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v5.0 py3.11 + display_name: OCSP test RHEL8 v5.0 py3.10 run_on: - rhel87-small batchtime: 20160 @@ -2865,11 +2852,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.11/bin/python3 -- name: ocsp-test-rhel8-v6.0-py3.12 + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: ocsp-test-rhel8-v6.0-py3.11 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v6.0 py3.12 + display_name: OCSP test RHEL8 v6.0 py3.11 run_on: - rhel87-small batchtime: 20160 @@ -2878,11 +2865,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.12/bin/python3 -- name: ocsp-test-rhel8-v7.0-py3.13 + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: ocsp-test-rhel8-v7.0-py3.12 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v7.0 py3.13 + display_name: OCSP test RHEL8 v7.0 py3.12 run_on: - rhel87-small batchtime: 20160 @@ -2891,11 +2878,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.13/bin/python3 -- name: ocsp-test-rhel8-v8.0-pypy3.9 + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: ocsp-test-rhel8-v8.0-py3.13 tasks: - name: .ocsp - display_name: OCSP test RHEL8 v8.0 pypy3.9 + display_name: OCSP test RHEL8 v8.0 py3.13 run_on: - rhel87-small batchtime: 20160 @@ -2904,11 +2891,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 -- name: ocsp-test-rhel8-rapid-pypy3.10 + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: ocsp-test-rhel8-rapid-pypy3.9 tasks: - name: .ocsp - display_name: OCSP test RHEL8 rapid pypy3.10 + display_name: OCSP test RHEL8 rapid pypy3.9 run_on: - rhel87-small batchtime: 20160 @@ -2917,11 +2904,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 -- name: ocsp-test-rhel8-latest-py3.9 + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: ocsp-test-rhel8-latest-pypy3.10 tasks: - name: .ocsp - display_name: OCSP test RHEL8 latest py3.9 + display_name: OCSP test RHEL8 latest pypy3.10 run_on: - rhel87-small batchtime: 20160 @@ -2930,11 +2917,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.9/bin/python3 -- name: ocsp-test-win64-v4.4-py3.9 + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 +- name: ocsp-test-win64-v4.4-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 v4.4 py3.9 + display_name: OCSP test Win64 v4.4 py3.13 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2943,11 +2930,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-win64-v8.0-py3.9 + PYTHON_BINARY: C:/python/Python313/python.exe +- name: ocsp-test-win64-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 v8.0 py3.9 + display_name: OCSP test Win64 v8.0 py3.13 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2956,11 +2943,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: C:/python/Python39/python.exe -- name: ocsp-test-macos-v4.4-py3.9 + PYTHON_BINARY: C:/python/Python313/python.exe +- name: ocsp-test-macos-v4.4-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v4.4 py3.9 + display_name: OCSP test macOS v4.4 py3.13 run_on: - macos-14 batchtime: 20160 @@ -2969,11 +2956,11 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 -- name: ocsp-test-macos-v8.0-py3.9 + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: ocsp-test-macos-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v8.0 py3.9 + display_name: OCSP test macOS v8.0 py3.13 run_on: - macos-14 batchtime: 20160 @@ -2982,7 +2969,7 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 - matrix_name: "oidc-auth-test" matrix_spec: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index aaf5dd6447..e72c39ed1e 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -85,6 +85,9 @@ def get_python_binary(python, host): # OCSP tests on rhel8 with rotating CPython versions. for version in ALL_VERSIONS: + # OCSP is not supported until v4.4. + if version == "4.0": + continue task_refs = [EvgTaskRef(name=".ocsp")] expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") batchtime = BATCHTIME_WEEK * 2 @@ -104,13 +107,16 @@ def get_python_binary(python, host): ) variants.append(variant) -# OCSP tests on Windows and MacOS with lowest CPython version. +# OCSP tests on Windows and MacOS. for host, version in product(["Win64", "macOS"], ["4.4", "8.0"]): # MongoDB servers do not staple OCSP responses and only support RSA. task_names = [".ocsp-rsa !.ocsp-staple"] expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") batchtime = BATCHTIME_WEEK * 2 - python = CPYTHONS[0] + if version == 4.4: + python = CPYTHONS[0] + else: + python = CPYTHONS[-1] display_name = f"OCSP test {host} v{version} {python}" variant = create_variant( task_names, From 6bca10ff20618c95ce66fd2cf909c22da6fb45f7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 05:18:31 -0500 Subject: [PATCH 07/20] update pythons --- .evergreen/scripts/generate_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index e72c39ed1e..7314871b40 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -113,7 +113,7 @@ def get_python_binary(python, host): task_names = [".ocsp-rsa !.ocsp-staple"] expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") batchtime = BATCHTIME_WEEK * 2 - if version == 4.4: + if version == "4.4": python = CPYTHONS[0] else: python = CPYTHONS[-1] From ebfe20a92edb96d426e826b205a8787cc730d860 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 05:20:11 -0500 Subject: [PATCH 08/20] update pythons --- .evergreen/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 8cd2e38c79..3189c06ba7 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2918,10 +2918,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 -- name: ocsp-test-win64-v4.4-py3.13 +- name: ocsp-test-win64-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test Win64 v4.4 py3.13 + display_name: OCSP test Win64 v4.4 py3.9 run_on: - windows-64-vsMulti-small batchtime: 20160 @@ -2930,7 +2930,7 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: C:/python/Python313/python.exe + PYTHON_BINARY: C:/python/Python39/python.exe - name: ocsp-test-win64-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple @@ -2944,10 +2944,10 @@ buildvariants: SSL: ssl TOPOLOGY: server PYTHON_BINARY: C:/python/Python313/python.exe -- name: ocsp-test-macos-v4.4-py3.13 +- name: ocsp-test-macos-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v4.4 py3.13 + display_name: OCSP test macOS v4.4 py3.9 run_on: - macos-14 batchtime: 20160 @@ -2956,7 +2956,7 @@ buildvariants: AUTH: noauth SSL: ssl TOPOLOGY: server - PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - name: ocsp-test-macos-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple From 301db6a9d6267d8e38d041459387f2ee87f46272 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 05:56:09 -0500 Subject: [PATCH 09/20] cleanup --- .evergreen/config.yml | 37 ++---- .evergreen/scripts/generate_config.py | 168 ++++++++++++++++---------- 2 files changed, 116 insertions(+), 89 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 3189c06ba7..152dacd443 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2827,19 +2827,6 @@ buildvariants: - "test-5.0-standalone" # OCSP test matrix. -- name: ocsp-test-rhel8-v4.4-py3.9 - tasks: - - name: .ocsp - display_name: OCSP test RHEL8 v4.4 py3.9 - run_on: - - rhel87-small - batchtime: 20160 - expansions: - VERSION: "4.4" - AUTH: noauth - SSL: ssl - TOPOLOGY: server - PYTHON_BINARY: /opt/python/3.9/bin/python3 - name: ocsp-test-rhel8-v5.0-py3.10 tasks: - name: .ocsp @@ -2848,10 +2835,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: "5.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "5.0" PYTHON_BINARY: /opt/python/3.10/bin/python3 - name: ocsp-test-rhel8-v6.0-py3.11 tasks: @@ -2861,10 +2848,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: "6.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "6.0" PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: ocsp-test-rhel8-v7.0-py3.12 tasks: @@ -2874,10 +2861,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: "7.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "7.0" PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: ocsp-test-rhel8-v8.0-py3.13 tasks: @@ -2887,10 +2874,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: "8.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "8.0" PYTHON_BINARY: /opt/python/3.13/bin/python3 - name: ocsp-test-rhel8-rapid-pypy3.9 tasks: @@ -2900,10 +2887,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: rapid AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: rapid PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - name: ocsp-test-rhel8-latest-pypy3.10 tasks: @@ -2913,10 +2900,10 @@ buildvariants: - rhel87-small batchtime: 20160 expansions: - VERSION: latest AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: latest PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - name: ocsp-test-win64-v4.4-py3.9 tasks: @@ -2926,10 +2913,10 @@ buildvariants: - windows-64-vsMulti-small batchtime: 20160 expansions: - VERSION: "4.4" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "4.4" PYTHON_BINARY: C:/python/Python39/python.exe - name: ocsp-test-win64-v8.0-py3.13 tasks: @@ -2939,36 +2926,36 @@ buildvariants: - windows-64-vsMulti-small batchtime: 20160 expansions: - VERSION: "8.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "8.0" PYTHON_BINARY: C:/python/Python313/python.exe - name: ocsp-test-macos-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v4.4 py3.9 + display_name: OCSP test MacOS v4.4 py3.9 run_on: - macos-14 batchtime: 20160 expansions: - VERSION: "4.4" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "4.4" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - name: ocsp-test-macos-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test macOS v8.0 py3.13 + display_name: OCSP test MacOS v8.0 py3.13 run_on: - macos-14 batchtime: 20160 expansions: - VERSION: "8.0" AUTH: noauth SSL: ssl TOPOLOGY: server + VERSION: "8.0" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 - matrix_name: "oidc-auth-test" diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 7314871b40..7da0e3c4c4 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -9,7 +9,9 @@ # Note: Run this file with `hatch run`, `pipx run`, or `uv run`. from __future__ import annotations -from itertools import product +from dataclasses import dataclass +from itertools import product, zip_longest +from typing import Any from shrub.v3.evg_build_variant import BuildVariant from shrub.v3.evg_project import EvgProject @@ -18,7 +20,7 @@ # Top level variables. ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] -CPYTHONS = ["py3.9", "py3.10", "py3.11", "py3.12", "py3.13"] +CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] PYPYS = ["pypy3.9", "pypy3.10"] ALL_PYTHONS = CPYTHONS + PYPYS ALL_WIN_PYTHONS = CPYTHONS.copy() @@ -29,16 +31,35 @@ TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"] C_EXTS = ["without c extensions", "with c extensions"] BATCHTIME_WEEK = 10080 -HOSTS = dict(rhel8="rhel87-small", Win64="windows-64-vsMulti-small", macOS="macos-14") +HOSTS = dict() + + +@dataclass +class Host: + name: str + run_on: str + display_name: str + + +HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8") +HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64") +HOSTS["macos"] = Host("macos", "macos-14", "MacOS") # Helper functions. -def create_variant(task_names, display_name, *, python=None, host=None, **kwargs): +def create_variant( + task_names: list[str], + display_name: str, + *, + python: str | None = None, + host: str | None = None, + **kwargs: Any, +) -> BuildVariant: task_refs = [EvgTaskRef(name=n) for n in task_names] kwargs.setdefault("expansions", dict()) expansions = kwargs.pop("expansions") host = host or "rhel8" - run_on = [HOSTS[host]] + run_on = [HOSTS[host].run_on] name = display_name.replace(" ", "-").lower() if python: expansions["PYTHON_BINARY"] = get_python_binary(python, host) @@ -53,81 +74,100 @@ def create_variant(task_names, display_name, *, python=None, host=None, **kwargs ) -def get_python_binary(python, host): - if host.lower() == "win64": +def get_python_binary(python: str, host: str) -> str: + if host == "win64": is_32 = python.startswith("32-bit") if is_32: _, python = python.split() - base = "C:/python/32/" + base = "C:/python/32" else: - base = "C:/python/" - middle = python.replace("py", "Python").replace(".", "") - return base + middle + "/python.exe" + base = "C:/python" + python = python.replace(".", "") + return f"{base}/Python{python}/python.exe" + + if host == "rhel8": + return f"/opt/python/{python}/bin/python3" - if host.lower() == "rhel8": - if python.startswith("pypy"): - return f"/opt/python/{python}/bin/python3" - return f"/opt/python/{python[2:]}/bin/python3" + if host == "macos": + return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/python3" - if host.lower() == "macos": - ver = python.replace("py", "") - return f"/Library/Frameworks/Python.Framework/Versions/{ver}/bin/python3" + raise ValueError(f"no match found for python {python} on {host}") - raise ValueError(f"no match found for {python} on {host}") + +def get_display(base: str, host: str, version: str, python: str) -> str: + if version not in ["rapid", "latest"]: + version = f"v{version}" + if not python.startswith("pypy"): + python = f"py{python}" + return f"{base} {HOSTS[host].display_name} {version} {python}" + + +def get_pairs(versions: list[str], pythons: list[str]) -> str: + values = [] + for version, python in zip_longest(versions, pythons): + if version is None: + values.append((versions[0], python)) + elif python is None: + values.append((version, pythons[0])) + else: + values.append((version, python)) + return values ############## # OCSP ############## + # Create OCSP build variants. -variants = [] - -# OCSP tests on rhel8 with rotating CPython versions. -for version in ALL_VERSIONS: - # OCSP is not supported until v4.4. - if version == "4.0": - continue - task_refs = [EvgTaskRef(name=".ocsp")] - expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") +def create_ocsp_variants() -> list[BuildVariant]: + variants = [] batchtime = BATCHTIME_WEEK * 2 - python = ALL_PYTHONS[len(variants) % len(ALL_PYTHONS)] - host = "rhel8" - if version in ["rapid", "latest"]: - display_name = f"OCSP test RHEL8 {version} {python}" - else: - display_name = f"OCSP test RHEL8 v{version} {python}" - variant = create_variant( - [".ocsp"], - display_name, - python=python, - batchtime=batchtime, - host=host, - expansions=expansions, - ) - variants.append(variant) + base_expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") + base_display = "OCSP test" + + # OCSP tests on rhel8 with all server and python versions. + versions = [v for v in ALL_VERSIONS if v != "4.4"] + for version, python in get_pairs(versions, ALL_PYTHONS): + # OCSP is not supported until v4.4. + if version == "4.0": + continue + expansions = base_expansions.copy() + expansions["VERSION"] = version + host = "rhel8" + variant = create_variant( + [".ocsp"], + get_display(base_display, host, version, python), + python=python, + batchtime=batchtime, + host=host, + expansions=expansions, + ) + variants.append(variant) + + # OCSP tests on Windows and MacOS. + for host, version in product(["win64", "macos"], ["4.4", "8.0"]): + # MongoDB servers do not staple OCSP responses and only support RSA. + task_names = [".ocsp-rsa !.ocsp-staple"] + expansions = base_expansions.copy() + expansions["VERSION"] = version + if version == "4.4": + python = CPYTHONS[0] + else: + python = CPYTHONS[-1] + variant = create_variant( + task_names, + get_display(base_display, host, version, python), + python=python, + host=host, + expansions=expansions, + batchtime=batchtime, + ) + variants.append(variant) + + return variants -# OCSP tests on Windows and MacOS. -for host, version in product(["Win64", "macOS"], ["4.4", "8.0"]): - # MongoDB servers do not staple OCSP responses and only support RSA. - task_names = [".ocsp-rsa !.ocsp-staple"] - expansions = dict(VERSION=version, AUTH="noauth", SSL="ssl", TOPOLOGY="server") - batchtime = BATCHTIME_WEEK * 2 - if version == "4.4": - python = CPYTHONS[0] - else: - python = CPYTHONS[-1] - display_name = f"OCSP test {host} v{version} {python}" - variant = create_variant( - task_names, - display_name, - python=python, - host=host, - expansions=expansions, - batchtime=batchtime, - ) - variants.append(variant) # Generate OCSP config. -project = EvgProject(tasks=None, buildvariants=variants) +project = EvgProject(tasks=None, buildvariants=create_ocsp_variants()) print(ShrubService.generate_yaml(project)) # noqa: T201 From af8fc1f1245b2da0b6aa086dbdfe0c31f062041e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:00:02 -0500 Subject: [PATCH 10/20] update display name --- .evergreen/config.yml | 4 ++-- .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 152dacd443..b0b62a4426 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2934,7 +2934,7 @@ buildvariants: - name: ocsp-test-macos-v4.4-py3.9 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test MacOS v4.4 py3.9 + display_name: OCSP test macOS v4.4 py3.9 run_on: - macos-14 batchtime: 20160 @@ -2947,7 +2947,7 @@ buildvariants: - name: ocsp-test-macos-v8.0-py3.13 tasks: - name: .ocsp-rsa !.ocsp-staple - display_name: OCSP test MacOS v8.0 py3.13 + display_name: OCSP test macOS v8.0 py3.13 run_on: - macos-14 batchtime: 20160 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 7da0e3c4c4..c540330820 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -43,7 +43,7 @@ class Host: HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8") HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64") -HOSTS["macos"] = Host("macos", "macos-14", "MacOS") +HOSTS["macos"] = Host("macos", "macos-14", "macOS") # Helper functions. From 3c408dac11c5878d1ce9183b7f0d5096d98263e8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:06:41 -0500 Subject: [PATCH 11/20] cleanup --- .evergreen/scripts/generate_config.py | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index c540330820..d0f7db348c 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -23,13 +23,6 @@ CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] PYPYS = ["pypy3.9", "pypy3.10"] ALL_PYTHONS = CPYTHONS + PYPYS -ALL_WIN_PYTHONS = CPYTHONS.copy() -ALL_WIN_PYTHONS = ALL_WIN_PYTHONS + [f"32-bit {p}" for p in ALL_WIN_PYTHONS] -AUTHS = ["noauth", "auth"] -SSLS = ["nossl", "ssl"] -AUTH_SSLS = list(product(AUTHS, SSLS)) -TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"] -C_EXTS = ["without c extensions", "with c extensions"] BATCHTIME_WEEK = 10080 HOSTS = dict() @@ -55,6 +48,7 @@ def create_variant( host: str | None = None, **kwargs: Any, ) -> BuildVariant: + """Create a build variant for the given inputs.""" task_refs = [EvgTaskRef(name=n) for n in task_names] kwargs.setdefault("expansions", dict()) expansions = kwargs.pop("expansions") @@ -75,6 +69,7 @@ def create_variant( def get_python_binary(python: str, host: str) -> str: + """Get the appropriate python binary given a python version and host""" if host == "win64": is_32 = python.startswith("32-bit") if is_32: @@ -94,7 +89,8 @@ def get_python_binary(python: str, host: str) -> str: raise ValueError(f"no match found for python {python} on {host}") -def get_display(base: str, host: str, version: str, python: str) -> str: +def get_display_name(base: str, host: str, version: str, python: str) -> str: + """Get the display name of a variant.""" if version not in ["rapid", "latest"]: version = f"v{version}" if not python.startswith("pypy"): @@ -103,12 +99,18 @@ def get_display(base: str, host: str, version: str, python: str) -> str: def get_pairs(versions: list[str], pythons: list[str]) -> str: + """Get pairs of versions and pythons, ensuring that we hit all of each. + The shorter list will repeat until the full length of the longer list. + """ values = [] + i = 0 for version, python in zip_longest(versions, pythons): if version is None: - values.append((versions[0], python)) + values.append((versions[i % len(versions)], python)) + i += 1 elif python is None: - values.append((version, pythons[0])) + values.append((version, pythons[i % len(pythons)])) + i += 1 else: values.append((version, python)) return values @@ -137,7 +139,7 @@ def create_ocsp_variants() -> list[BuildVariant]: host = "rhel8" variant = create_variant( [".ocsp"], - get_display(base_display, host, version, python), + get_display_name(base_display, host, version, python), python=python, batchtime=batchtime, host=host, @@ -146,9 +148,8 @@ def create_ocsp_variants() -> list[BuildVariant]: variants.append(variant) # OCSP tests on Windows and MacOS. + # MongoDB servers on these hosts do not staple OCSP responses and only support RSA. for host, version in product(["win64", "macos"], ["4.4", "8.0"]): - # MongoDB servers do not staple OCSP responses and only support RSA. - task_names = [".ocsp-rsa !.ocsp-staple"] expansions = base_expansions.copy() expansions["VERSION"] = version if version == "4.4": @@ -156,8 +157,8 @@ def create_ocsp_variants() -> list[BuildVariant]: else: python = CPYTHONS[-1] variant = create_variant( - task_names, - get_display(base_display, host, version, python), + [".ocsp-rsa !.ocsp-staple"], + get_display_name(base_display, host, version, python), python=python, host=host, expansions=expansions, From 04f7c627ee179dcd20ebb50b960e0a95d212ec70 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:08:22 -0500 Subject: [PATCH 12/20] cleanup --- .evergreen/config.yml | 13 +++++++++++++ .evergreen/scripts/generate_config.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b0b62a4426..dee4b608ec 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2827,6 +2827,19 @@ buildvariants: - "test-5.0-standalone" # OCSP test matrix. +- name: ocsp-test-rhel8-v4.4-py3.9 + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 v4.4 py3.9 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + AUTH: noauth + SSL: ssl + TOPOLOGY: server + VERSION: "4.4" + PYTHON_BINARY: /opt/python/3.9/bin/python3 - name: ocsp-test-rhel8-v5.0-py3.10 tasks: - name: .ocsp diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index d0f7db348c..ca730e0347 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -129,7 +129,7 @@ def create_ocsp_variants() -> list[BuildVariant]: base_display = "OCSP test" # OCSP tests on rhel8 with all server and python versions. - versions = [v for v in ALL_VERSIONS if v != "4.4"] + versions = [v for v in ALL_VERSIONS if v != "4.0"] for version, python in get_pairs(versions, ALL_PYTHONS): # OCSP is not supported until v4.4. if version == "4.0": From 5fd4143abef637a3be2556cb3592f33ecc57d6bc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:12:01 -0500 Subject: [PATCH 13/20] cleanup --- .evergreen/scripts/generate_config.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index ca730e0347..4f4cbae6d9 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -128,12 +128,9 @@ def create_ocsp_variants() -> list[BuildVariant]: base_expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") base_display = "OCSP test" - # OCSP tests on rhel8 with all server and python versions. + # OCSP tests on rhel8 with all server v4.4+ and python versions. versions = [v for v in ALL_VERSIONS if v != "4.0"] for version, python in get_pairs(versions, ALL_PYTHONS): - # OCSP is not supported until v4.4. - if version == "4.0": - continue expansions = base_expansions.copy() expansions["VERSION"] = version host = "rhel8" From 64d8e936d734af5e909d289ee60c12a7f1058d9f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:28:45 -0500 Subject: [PATCH 14/20] generalize the zip function --- .evergreen/scripts/generate_config.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4f4cbae6d9..eb1aa6a2c1 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -10,7 +10,7 @@ from __future__ import annotations from dataclasses import dataclass -from itertools import product, zip_longest +from itertools import cycle, product, zip_longest from typing import Any from shrub.v3.evg_build_variant import BuildVariant @@ -69,7 +69,7 @@ def create_variant( def get_python_binary(python: str, host: str) -> str: - """Get the appropriate python binary given a python version and host""" + """Get the appropriate python binary given a python version and host.""" if host == "win64": is_32 = python.startswith("32-bit") if is_32: @@ -98,22 +98,11 @@ def get_display_name(base: str, host: str, version: str, python: str) -> str: return f"{base} {HOSTS[host].display_name} {version} {python}" -def get_pairs(versions: list[str], pythons: list[str]) -> str: - """Get pairs of versions and pythons, ensuring that we hit all of each. - The shorter list will repeat until the full length of the longer list. - """ - values = [] - i = 0 - for version, python in zip_longest(versions, pythons): - if version is None: - values.append((versions[i % len(versions)], python)) - i += 1 - elif python is None: - values.append((version, pythons[i % len(pythons)])) - i += 1 - else: - values.append((version, python)) - return values +def zip_cycle(*iterables, empty_default=None): + """Get all combinations of the inputs, cycling over the shorter list(s).""" + cycles = [cycle(i) for i in iterables] + for _ in zip_longest(*iterables): + yield tuple(next(i, empty_default) for i in cycles) ############## @@ -130,7 +119,7 @@ def create_ocsp_variants() -> list[BuildVariant]: # OCSP tests on rhel8 with all server v4.4+ and python versions. versions = [v for v in ALL_VERSIONS if v != "4.0"] - for version, python in get_pairs(versions, ALL_PYTHONS): + for version, python in zip_cycle(versions, ALL_PYTHONS): expansions = base_expansions.copy() expansions["VERSION"] = version host = "rhel8" From d91759db7efa1c1219839fe718ed9db4a1deb518 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:37:07 -0500 Subject: [PATCH 15/20] cleanup --- .evergreen/scripts/generate_config.py | 39 +++++++++++++++------------ 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index eb1aa6a2c1..a8d6a71f08 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -18,7 +18,10 @@ from shrub.v3.evg_task import EvgTaskRef from shrub.v3.shrub_service import ShrubService -# Top level variables. +############## +# Globals +############## + ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] PYPYS = ["pypy3.9", "pypy3.10"] @@ -39,24 +42,31 @@ class Host: HOSTS["macos"] = Host("macos", "macos-14", "macOS") -# Helper functions. +############## +# Helpers +############## + + def create_variant( task_names: list[str], display_name: str, *, python: str | None = None, + version: str | None = None, host: str | None = None, **kwargs: Any, ) -> BuildVariant: """Create a build variant for the given inputs.""" task_refs = [EvgTaskRef(name=n) for n in task_names] kwargs.setdefault("expansions", dict()) - expansions = kwargs.pop("expansions") + expansions = kwargs.pop("expansions", dict()).copy() host = host or "rhel8" run_on = [HOSTS[host].run_on] name = display_name.replace(" ", "-").lower() if python: expansions["PYTHON_BINARY"] = get_python_binary(python, host) + if version: + expansions["VERSION"] = version expansions = expansions or None return BuildVariant( name=name, @@ -106,27 +116,25 @@ def zip_cycle(*iterables, empty_default=None): ############## -# OCSP +# Variants ############## -# Create OCSP build variants. def create_ocsp_variants() -> list[BuildVariant]: variants = [] batchtime = BATCHTIME_WEEK * 2 - base_expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") + expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") base_display = "OCSP test" - # OCSP tests on rhel8 with all server v4.4+ and python versions. + # OCSP tests on rhel8 with all server v4.4+ and all python versions. versions = [v for v in ALL_VERSIONS if v != "4.0"] for version, python in zip_cycle(versions, ALL_PYTHONS): - expansions = base_expansions.copy() - expansions["VERSION"] = version host = "rhel8" variant = create_variant( [".ocsp"], get_display_name(base_display, host, version, python), python=python, + version=version, batchtime=batchtime, host=host, expansions=expansions, @@ -136,16 +144,10 @@ def create_ocsp_variants() -> list[BuildVariant]: # OCSP tests on Windows and MacOS. # MongoDB servers on these hosts do not staple OCSP responses and only support RSA. for host, version in product(["win64", "macos"], ["4.4", "8.0"]): - expansions = base_expansions.copy() - expansions["VERSION"] = version - if version == "4.4": - python = CPYTHONS[0] - else: - python = CPYTHONS[-1] variant = create_variant( [".ocsp-rsa !.ocsp-staple"], get_display_name(base_display, host, version, python), - python=python, + python=CPYTHONS[0] if version == "4.4" else CPYTHONS[-1], host=host, expansions=expansions, batchtime=batchtime, @@ -155,6 +157,9 @@ def create_ocsp_variants() -> list[BuildVariant]: return variants -# Generate OCSP config. +################## +# Generate Config +################## + project = EvgProject(tasks=None, buildvariants=create_ocsp_variants()) print(ShrubService.generate_yaml(project)) # noqa: T201 From 08bb6bee39e2e596f1005fcec7c66b1669c5abc7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:37:38 -0500 Subject: [PATCH 16/20] cleanup --- .evergreen/scripts/generate_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index a8d6a71f08..9aae819003 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -148,6 +148,7 @@ def create_ocsp_variants() -> list[BuildVariant]: [".ocsp-rsa !.ocsp-staple"], get_display_name(base_display, host, version, python), python=CPYTHONS[0] if version == "4.4" else CPYTHONS[-1], + version=version, host=host, expansions=expansions, batchtime=batchtime, From c03afc7e36df6b9e5991331243573365071681fd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:38:34 -0500 Subject: [PATCH 17/20] cleanup --- .evergreen/scripts/generate_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 9aae819003..eadf024dba 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -126,7 +126,7 @@ def create_ocsp_variants() -> list[BuildVariant]: expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") base_display = "OCSP test" - # OCSP tests on rhel8 with all server v4.4+ and all python versions. + # OCSP tests on rhel8 with all servers v4.4+ and all python versions. versions = [v for v in ALL_VERSIONS if v != "4.0"] for version, python in zip_cycle(versions, ALL_PYTHONS): host = "rhel8" From befdc19350623c615b8403660434eeb6d2d942a3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:39:43 -0500 Subject: [PATCH 18/20] cleanup --- .evergreen/scripts/generate_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index eadf024dba..b311e6c6a3 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -144,10 +144,11 @@ def create_ocsp_variants() -> list[BuildVariant]: # OCSP tests on Windows and MacOS. # MongoDB servers on these hosts do not staple OCSP responses and only support RSA. for host, version in product(["win64", "macos"], ["4.4", "8.0"]): + python = (CPYTHONS[0] if version == "4.4" else CPYTHONS[-1],) variant = create_variant( [".ocsp-rsa !.ocsp-staple"], get_display_name(base_display, host, version, python), - python=CPYTHONS[0] if version == "4.4" else CPYTHONS[-1], + python=python, version=version, host=host, expansions=expansions, From 9b7a2a75b3cfbdbff724b529e1c407f4762344e8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:39:56 -0500 Subject: [PATCH 19/20] cleanup --- .evergreen/scripts/generate_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index b311e6c6a3..6fdf915812 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -144,7 +144,7 @@ def create_ocsp_variants() -> list[BuildVariant]: # OCSP tests on Windows and MacOS. # MongoDB servers on these hosts do not staple OCSP responses and only support RSA. for host, version in product(["win64", "macos"], ["4.4", "8.0"]): - python = (CPYTHONS[0] if version == "4.4" else CPYTHONS[-1],) + python = CPYTHONS[0] if version == "4.4" else CPYTHONS[-1] variant = create_variant( [".ocsp-rsa !.ocsp-staple"], get_display_name(base_display, host, version, python), From 62e25069103fd918e291fb1a64b9932fa5f143c1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 10 Oct 2024 06:40:49 -0500 Subject: [PATCH 20/20] cleanup --- .evergreen/scripts/generate_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 6fdf915812..e98e527b72 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -135,9 +135,9 @@ def create_ocsp_variants() -> list[BuildVariant]: get_display_name(base_display, host, version, python), python=python, version=version, - batchtime=batchtime, host=host, expansions=expansions, + batchtime=batchtime, ) variants.append(variant)