From 4220abf0fe962adba0fe9087b17ccb5bf52b3e11 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 16 Oct 2024 08:17:27 -0500 Subject: [PATCH 1/5] PYTHON-4872 Use shrub.py to generate encryption tasks --- .evergreen/config.yml | 331 +++++++++++++++++++------- .evergreen/scripts/generate_config.py | 66 ++++- 2 files changed, 305 insertions(+), 92 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index c3427e66d0..70c1282912 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2322,32 +2322,6 @@ axes: variables: COVERAGE: "coverage" - # Run encryption tests? - - id: encryption - display_name: "Encryption" - values: - - id: "encryption" - display_name: "Encryption" - tags: ["encryption_tag"] - variables: - test_encryption: true - batchtime: 10080 # 7 days - - id: "encryption_pyopenssl" - display_name: "Encryption PyOpenSSL" - tags: ["encryption_tag"] - variables: - test_encryption: true - test_encryption_pyopenssl: true - batchtime: 10080 # 7 days - # The path to crypt_shared is stored in the $CRYPT_SHARED_LIB_PATH expansion. - - id: "encryption_crypt_shared" - display_name: "Encryption shared lib" - tags: ["encryption_tag"] - variables: - test_encryption: true - test_crypt_shared: true - batchtime: 10080 # 7 days - # Run pyopenssl tests? - id: pyopenssl display_name: "PyOpenSSL" @@ -2864,6 +2838,247 @@ buildvariants: PYTHON_BINARY: C:/python/32/Python39/python.exe SKIP_CSOT_TESTS: "true" +# Encryption tests. +- name: encryption-rhel8-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption RHEL8 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared RHEL8 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-rhel8-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption RHEL8 py3.13 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared RHEL8 py3.13 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + AUTH: auth + SSL: nossl + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-rhel8-pypy3.10-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-pypy3.10-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [encryption_tag] +- name: encryption-win64-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption Win64 py3.9 Auth SSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: C:/python/Python39/python.exe + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-crypt_shared-win64-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared Win64 py3.9 Auth SSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: C:/python/Python39/python.exe + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-win64-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption Win64 py3.13 Auth NoSSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + PYTHON_BINARY: C:/python/Python313/python.exe + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-crypt_shared-win64-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared Win64 py3.13 Auth NoSSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: C:/python/Python313/python.exe + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-macos-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption macOS py3.9 Auth SSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-crypt_shared-macos-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared macOS py3.9 Auth SSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-macos-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption macOS py3.13 Auth NoSSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-crypt_shared-macos-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared macOS py3.13 Auth NoSSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 + SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] + - matrix_name: "tests-fips" matrix_spec: platform: @@ -2874,33 +3089,6 @@ buildvariants: tasks: - "test-fips-standalone" -- matrix_name: "test-macos-encryption" - matrix_spec: - platform: - - macos - auth: "auth" - ssl: "nossl" - encryption: "*" - display_name: "${encryption} ${platform} ${auth} ${ssl}" - tasks: "test-latest-replica_set" - rules: - - if: - encryption: ["encryption", "encryption_crypt_shared"] - platform: macos - auth: "auth" - ssl: "nossl" - then: - add_tasks: &encryption-server-versions - - ".rapid" - - ".latest" - - ".8.0" - - ".7.0" - - ".6.0" - - ".5.0" - - ".4.4" - - ".4.2" - - ".4.0" - # Test one server version with zSeries, POWER8, and ARM. - matrix_name: "test-different-cpu-architectures" matrix_spec: @@ -2954,26 +3142,6 @@ buildvariants: tasks: - '.replica_set' -- matrix_name: "tests-python-version-rhel8-test-encryption" - matrix_spec: - platform: rhel8 - python-version: "*" - auth-ssl: noauth-nossl -# TODO: dependency error for 'coverage-report' task: -# dependency tests-python-version-rhel62-test-encryption_.../test-2.6-standalone is not present in the project config -# coverage: "*" - encryption: "*" - display_name: "${encryption} ${python-version} ${platform} ${auth-ssl}" - tasks: "test-latest-replica_set" - rules: - - if: - encryption: ["encryption", "encryption_crypt_shared"] - platform: rhel8 - auth-ssl: noauth-nossl - python-version: "*" - then: - add_tasks: *encryption-server-versions - - matrix_name: "tests-python-version-rhel8-without-c-extensions" matrix_spec: platform: rhel8 @@ -3057,23 +3225,6 @@ buildvariants: tasks: - ".5.0" -- matrix_name: "tests-windows-encryption" - matrix_spec: - platform: windows - python-version-windows: "*" - auth-ssl: "*" - encryption: "*" - display_name: "${encryption} ${platform} ${python-version-windows} ${auth-ssl}" - tasks: "test-latest-replica_set" - rules: - - if: - encryption: ["encryption", "encryption_crypt_shared"] - platform: windows - python-version-windows: "*" - auth-ssl: "*" - then: - add_tasks: *encryption-server-versions - # Storage engine tests on RHEL 8.4 (x86_64) with Python 3.9. - matrix_name: "tests-storage-engines" matrix_spec: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 044303ad8f..cbaab880e6 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -129,7 +129,7 @@ def get_display_name(base: str, host: str, **kwargs) -> str: elif key.lower() in DISPLAY_LOOKUP: name = DISPLAY_LOOKUP[key.lower()][value] else: - raise ValueError(f"Missing display handling for {key}") + continue display_name = f"{display_name} {name}" return display_name @@ -249,8 +249,70 @@ def create_server_variants() -> list[BuildVariant]: return variants +def create_encryption_variants() -> list[BuildVariant]: + variants = [] + task_names = [".latest .replica_set"] + tags = ["encryption_tag"] + batchtime = BATCHTIME_WEEK + + host = "rhel8" + for python, ssl in zip_cycle([*MIN_MAX_PYTHON, PYPYS[-1]], ["ssl", "nossl"]): + # All platforms test encryption and crypt_shared lib encryption. + for encryption in ["Encryption", "Encryption crypt_shared"]: + expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) + if "crypt_shared" in encryption: + expansions["TEST_CRYPT_SHARED"] = "true" + display_name = get_display_name(encryption, host, python=python, **expansions) + variant = create_variant( + task_names, + display_name, + python=python, + host=host, + expansions=expansions, + batchtime=batchtime, + tags=tags, + ) + variants.append(variant) + + # On rhel8 test encryption with PyOpenSSL as well. + expansions = dict( + TEST_ENCRYPTION="true", TEST_ENCRYPTION_PYOPENSSL="true", AUTH="auth", SSL=ssl + ) + display_name = get_display_name("Encryption PyOpenSSL", host, python=python, **expansions) + variant = create_variant( + task_names, + display_name, + python=python, + expansions=expansions, + batchtime=batchtime, + tags=tags, + ) + variants.append(variant) + + for host, (python, ssl) in product( + ["win64", "macos"], zip_cycle(MIN_MAX_PYTHON, ["ssl", "nossl"]) + ): + # All platforms test encryption and crypt_shared lib encryption. + for encryption in ["Encryption", "Encryption crypt_shared"]: + expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) + if "crypt_shared" in encryption: + expansions["TEST_CRYPT_SHARED"] = "true" + display_name = get_display_name(encryption, host, python=python, **expansions) + variant = create_variant( + task_names, + display_name, + python=python, + host=host, + expansions=expansions, + batchtime=batchtime, + tags=tags, + ) + variants.append(variant) + return variants + + ################## # Generate Config ################## -generate_yaml(variants=create_server_variants()) +generate_yaml(variants=create_encryption_variants()) From 38bd710b98447d2ac64a1a08e19b832addb24dab Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 16 Oct 2024 09:30:52 -0500 Subject: [PATCH 2/5] update matrix --- .evergreen/config.yml | 296 ++++++++++++++++++++------ .evergreen/scripts/generate_config.py | 91 ++++---- 2 files changed, 262 insertions(+), 125 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 70c1282912..99cff90955 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2841,7 +2841,7 @@ buildvariants: # Encryption tests. - name: encryption-rhel8-py3.9-auth-ssl tasks: - - name: .latest .replica_set + - name: .replica_set display_name: Encryption RHEL8 py3.9 Auth SSL run_on: - rhel87-small @@ -2852,38 +2852,36 @@ buildvariants: SSL: ssl PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-py3.9-auth-ssl +- name: encryption-rhel8-py3.10-auth-nossl tasks: - - name: .latest .replica_set - display_name: Encryption crypt_shared RHEL8 py3.9 Auth SSL + - name: .replica_set + display_name: Encryption RHEL8 py3.10 Auth NoSSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth - SSL: ssl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /opt/python/3.9/bin/python3 + SSL: nossl + PYTHON_BINARY: /opt/python/3.10/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.9-auth-ssl +- name: encryption-rhel8-py3.11-auth-ssl tasks: - - name: .latest .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.9 Auth SSL + - name: .replica_set + display_name: Encryption RHEL8 py3.11 Auth SSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" AUTH: auth SSL: ssl - PYTHON_BINARY: /opt/python/3.9/bin/python3 + PYTHON_BINARY: /opt/python/3.11/bin/python3 tags: [encryption_tag] -- name: encryption-rhel8-py3.13-auth-nossl +- name: encryption-rhel8-py3.12-auth-nossl tasks: - - name: .latest .replica_set - display_name: Encryption RHEL8 py3.13 Auth NoSSL + - name: .replica_set + display_name: Encryption RHEL8 py3.12 Auth NoSSL run_on: - rhel87-small batchtime: 10080 @@ -2891,39 +2889,37 @@ buildvariants: TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl - PYTHON_BINARY: /opt/python/3.13/bin/python3 + PYTHON_BINARY: /opt/python/3.12/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-py3.13-auth-nossl +- name: encryption-rhel8-py3.13-auth-ssl tasks: - - name: .latest .replica_set - display_name: Encryption crypt_shared RHEL8 py3.13 Auth NoSSL + - name: .replica_set + display_name: Encryption RHEL8 py3.13 Auth SSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth - SSL: nossl - TEST_CRYPT_SHARED: "true" + SSL: ssl PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.13-auth-nossl +- name: encryption-rhel8-pypy3.9-auth-nossl tasks: - - name: .latest .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth NoSSL + - name: .replica_set + display_name: Encryption RHEL8 pypy3.9 Auth NoSSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" AUTH: auth SSL: nossl - PYTHON_BINARY: /opt/python/3.13/bin/python3 + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-pypy3.10-auth-ssl tasks: - - name: .latest .replica_set + - name: .replica_set display_name: Encryption RHEL8 pypy3.10 Auth SSL run_on: - rhel87-small @@ -2934,9 +2930,93 @@ buildvariants: SSL: ssl PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.9-auth-ssl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.10-auth-nossl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.10 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.10/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.11-auth-ssl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.11 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.11/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.12-auth-nossl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.12 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.12/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-py3.13-auth-ssl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.13 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-crypt_shared-rhel8-pypy3.9-auth-nossl + tasks: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 pypy3.9 Auth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 + tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-pypy3.10-auth-ssl tasks: - - name: .latest .replica_set + - name: .replica_set display_name: Encryption crypt_shared RHEL8 pypy3.10 Auth SSL run_on: - rhel87-small @@ -2948,77 +3028,103 @@ buildvariants: TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl +- name: encryption-pyopenssl-rhel8-py3.9-auth-ssl tasks: - - name: .latest .replica_set - display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.9 Auth SSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" AUTH: auth SSL: ssl - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] -- name: encryption-win64-py3.9-auth-ssl +- name: encryption-pyopenssl-rhel8-py3.10-auth-nossl tasks: - - name: .latest .replica_set - display_name: Encryption Win64 py3.9 Auth SSL + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.10 Auth NoSSL run_on: - - windows-64-vsMulti-small + - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth - SSL: ssl - PYTHON_BINARY: C:/python/Python39/python.exe - SKIP_CSOT_TESTS: "true" + SSL: nossl + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/3.10/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-win64-py3.9-auth-ssl +- name: encryption-pyopenssl-rhel8-py3.11-auth-ssl tasks: - - name: .latest .replica_set - display_name: Encryption crypt_shared Win64 py3.9 Auth SSL + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.11 Auth SSL run_on: - - windows-64-vsMulti-small + - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: C:/python/Python39/python.exe - SKIP_CSOT_TESTS: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/3.11/bin/python3 tags: [encryption_tag] -- name: encryption-win64-py3.13-auth-nossl +- name: encryption-pyopenssl-rhel8-py3.12-auth-nossl tasks: - - name: .latest .replica_set - display_name: Encryption Win64 py3.13 Auth NoSSL + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.12 Auth NoSSL run_on: - - windows-64-vsMulti-small + - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl - PYTHON_BINARY: C:/python/Python313/python.exe - SKIP_CSOT_TESTS: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/3.12/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-win64-py3.13-auth-nossl +- name: encryption-pyopenssl-rhel8-py3.13-auth-ssl tasks: - - name: .latest .replica_set - display_name: Encryption crypt_shared Win64 py3.13 Auth NoSSL + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth SSL run_on: - - windows-64-vsMulti-small + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-pypy3.9-auth-nossl + tasks: + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 pypy3.9 Auth NoSSL + run_on: + - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: C:/python/Python313/python.exe - SKIP_CSOT_TESTS: "true" + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl + tasks: + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + TEST_ENCRYPTION_PYOPENSSL: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-macos-py3.9-auth-ssl tasks: @@ -3032,7 +3138,19 @@ buildvariants: AUTH: auth SSL: ssl PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - SKIP_CSOT_TESTS: "true" + tags: [encryption_tag] +- name: encryption-macos-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption macOS py3.13 Auth NoSSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-macos-py3.9-auth-ssl tasks: @@ -3047,12 +3165,11 @@ buildvariants: SSL: ssl TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - SKIP_CSOT_TESTS: "true" tags: [encryption_tag] -- name: encryption-macos-py3.13-auth-nossl +- name: encryption-crypt_shared-macos-py3.13-auth-nossl tasks: - name: .latest .replica_set - display_name: Encryption macOS py3.13 Auth NoSSL + display_name: Encryption crypt_shared macOS py3.13 Auth NoSSL run_on: - macos-14 batchtime: 10080 @@ -3060,23 +3177,62 @@ buildvariants: TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 - SKIP_CSOT_TESTS: "true" tags: [encryption_tag] -- name: encryption-crypt_shared-macos-py3.13-auth-nossl +- name: encryption-win64-py3.9-auth-ssl tasks: - name: .latest .replica_set - display_name: Encryption crypt_shared macOS py3.13 Auth NoSSL + display_name: Encryption Win64 py3.9 Auth SSL run_on: - - macos-14 + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: C:/python/Python39/python.exe + tags: [encryption_tag] +- name: encryption-win64-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption Win64 py3.13 Auth NoSSL + run_on: + - windows-64-vsMulti-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + PYTHON_BINARY: C:/python/Python313/python.exe + tags: [encryption_tag] +- name: encryption-crypt_shared-win64-py3.9-auth-ssl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared Win64 py3.9 Auth SSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: ssl TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 - SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe + tags: [encryption_tag] +- name: encryption-crypt_shared-win64-py3.13-auth-nossl + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared Win64 py3.13 Auth NoSSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + TEST_ENCRYPTION: "true" + AUTH: auth + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] - matrix_name: "tests-fips" diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index cbaab880e6..2f0566e262 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -45,18 +45,13 @@ class Host: name: str run_on: str display_name: str - expansions: dict[str, str] -_macos_expansions = dict( # CSOT tests are unreliable on slow hosts. - SKIP_CSOT_TESTS="true" -) - -HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8", dict()) -HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64", _macos_expansions) -HOSTS["win32"] = Host("win32", "windows-64-vsMulti-small", "Win32", _macos_expansions) -HOSTS["macos"] = Host("macos", "macos-14", "macOS", _macos_expansions) -HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64", _macos_expansions) +HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8") +HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64") +HOSTS["win32"] = Host("win32", "windows-64-vsMulti-small", "Win32") +HOSTS["macos"] = Host("macos", "macos-14", "macOS") +HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64") ############## @@ -84,7 +79,6 @@ def create_variant( expansions["PYTHON_BINARY"] = get_python_binary(python, host) if version: expansions["VERSION"] = version - expansions.update(HOSTS[host].expansions) expansions = expansions or None return BuildVariant( name=name, @@ -235,7 +229,7 @@ def create_server_variants() -> list[BuildVariant]: zip_cycle(MIN_MAX_PYTHON, AUTH_SSLS, TOPOLOGIES), SYNCS ): test_suite = "default" if sync == "sync" else "default_async" - expansions = dict(AUTH=auth, SSL=ssl, TEST_SUITES=test_suite) + expansions = dict(AUTH=auth, SSL=ssl, TEST_SUITES=test_suite, SKIP_CSOT_TESTS="true") display_name = get_display_name("Test", host, python=python, **expansions) variant = create_variant( [f".{topology}"], @@ -251,63 +245,50 @@ def create_server_variants() -> list[BuildVariant]: def create_encryption_variants() -> list[BuildVariant]: variants = [] - task_names = [".latest .replica_set"] + task_names = [".replica_set"] tags = ["encryption_tag"] batchtime = BATCHTIME_WEEK host = "rhel8" - for python, ssl in zip_cycle([*MIN_MAX_PYTHON, PYPYS[-1]], ["ssl", "nossl"]): - # All platforms test encryption and crypt_shared lib encryption. - for encryption in ["Encryption", "Encryption crypt_shared"]: - expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) - if "crypt_shared" in encryption: - expansions["TEST_CRYPT_SHARED"] = "true" - display_name = get_display_name(encryption, host, python=python, **expansions) - variant = create_variant( - task_names, - display_name, - python=python, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=tags, - ) - variants.append(variant) - - # On rhel8 test encryption with PyOpenSSL as well. - expansions = dict( - TEST_ENCRYPTION="true", TEST_ENCRYPTION_PYOPENSSL="true", AUTH="auth", SSL=ssl - ) - display_name = get_display_name("Encryption PyOpenSSL", host, python=python, **expansions) + encryptions = ["Encryption", "Encryption crypt_shared", "Encryption PyOpenSSL"] + for encryption, (python, ssl) in product( + encryptions, zip_cycle(CPYTHONS + PYPYS, ["ssl", "nossl"]) + ): + expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) + if "crypt_shared" in encryption: + expansions["TEST_CRYPT_SHARED"] = "true" + if "PyOpenSSL" in encryption: + expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true" + display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( task_names, display_name, python=python, + host=host, expansions=expansions, batchtime=batchtime, tags=tags, ) variants.append(variant) - for host, (python, ssl) in product( - ["win64", "macos"], zip_cycle(MIN_MAX_PYTHON, ["ssl", "nossl"]) - ): - # All platforms test encryption and crypt_shared lib encryption. - for encryption in ["Encryption", "Encryption crypt_shared"]: - expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) - if "crypt_shared" in encryption: - expansions["TEST_CRYPT_SHARED"] = "true" - display_name = get_display_name(encryption, host, python=python, **expansions) - variant = create_variant( - task_names, - display_name, - python=python, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=tags, - ) - variants.append(variant) + encryptions = ["Encryption", "Encryption crypt_shared"] + task_names = [".latest .replica_set"] + for host, encryption, python in product(["macos", "win64"], encryptions, MIN_MAX_PYTHON): + ssl = "ssl" if python == CPYTHONS[0] else "nossl" + expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) + if "crypt_shared" in encryption: + expansions["TEST_CRYPT_SHARED"] = "true" + display_name = get_display_name(encryption, host, python=python, **expansions) + variant = create_variant( + task_names, + display_name, + python=python, + host=host, + expansions=expansions, + batchtime=batchtime, + tags=tags, + ) + variants.append(variant) return variants From b2349f401a644d97ea79e6dd6a2722332eed3d6b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 16 Oct 2024 09:43:52 -0500 Subject: [PATCH 3/5] update matrix --- .evergreen/config.yml | 188 ++++++-------------------- .evergreen/scripts/generate_config.py | 38 ++++-- 2 files changed, 70 insertions(+), 156 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 99cff90955..3ad175ed7e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2841,7 +2841,9 @@ buildvariants: # Encryption tests. - name: encryption-rhel8-py3.9-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption RHEL8 py3.9 Auth SSL run_on: - rhel87-small @@ -2852,48 +2854,11 @@ buildvariants: SSL: ssl PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] -- name: encryption-rhel8-py3.10-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption RHEL8 py3.10 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - PYTHON_BINARY: /opt/python/3.10/bin/python3 - tags: [encryption_tag] -- name: encryption-rhel8-py3.11-auth-ssl - tasks: - - name: .replica_set - display_name: Encryption RHEL8 py3.11 Auth SSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: ssl - PYTHON_BINARY: /opt/python/3.11/bin/python3 - tags: [encryption_tag] -- name: encryption-rhel8-py3.12-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption RHEL8 py3.12 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - PYTHON_BINARY: /opt/python/3.12/bin/python3 - tags: [encryption_tag] - name: encryption-rhel8-py3.13-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption RHEL8 py3.13 Auth SSL run_on: - rhel87-small @@ -2904,22 +2869,11 @@ buildvariants: SSL: ssl PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] -- name: encryption-rhel8-pypy3.9-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption RHEL8 pypy3.9 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - tags: [encryption_tag] - name: encryption-rhel8-pypy3.10-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption RHEL8 pypy3.10 Auth SSL run_on: - rhel87-small @@ -2932,7 +2886,9 @@ buildvariants: tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-py3.9-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption crypt_shared RHEL8 py3.9 Auth SSL run_on: - rhel87-small @@ -2944,51 +2900,11 @@ buildvariants: TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-py3.10-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption crypt_shared RHEL8 py3.10 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /opt/python/3.10/bin/python3 - tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-py3.11-auth-ssl - tasks: - - name: .replica_set - display_name: Encryption crypt_shared RHEL8 py3.11 Auth SSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: ssl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /opt/python/3.11/bin/python3 - tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-py3.12-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption crypt_shared RHEL8 py3.12 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /opt/python/3.12/bin/python3 - tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-py3.13-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption crypt_shared RHEL8 py3.13 Auth SSL run_on: - rhel87-small @@ -3000,23 +2916,11 @@ buildvariants: TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] -- name: encryption-crypt_shared-rhel8-pypy3.9-auth-nossl - tasks: - - name: .replica_set - display_name: Encryption crypt_shared RHEL8 pypy3.9 Auth NoSSL - run_on: - - rhel87-small - batchtime: 10080 - expansions: - TEST_ENCRYPTION: "true" - AUTH: auth - SSL: nossl - TEST_CRYPT_SHARED: "true" - PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-pypy3.10-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption crypt_shared RHEL8 pypy3.10 Auth SSL run_on: - rhel87-small @@ -3030,7 +2934,9 @@ buildvariants: tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-py3.9-auth-ssl tasks: + - name: .standalone - name: .replica_set + - name: .sharded_cluster display_name: Encryption PyOpenSSL RHEL8 py3.9 Auth SSL run_on: - rhel87-small @@ -3042,24 +2948,28 @@ buildvariants: TEST_ENCRYPTION_PYOPENSSL: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.10-auth-nossl +- name: encryption-pyopenssl-rhel8-py3.13-auth-ssl tasks: + - name: .standalone - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.10 Auth NoSSL + - name: .sharded_cluster + display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth SSL run_on: - rhel87-small batchtime: 10080 expansions: TEST_ENCRYPTION: "true" AUTH: auth - SSL: nossl + SSL: ssl TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/3.10/bin/python3 + PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.11-auth-ssl +- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl tasks: + - name: .standalone - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.11 Auth SSL + - name: .sharded_cluster + display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL run_on: - rhel87-small batchtime: 10080 @@ -3068,64 +2978,50 @@ buildvariants: AUTH: auth SSL: ssl TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/3.11/bin/python3 + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.12-auth-nossl +- name: encryption-rhel8-py3.10-auth-ssl tasks: - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.12 Auth NoSSL + display_name: Encryption RHEL8 py3.10 Auth SSL run_on: - rhel87-small - batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth - SSL: nossl - TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/3.12/bin/python3 - tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-py3.13-auth-ssl + SSL: ssl + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: encryption-crypt_shared-rhel8-py3.11-auth-nossl tasks: - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth SSL + display_name: Encryption crypt_shared RHEL8 py3.11 Auth NoSSL run_on: - rhel87-small - batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth - SSL: ssl - TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/3.13/bin/python3 - tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-pypy3.9-auth-nossl + SSL: nossl + TEST_CRYPT_SHARED: "true" + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: encryption-pyopenssl-rhel8-py3.12-auth-ssl tasks: - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 pypy3.9 Auth NoSSL + display_name: Encryption PyOpenSSL RHEL8 py3.12 Auth SSL run_on: - rhel87-small - batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth - SSL: nossl + SSL: ssl TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - tags: [encryption_tag] -- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: encryption-rhel8-pypy3.9-auth-nossl tasks: - name: .replica_set - display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL + display_name: Encryption RHEL8 pypy3.9 Auth NoSSL run_on: - rhel87-small - batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth - SSL: ssl - TEST_ENCRYPTION_PYOPENSSL: "true" - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - tags: [encryption_tag] + SSL: nossl + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - name: encryption-macos-py3.9-auth-ssl tasks: - name: .latest .replica_set diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 2f0566e262..4db3ed91e3 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -245,23 +245,25 @@ def create_server_variants() -> list[BuildVariant]: def create_encryption_variants() -> list[BuildVariant]: variants = [] - task_names = [".replica_set"] tags = ["encryption_tag"] batchtime = BATCHTIME_WEEK - host = "rhel8" - encryptions = ["Encryption", "Encryption crypt_shared", "Encryption PyOpenSSL"] - for encryption, (python, ssl) in product( - encryptions, zip_cycle(CPYTHONS + PYPYS, ["ssl", "nossl"]) - ): - expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) + def expansions_for_type(encryption, expansions): if "crypt_shared" in encryption: expansions["TEST_CRYPT_SHARED"] = "true" if "PyOpenSSL" in encryption: expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true" + + host = "rhel8" + + # Test against all server versions and topolgies for the three main python versions. + encryptions = ["Encryption", "Encryption crypt_shared", "Encryption PyOpenSSL"] + for encryption, python in product(encryptions, [*MIN_MAX_PYTHON, PYPYS[-1]]): + expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL="ssl") + expansions_for_type(encryption, expansions) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( - task_names, + [f".{t}" for t in TOPOLOGIES], display_name, python=python, host=host, @@ -271,13 +273,29 @@ def create_encryption_variants() -> list[BuildVariant]: ) variants.append(variant) + # Test the rest of the pythons on linux for all server versions. + for encryption, python, ssl in zip_cycle( + encryptions, CPYTHONS[1:-1] + PYPYS[:-1], ["ssl", "nossl"] + ): + expansions = dict(AUTH="auth", SSL=ssl) + expansions_for_type(encryption, expansions) + display_name = get_display_name(encryption, host, python=python, **expansions) + variant = create_variant( + [".replica_set"], + display_name, + python=python, + host=host, + expansions=expansions, + ) + variants.append(variant) + + # Test on macos and linux on one server version and topology for min and max python. encryptions = ["Encryption", "Encryption crypt_shared"] task_names = [".latest .replica_set"] for host, encryption, python in product(["macos", "win64"], encryptions, MIN_MAX_PYTHON): ssl = "ssl" if python == CPYTHONS[0] else "nossl" expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) - if "crypt_shared" in encryption: - expansions["TEST_CRYPT_SHARED"] = "true" + expansions_for_type(encryption, expansions) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( task_names, From fb363432e4303839e73ab1ad83cec0cbea1819ef Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 16 Oct 2024 18:16:39 -0500 Subject: [PATCH 4/5] fix encryption handling --- .evergreen/config.yml | 38 +++++++++++++++------------ .evergreen/scripts/generate_config.py | 13 +++++---- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 3ad175ed7e..97fb616198 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2849,9 +2849,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-py3.13-auth-ssl @@ -2864,9 +2864,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-pypy3.10-auth-ssl @@ -2879,9 +2879,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-py3.9-auth-ssl @@ -2894,9 +2894,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] @@ -2910,9 +2910,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] @@ -2926,9 +2926,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] @@ -2942,9 +2942,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_ENCRYPTION_PYOPENSSL: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] @@ -2958,9 +2958,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_ENCRYPTION_PYOPENSSL: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] @@ -2974,9 +2974,9 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_ENCRYPTION_PYOPENSSL: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] @@ -2989,6 +2989,7 @@ buildvariants: expansions: AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: /opt/python/3.10/bin/python3 - name: encryption-crypt_shared-rhel8-py3.11-auth-nossl tasks: @@ -2999,6 +3000,7 @@ buildvariants: expansions: AUTH: auth SSL: nossl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: encryption-pyopenssl-rhel8-py3.12-auth-ssl @@ -3010,6 +3012,7 @@ buildvariants: expansions: AUTH: auth SSL: ssl + test_encryption: "true" TEST_ENCRYPTION_PYOPENSSL: "true" PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: encryption-rhel8-pypy3.9-auth-nossl @@ -3021,6 +3024,7 @@ buildvariants: expansions: AUTH: auth SSL: nossl + test_encryption: "true" PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 - name: encryption-macos-py3.9-auth-ssl tasks: @@ -3030,9 +3034,9 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 tags: [encryption_tag] - name: encryption-macos-py3.13-auth-nossl @@ -3043,9 +3047,9 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + test_encryption: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-macos-py3.9-auth-ssl @@ -3056,9 +3060,9 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 tags: [encryption_tag] @@ -3070,9 +3074,9 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] @@ -3084,9 +3088,9 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" PYTHON_BINARY: C:/python/Python39/python.exe tags: [encryption_tag] - name: encryption-win64-py3.13-auth-nossl @@ -3097,9 +3101,9 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + test_encryption: "true" PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] - name: encryption-crypt_shared-win64-py3.9-auth-ssl @@ -3110,9 +3114,9 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: ssl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: C:/python/Python39/python.exe tags: [encryption_tag] @@ -3124,9 +3128,9 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" AUTH: auth SSL: nossl + test_encryption: "true" TEST_CRYPT_SHARED: "true" PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4db3ed91e3..c2a5cd9528 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -248,19 +248,20 @@ def create_encryption_variants() -> list[BuildVariant]: tags = ["encryption_tag"] batchtime = BATCHTIME_WEEK - def expansions_for_type(encryption, expansions): + def get_encryption_expansions(encryption, ssl="ssl"): + expansions = dict(AUTH="auth", SSL=ssl, test_encryption="true") if "crypt_shared" in encryption: expansions["TEST_CRYPT_SHARED"] = "true" if "PyOpenSSL" in encryption: expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true" + return expansions host = "rhel8" # Test against all server versions and topolgies for the three main python versions. encryptions = ["Encryption", "Encryption crypt_shared", "Encryption PyOpenSSL"] for encryption, python in product(encryptions, [*MIN_MAX_PYTHON, PYPYS[-1]]): - expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL="ssl") - expansions_for_type(encryption, expansions) + expansions = get_encryption_expansions(encryption) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( [f".{t}" for t in TOPOLOGIES], @@ -277,8 +278,7 @@ def expansions_for_type(encryption, expansions): for encryption, python, ssl in zip_cycle( encryptions, CPYTHONS[1:-1] + PYPYS[:-1], ["ssl", "nossl"] ): - expansions = dict(AUTH="auth", SSL=ssl) - expansions_for_type(encryption, expansions) + expansions = get_encryption_expansions(encryption, ssl) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( [".replica_set"], @@ -294,8 +294,7 @@ def expansions_for_type(encryption, expansions): task_names = [".latest .replica_set"] for host, encryption, python in product(["macos", "win64"], encryptions, MIN_MAX_PYTHON): ssl = "ssl" if python == CPYTHONS[0] else "nossl" - expansions = dict(TEST_ENCRYPTION="true", AUTH="auth", SSL=ssl) - expansions_for_type(encryption, expansions) + expansions = get_encryption_expansions(encryption, ssl) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( task_names, From d66950d37030576f998b411b31ec501f715ff266 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 16 Oct 2024 18:19:01 -0500 Subject: [PATCH 5/5] fix vars --- .evergreen/config.yml | 22 +++++++++++----------- .evergreen/scripts/generate_config.py | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 97fb616198..54a1ff3368 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2897,7 +2897,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-py3.13-auth-ssl @@ -2913,7 +2913,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-pypy3.10-auth-ssl @@ -2929,7 +2929,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-py3.9-auth-ssl @@ -2945,7 +2945,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + test_encryption_pyopenssl: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-py3.13-auth-ssl @@ -2961,7 +2961,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + test_encryption_pyopenssl: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl @@ -2977,7 +2977,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + test_encryption_pyopenssl: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-py3.10-auth-ssl @@ -3001,7 +3001,7 @@ buildvariants: AUTH: auth SSL: nossl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: encryption-pyopenssl-rhel8-py3.12-auth-ssl tasks: @@ -3063,7 +3063,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-macos-py3.13-auth-nossl @@ -3077,7 +3077,7 @@ buildvariants: AUTH: auth SSL: nossl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] - name: encryption-win64-py3.9-auth-ssl @@ -3117,7 +3117,7 @@ buildvariants: AUTH: auth SSL: ssl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: C:/python/Python39/python.exe tags: [encryption_tag] - name: encryption-crypt_shared-win64-py3.13-auth-nossl @@ -3131,7 +3131,7 @@ buildvariants: AUTH: auth SSL: nossl test_encryption: "true" - TEST_CRYPT_SHARED: "true" + test_crypt_shared: "true" PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index c2a5cd9528..dcd97b093e 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -251,9 +251,9 @@ def create_encryption_variants() -> list[BuildVariant]: def get_encryption_expansions(encryption, ssl="ssl"): expansions = dict(AUTH="auth", SSL=ssl, test_encryption="true") if "crypt_shared" in encryption: - expansions["TEST_CRYPT_SHARED"] = "true" + expansions["test_crypt_shared"] = "true" if "PyOpenSSL" in encryption: - expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true" + expansions["test_encryption_pyopenssl"] = "true" return expansions host = "rhel8"