diff --git a/.evergreen/config.yml b/.evergreen/config.yml index fc1713a88e..e357f02f2b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -25,10 +25,6 @@ timeout: script: | ls -la -include: - - filename: .evergreen/generated_configs/tasks.yml - - filename: .evergreen/generated_configs/variants.yml - functions: "fetch source": # Executes clone and applies the submitted patch, if any @@ -520,18 +516,6 @@ functions: args: - .evergreen/run-mongodb-oidc-test.sh - "run oidc k8s auth test": - - command: subprocess.exec - type: test - params: - binary: bash - working_dir: src - env: - OIDC_ENV: k8s - include_expansions_in_env: ["DRIVERS_TOOLS", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "K8S_VARIANT"] - args: - - ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-oidc-remote-test.sh - "run aws auth test with aws credentials as environment variables": - command: shell.exec type: test @@ -885,32 +869,6 @@ task_groups: tasks: - oidc-auth-test-gcp - - name: testk8soidc_task_group - setup_group: - - func: fetch source - - func: prepare resources - - func: fix absolute paths - - func: make files executable - - command: ec2.assume_role - params: - role_arn: ${aws_test_secrets_role} - duration_seconds: 1800 - - command: subprocess.exec - params: - binary: bash - args: - - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: - - command: subprocess.exec - params: - binary: bash - args: - - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/teardown.sh - setup_group_can_fail_task: true - setup_group_timeout_secs: 1800 - tasks: - - oidc-auth-test-k8s - - name: testoidc_task_group setup_group: - func: fetch source @@ -1010,6 +968,249 @@ tasks: TOPOLOGY: "server" - func: "run doctests" + - name: "test-4.0-standalone" + tags: ["4.0", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.0" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-4.0-replica_set" + tags: ["4.0", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.0" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-4.0-sharded_cluster" + tags: ["4.0", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.0" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-4.2-standalone" + tags: ["4.2", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.2" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-4.2-replica_set" + tags: ["4.2", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.2" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-4.2-sharded_cluster" + tags: ["4.2", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.2" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-4.4-standalone" + tags: ["4.4", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.4" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-4.4-replica_set" + tags: ["4.4", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.4" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-4.4-sharded_cluster" + tags: ["4.4", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "4.4" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-5.0-standalone" + tags: ["5.0", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "5.0" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-5.0-replica_set" + tags: ["5.0", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "5.0" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-5.0-sharded_cluster" + tags: ["5.0", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "5.0" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-6.0-standalone" + tags: ["6.0", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "6.0" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-6.0-replica_set" + tags: ["6.0", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "6.0" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-6.0-sharded_cluster" + tags: ["6.0", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "6.0" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-8.0-standalone" + tags: ["8.0", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "8.0" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-8.0-replica_set" + tags: ["8.0", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "8.0" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-8.0-sharded_cluster" + tags: ["8.0", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "8.0" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-7.0-standalone" + tags: ["7.0", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "7.0" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-7.0-replica_set" + tags: ["7.0", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "7.0" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-7.0-sharded_cluster" + tags: ["7.0", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "7.0" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-latest-standalone" + tags: ["latest", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "latest" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-latest-replica_set" + tags: ["latest", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "latest" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-latest-sharded_cluster" + tags: ["latest", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "latest" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + + - name: "test-rapid-standalone" + tags: ["rapid", "standalone"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "rapid" + TOPOLOGY: "server" + - func: "run tests" + + - name: "test-rapid-replica_set" + tags: ["rapid", "replica_set"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "rapid" + TOPOLOGY: "replica_set" + - func: "run tests" + + - name: "test-rapid-sharded_cluster" + tags: ["rapid", "sharded_cluster"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "rapid" + TOPOLOGY: "sharded_cluster" + - func: "run tests" + - name: "test-serverless" tags: ["serverless"] commands: @@ -1580,47 +1781,64 @@ tasks: - func: "run aws auth test with aws web identity credentials" - func: "run aws ECS auth test" + - name: load-balancer-test + commands: + - func: "bootstrap mongo-orchestration" + vars: + TOPOLOGY: "sharded_cluster" + LOAD_BALANCER: true + - func: "run load-balancer" + - func: "run tests" + - name: "oidc-auth-test" commands: - func: "run oidc auth test with test credentials" - name: "oidc-auth-test-azure" commands: - - command: subprocess.exec + - command: shell.exec type: test params: - binary: bash - working_dir: src - env: - OIDC_ENV: azure - include_expansions_in_env: ["DRIVERS_TOOLS"] - args: - - ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-oidc-remote-test.sh + shell: bash + script: |- + set -o errexit + . src/.evergreen/scripts/env.sh + cd src + git add . + git commit -m "add files" + export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-python-driver.tgz + git archive -o $AZUREOIDC_DRIVERS_TAR_FILE HEAD + export AZUREOIDC_TEST_CMD="OIDC_ENV=azure ./.evergreen/run-mongodb-oidc-test.sh" + bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh - name: "oidc-auth-test-gcp" commands: - - command: subprocess.exec + - command: shell.exec type: test params: - binary: bash - working_dir: src - env: - OIDC_ENV: gcp - include_expansions_in_env: ["DRIVERS_TOOLS"] - args: - - ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-oidc-remote-test.sh - - - name: "oidc-auth-test-k8s" + shell: bash + script: |- + set -o errexit + . src/.evergreen/scripts/env.sh + cd src + git add . + git commit -m "add files" + export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-python-driver.tgz + git archive -o $GCPOIDC_DRIVERS_TAR_FILE HEAD + # Define the command to run on the VM. + # Ensure that we source the environment file created for us, set up any other variables we need, + # and then run our test suite on the vm. + export GCPOIDC_TEST_CMD="OIDC_ENV=gcp ./.evergreen/run-mongodb-oidc-test.sh" + bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh + + - name: "test-fips-standalone" + tags: ["fips"] commands: - - func: "run oidc k8s auth test" - vars: - K8S_VARIANT: eks - - func: "run oidc k8s auth test" - vars: - K8S_VARIANT: gke - - func: "run oidc k8s auth test" + - func: "bootstrap mongo-orchestration" vars: - K8S_VARIANT: aks + VERSION: "latest" + TOPOLOGY: "server" + - func: "run tests" # }}} - name: "coverage-report" tags: ["coverage"] @@ -1736,6 +1954,23 @@ tasks: - func: "attach benchmark test results" - func: "send dashboard data" + - name: "assign-pr-reviewer" + tags: ["pr"] + allowed_requesters: ["patch", "github_pr"] + commands: + - command: shell.exec + type: test + params: + shell: "bash" + working_dir: src + script: | + . .evergreen/scripts/env.sh + set -x + export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt + export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh" + bash $SCRIPT -p $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-python-driver" + echo '{"results": [{ "status": "PASS", "test_file": "Build", "log_raw": "Test completed" } ]}' > ${PROJECT_DIRECTORY}/test-results.json + - name: "check-import-time" tags: ["pr"] commands: @@ -1764,41 +1999,2369 @@ tasks: - mongo-python-driver - ${github_commit} +axes: + # Choice of distro + - id: platform + display_name: OS + values: + - id: macos + display_name: "macOS" + run_on: macos-14 + variables: + skip_EC2_auth_test: true + skip_ECS_auth_test: true + skip_web_identity_auth_test: true + # CSOT tests are unreliable on our slow macOS hosts. + SKIP_CSOT_TESTS: true + - id: macos-arm64 + display_name: "macOS Arm64" + run_on: macos-14-arm64 + variables: + skip_EC2_auth_test: true + skip_ECS_auth_test: true + skip_web_identity_auth_test: true + # CSOT tests are unreliable on our slow macOS hosts. + SKIP_CSOT_TESTS: true + - id: rhel7 + display_name: "RHEL 7.x" + run_on: rhel79-small + batchtime: 10080 # 7 days + - id: rhel8 + display_name: "RHEL 8.x" + run_on: rhel8.8-small + batchtime: 10080 # 7 days + - id: rhel9-fips + display_name: "RHEL 9 FIPS" + run_on: rhel92-fips + batchtime: 10080 # 7 days + - id: ubuntu-22.04 + display_name: "Ubuntu 22.04" + run_on: ubuntu2204-small + batchtime: 10080 # 7 days + - id: ubuntu-20.04 + display_name: "Ubuntu 20.04" + run_on: ubuntu2004-small + batchtime: 10080 # 7 days + - id: rhel8-zseries + display_name: "RHEL 8 (zSeries)" + run_on: rhel8-zseries-small + batchtime: 10080 # 7 days + variables: + SKIP_HATCH: true + - id: rhel8-power8 + display_name: "RHEL 8 (POWER8)" + run_on: rhel8-power-small + batchtime: 10080 # 7 days + variables: + SKIP_HATCH: true + - id: rhel8-arm64 + display_name: "RHEL 8 (ARM64)" + run_on: rhel82-arm64-small + batchtime: 10080 # 7 days + variables: + - id: windows + display_name: "Windows 64" + run_on: windows-64-vsMulti-small + batchtime: 10080 # 7 days + variables: + skip_ECS_auth_test: true + skip_EC2_auth_test: true + skip_web_identity_auth_test: true + venv_bin_dir: "Scripts" + # CSOT tests are unreliable on our slow Windows hosts. + SKIP_CSOT_TESTS: true + + # Test with authentication? + - id: auth + display_name: Authentication + values: + - id: auth + display_name: Auth + variables: + AUTH: "auth" + - id: noauth + display_name: NoAuth + variables: + AUTH: "noauth" + + # Test with SSL? + - id: ssl + display_name: SSL + values: + - id: ssl + display_name: SSL + variables: + SSL: "ssl" + - id: nossl + display_name: NoSSL + variables: + SSL: "nossl" + + # Test with Auth + SSL (combined for convenience)? + - id: auth-ssl + display_name: Auth SSL + values: + - id: auth-ssl + display_name: Auth SSL + variables: + AUTH: "auth" + SSL: "ssl" + - id: noauth-nossl + display_name: NoAuth NoSSL + variables: + AUTH: "noauth" + SSL: "nossl" + + # Choice of Python runtime version + - id: python-version + display_name: "Python" + values: + # Note: always display platform with python-version to avoid ambiguous display names. + # Linux + - id: "3.9" + display_name: "Python 3.9" + variables: + PYTHON_BINARY: "/opt/python/3.9/bin/python3" + - id: "3.10" + display_name: "Python 3.10" + variables: + PYTHON_BINARY: "/opt/python/3.10/bin/python3" + - id: "3.11" + display_name: "Python 3.11" + variables: + PYTHON_BINARY: "/opt/python/3.11/bin/python3" + - id: "3.12" + display_name: "Python 3.12" + variables: + PYTHON_BINARY: "/opt/python/3.12/bin/python3" + - id: "3.13" + display_name: "Python 3.13" + variables: + PYTHON_BINARY: "/opt/python/3.13/bin/python3" + - id: "pypy3.9" + display_name: "PyPy 3.9" + variables: + PYTHON_BINARY: "/opt/python/pypy3.9/bin/pypy3" + - id: "pypy3.10" + display_name: "PyPy 3.10" + variables: + PYTHON_BINARY: "/opt/python/pypy3.10/bin/pypy3" + + - id: python-version-windows + display_name: "Python" + values: + - id: "3.9" + display_name: "Python 3.9" + variables: + PYTHON_BINARY: "C:/python/Python39/python.exe" + - id: "3.10" + display_name: "Python 3.10" + variables: + PYTHON_BINARY: "C:/python/Python310/python.exe" + - id: "3.11" + display_name: "Python 3.11" + variables: + PYTHON_BINARY: "C:/python/Python311/python.exe" + - id: "3.12" + display_name: "Python 3.12" + variables: + PYTHON_BINARY: "C:/python/Python312/python.exe" + - id: "3.13" + display_name: "Python 3.13" + variables: + PYTHON_BINARY: "C:/python/Python313/python.exe" + buildvariants: -- name: "no-server" - display_name: "No server" +# Server Tests. +- name: test-rhel8-py3.9-auth-ssl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.9 Auth SSL cov run_on: - - rhel84-small + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.9-noauth-ssl-cov tasks: - - name: "no-server" - -- name: "Coverage Report" - display_name: "Coverage Report" + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.9 NoAuth SSL cov run_on: - - rhel84-small + - rhel87-small + expansions: + AUTH: noauth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.9-noauth-nossl-cov tasks: - - name: "coverage-report" - -- name: testkms-variant - display_name: "KMS" + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.9 NoAuth NoSSL cov run_on: - - debian11-small + - rhel87-small + expansions: + AUTH: noauth + SSL: nossl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.13-auth-ssl-cov tasks: - - name: testgcpkms_task_group - batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README - - testgcpkms-fail-task - - name: testazurekms_task_group - batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README - - testazurekms-fail-task - -- name: rhel8-test-lambda - display_name: FaaS Lambda + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.13 Auth SSL cov + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.13-noauth-ssl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.13 NoAuth SSL cov + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.13-noauth-nossl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 py3.13 NoAuth NoSSL cov + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: nossl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-pypy3.10-auth-ssl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 pypy3.10 Auth SSL cov + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-pypy3.10-noauth-ssl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 pypy3.10 NoAuth SSL cov + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: ssl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-pypy3.10-noauth-nossl-cov + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Test RHEL8 pypy3.10 NoAuth NoSSL cov + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: nossl + COVERAGE: coverage + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [coverage_tag] +- name: test-rhel8-py3.10-auth-ssl + tasks: + - name: .standalone + display_name: Test RHEL8 py3.10 Auth SSL + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: test-rhel8-py3.11-noauth-ssl + tasks: + - name: .replica_set + display_name: Test RHEL8 py3.11 NoAuth SSL + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: ssl + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: test-rhel8-py3.12-noauth-nossl + tasks: + - name: .sharded_cluster + display_name: Test RHEL8 py3.12 NoAuth NoSSL + run_on: + - rhel87-small + expansions: + AUTH: noauth + SSL: nossl + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: test-rhel8-pypy3.9-auth-ssl + tasks: + - name: .standalone + display_name: Test RHEL8 pypy3.9 Auth SSL + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: test-macos-py3.9-auth-ssl-sync + tasks: + - name: .standalone + display_name: Test macOS py3.9 Auth SSL Sync + run_on: + - macos-14 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.9-noauth-ssl-sync + tasks: + - name: .standalone + display_name: Test macOS py3.9 NoAuth SSL Sync + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.9-noauth-nossl-sync + tasks: + - name: .standalone + display_name: Test macOS py3.9 NoAuth NoSSL Sync + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.9-auth-ssl-async + tasks: + - name: .standalone + display_name: Test macOS py3.9 Auth SSL Async + run_on: + - macos-14 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.9-noauth-ssl-async + tasks: + - name: .standalone + display_name: Test macOS py3.9 NoAuth SSL Async + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.9-noauth-nossl-async + tasks: + - name: .standalone + display_name: Test macOS py3.9 NoAuth NoSSL Async + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-py3.13-auth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 Auth SSL Sync + run_on: + - macos-14 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-py3.13-noauth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 NoAuth SSL Sync + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-py3.13-noauth-nossl-sync + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 NoAuth NoSSL Sync + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-py3.13-auth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 Auth SSL Async + run_on: + - macos-14 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-py3.13-noauth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 NoAuth SSL Async + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-py3.13-noauth-nossl-async + tasks: + - name: .sharded_cluster + display_name: Test macOS py3.13 NoAuth NoSSL Async + run_on: + - macos-14 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.9-auth-ssl-sync + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 Auth SSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.9-noauth-ssl-sync + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 NoAuth SSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.9-noauth-nossl-sync + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 NoAuth NoSSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.9-auth-ssl-async + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 Auth SSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.9-noauth-ssl-async + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 NoAuth SSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.9-noauth-nossl-async + tasks: + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Test macOS Arm64 py3.9 NoAuth NoSSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: test-macos-arm64-py3.13-auth-ssl-sync + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 Auth SSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.13-noauth-ssl-sync + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 NoAuth SSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.13-noauth-nossl-sync + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 NoAuth NoSSL Sync + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.13-auth-ssl-async + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 Auth SSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.13-noauth-ssl-async + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 NoAuth SSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-macos-arm64-py3.13-noauth-nossl-async + tasks: + - name: .sharded_cluster .6.0 + - name: .sharded_cluster .7.0 + - name: .sharded_cluster .8.0 + - name: .sharded_cluster .rapid + - name: .sharded_cluster .latest + display_name: Test macOS Arm64 py3.13 NoAuth NoSSL Async + run_on: + - macos-14-arm64 + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 +- name: test-win64-py3.9-auth-ssl-sync + tasks: + - name: .standalone + display_name: Test Win64 py3.9 Auth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.9-noauth-ssl-sync + tasks: + - name: .standalone + display_name: Test Win64 py3.9 NoAuth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.9-noauth-nossl-sync + tasks: + - name: .standalone + display_name: Test Win64 py3.9 NoAuth NoSSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.9-auth-ssl-async + tasks: + - name: .standalone + display_name: Test Win64 py3.9 Auth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.9-noauth-ssl-async + tasks: + - name: .standalone + display_name: Test Win64 py3.9 NoAuth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.9-noauth-nossl-async + tasks: + - name: .standalone + display_name: Test Win64 py3.9 NoAuth NoSSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: test-win64-py3.13-auth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 Auth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win64-py3.13-noauth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 NoAuth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win64-py3.13-noauth-nossl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 NoAuth NoSSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win64-py3.13-auth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 Auth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win64-py3.13-noauth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 NoAuth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win64-py3.13-noauth-nossl-async + tasks: + - name: .sharded_cluster + display_name: Test Win64 py3.13 NoAuth NoSSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: test-win32-py3.9-auth-ssl-sync + tasks: + - name: .standalone + display_name: Test Win32 py3.9 Auth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.9-noauth-ssl-sync + tasks: + - name: .standalone + display_name: Test Win32 py3.9 NoAuth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.9-noauth-nossl-sync + tasks: + - name: .standalone + display_name: Test Win32 py3.9 NoAuth NoSSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.9-auth-ssl-async + tasks: + - name: .standalone + display_name: Test Win32 py3.9 Auth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.9-noauth-ssl-async + tasks: + - name: .standalone + display_name: Test Win32 py3.9 NoAuth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.9-noauth-nossl-async + tasks: + - name: .standalone + display_name: Test Win32 py3.9 NoAuth NoSSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python39/python.exe +- name: test-win32-py3.13-auth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 Auth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe +- name: test-win32-py3.13-noauth-ssl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 NoAuth SSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe +- name: test-win32-py3.13-noauth-nossl-sync + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 NoAuth NoSSL Sync + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe +- name: test-win32-py3.13-auth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 Auth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe +- name: test-win32-py3.13-noauth-ssl-async + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 NoAuth SSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: ssl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe +- name: test-win32-py3.13-noauth-nossl-async + tasks: + - name: .sharded_cluster + display_name: Test Win32 py3.13 NoAuth NoSSL Async + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: noauth + SSL: nossl + TEST_SUITES: default_async + SKIP_CSOT_TESTS: "true" + PYTHON_BINARY: C:/python/32/Python313/python.exe + +# 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 + batchtime: 10080 + expansions: + 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 + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption RHEL8 py3.13 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + 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 + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + 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 + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption crypt_shared RHEL8 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "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 + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption crypt_shared RHEL8 py3.13 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "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 + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption crypt_shared RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "true" + test_crypt_shared: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + 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 + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "true" + test_encryption_pyopenssl: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-py3.13-auth-ssl + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption PyOpenSSL RHEL8 py3.13 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "true" + test_encryption_pyopenssl: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [encryption_tag] +- name: encryption-pyopenssl-rhel8-pypy3.10-auth-ssl + tasks: + - name: .standalone + - name: .replica_set + - name: .sharded_cluster + display_name: Encryption PyOpenSSL RHEL8 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "true" + test_encryption_pyopenssl: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + tags: [encryption_tag] +- name: encryption-rhel8-py3.10-auth-ssl + tasks: + - name: .replica_set + display_name: Encryption RHEL8 py3.10 Auth SSL + run_on: + - rhel87-small + 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: + - name: .replica_set + display_name: Encryption crypt_shared RHEL8 py3.11 Auth NoSSL + run_on: + - rhel87-small + 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 + tasks: + - name: .replica_set + display_name: Encryption PyOpenSSL RHEL8 py3.12 Auth SSL + run_on: + - rhel87-small + 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 + tasks: + - name: .replica_set + display_name: Encryption RHEL8 pypy3.9 Auth NoSSL + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: nossl + test_encryption: "true" + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- 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: + 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 + tasks: + - name: .latest .replica_set + display_name: Encryption macOS py3.13 Auth NoSSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + 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 + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared macOS py3.9 Auth SSL + run_on: + - macos-14 + batchtime: 10080 + expansions: + 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] +- 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: + 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] +- 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: + AUTH: auth + SSL: ssl + test_encryption: "true" + 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: + 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 + tasks: + - name: .latest .replica_set + display_name: Encryption crypt_shared Win64 py3.9 Auth SSL + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + AUTH: auth + SSL: ssl + test_encryption: "true" + test_crypt_shared: "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: + AUTH: auth + SSL: nossl + test_encryption: "true" + test_crypt_shared: "true" + PYTHON_BINARY: C:/python/Python313/python.exe + tags: [encryption_tag] + +# Compressor tests. +- name: snappy-compression-rhel8-py3.9-no-c + tasks: + - name: .standalone + display_name: snappy compression RHEL8 py3.9 No C + run_on: + - rhel87-small + expansions: + COMPRESSORS: snappy + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: snappy-compression-rhel8-py3.10 + tasks: + - name: .standalone + display_name: snappy compression RHEL8 py3.10 + run_on: + - rhel87-small + expansions: + COMPRESSORS: snappy + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: zlib-compression-rhel8-py3.11-no-c + tasks: + - name: .standalone + display_name: zlib compression RHEL8 py3.11 No C + run_on: + - rhel87-small + expansions: + COMPRESSORS: zlib + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: zlib-compression-rhel8-py3.12 + tasks: + - name: .standalone + display_name: zlib compression RHEL8 py3.12 + run_on: + - rhel87-small + expansions: + COMPRESSORS: zlib + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: zstd-compression-rhel8-py3.13-no-c + tasks: + - name: .standalone !.4.0 + display_name: zstd compression RHEL8 py3.13 No C + run_on: + - rhel87-small + expansions: + COMPRESSORS: zstd + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: zstd-compression-rhel8-py3.9 + tasks: + - name: .standalone !.4.0 + display_name: zstd compression RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + COMPRESSORS: zstd + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: snappy-compression-rhel8-pypy3.9 + tasks: + - name: .standalone + display_name: snappy compression RHEL8 pypy3.9 + run_on: + - rhel87-small + expansions: + COMPRESSORS: snappy + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: zlib-compression-rhel8-pypy3.10 + tasks: + - name: .standalone + display_name: zlib compression RHEL8 pypy3.10 + run_on: + - rhel87-small + expansions: + COMPRESSORS: zlib + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 +- name: zstd-compression-rhel8-pypy3.9 + tasks: + - name: .standalone !.4.0 + display_name: zstd compression RHEL8 pypy3.9 + run_on: + - rhel87-small + expansions: + COMPRESSORS: zstd + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 + +# Enterprise auth tests. +- name: enterprise-auth-macos-py3.9-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth macOS py3.9 Auth + run_on: + - macos-14 + expansions: + AUTH: auth + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: enterprise-auth-rhel8-py3.10-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth RHEL8 py3.10 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: enterprise-auth-rhel8-py3.11-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth RHEL8 py3.11 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: enterprise-auth-rhel8-py3.12-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth RHEL8 py3.12 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: enterprise-auth-win64-py3.13-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth Win64 py3.13 Auth + run_on: + - windows-64-vsMulti-small + expansions: + AUTH: auth + PYTHON_BINARY: C:/python/Python313/python.exe +- name: enterprise-auth-rhel8-pypy3.9-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth RHEL8 pypy3.9 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: enterprise-auth-rhel8-pypy3.10-auth + tasks: + - name: test-enterprise-auth + display_name: Enterprise Auth RHEL8 pypy3.10 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + +# PyOpenSSL tests. +- name: pyopenssl-macos-py3.9 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL macOS py3.9 + run_on: + - macos-14 + batchtime: 10080 + expansions: + AUTH: noauth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: pyopenssl-rhel8-py3.10 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL RHEL8 py3.10 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: pyopenssl-rhel8-py3.11 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL RHEL8 py3.11 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: pyopenssl-rhel8-py3.12 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL RHEL8 py3.12 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: pyopenssl-win64-py3.13 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL Win64 py3.13 + run_on: + - windows-64-vsMulti-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: C:/python/Python313/python.exe +- name: pyopenssl-rhel8-pypy3.9 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL RHEL8 pypy3.9 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: pyopenssl-rhel8-pypy3.10 + tasks: + - name: .replica_set + - name: .7.0 + display_name: PyOpenSSL RHEL8 pypy3.10 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + AUTH: auth + test_pyopenssl: "true" + SSL: ssl + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + +# Storage Engine tests. +- name: storage-inmemory-rhel8-py3.9 + tasks: + - name: .standalone .4.0 + - name: .standalone .4.4 + - name: .standalone .5.0 + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Storage InMemory RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + STORAGE_ENGINE: inmemory + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: storage-mmapv1-rhel8-py3.9 + tasks: + - name: .standalone .4.0 + - name: .replica_set .4.0 + display_name: Storage MMAPv1 RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + STORAGE_ENGINE: mmapv1 + PYTHON_BINARY: /opt/python/3.9/bin/python3 + +# Versioned API tests. +- name: versioned-api-require-v1-rhel8-py3.9-auth + tasks: + - name: .standalone .5.0 + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Versioned API require v1 RHEL8 py3.9 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [versionedApi_tag] +- name: versioned-api-accept-v2-rhel8-py3.9-auth + tasks: + - name: .standalone .5.0 + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Versioned API accept v2 RHEL8 py3.9 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + ORCHESTRATION_FILE: versioned-api-testing.json + PYTHON_BINARY: /opt/python/3.9/bin/python3 + tags: [versionedApi_tag] +- name: versioned-api-require-v1-rhel8-py3.13-auth + tasks: + - name: .standalone .5.0 + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Versioned API require v1 RHEL8 py3.13 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [versionedApi_tag] +- name: versioned-api-accept-v2-rhel8-py3.13-auth + tasks: + - name: .standalone .5.0 + - name: .standalone .6.0 + - name: .standalone .7.0 + - name: .standalone .8.0 + - name: .standalone .rapid + - name: .standalone .latest + display_name: Versioned API accept v2 RHEL8 py3.13 Auth + run_on: + - rhel87-small + expansions: + AUTH: auth + ORCHESTRATION_FILE: versioned-api-testing.json + PYTHON_BINARY: /opt/python/3.13/bin/python3 + tags: [versionedApi_tag] + +# Green framework tests. +- name: eventlet-rhel8-py3.9 + tasks: + - name: .standalone + display_name: Eventlet RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + GREEN_FRAMEWORK: eventlet + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: gevent-rhel8-py3.9 + tasks: + - name: .standalone + display_name: Gevent RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + GREEN_FRAMEWORK: gevent + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: eventlet-rhel8-py3.12 + tasks: + - name: .standalone + display_name: Eventlet RHEL8 py3.12 + run_on: + - rhel87-small + expansions: + GREEN_FRAMEWORK: eventlet + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: gevent-rhel8-py3.12 + tasks: + - name: .standalone + display_name: Gevent RHEL8 py3.12 + run_on: + - rhel87-small + expansions: + GREEN_FRAMEWORK: gevent + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.12/bin/python3 + +# No C Ext tests. +- name: no-c-ext-rhel8-py3.9 + tasks: + - name: .standalone + display_name: No C Ext RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: no-c-ext-rhel8-py3.10 + tasks: + - name: .replica_set + display_name: No C Ext RHEL8 py3.10 + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: no-c-ext-rhel8-py3.11 + tasks: + - name: .sharded_cluster + display_name: No C Ext RHEL8 py3.11 + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: no-c-ext-rhel8-py3.12 + tasks: + - name: .standalone + display_name: No C Ext RHEL8 py3.12 + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: no-c-ext-rhel8-py3.13 + tasks: + - name: .replica_set + display_name: No C Ext RHEL8 py3.13 + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + +# Atlas Data Lake tests. +- name: atlas-data-lake-rhel8-py3.9-no-c + tasks: + - name: atlas-data-lake-tests + display_name: Atlas Data Lake RHEL8 py3.9 No C + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: atlas-data-lake-rhel8-py3.9 + tasks: + - name: atlas-data-lake-tests + display_name: Atlas Data Lake RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: atlas-data-lake-rhel8-py3.13-no-c + tasks: + - name: atlas-data-lake-tests + display_name: Atlas Data Lake RHEL8 py3.13 No C + run_on: + - rhel87-small + expansions: + NO_EXT: "1" + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: atlas-data-lake-rhel8-py3.13 + tasks: + - name: atlas-data-lake-tests + display_name: Atlas Data Lake RHEL8 py3.13 + run_on: + - rhel87-small + expansions: + PYTHON_BINARY: /opt/python/3.13/bin/python3 + +# Mod_wsgi tests. +- name: mod_wsgi-ubuntu-22-py3.9 + tasks: + - name: mod-wsgi-standalone + - name: mod-wsgi-replica-set + - name: mod-wsgi-embedded-mode-standalone + - name: mod-wsgi-embedded-mode-replica-set + display_name: mod_wsgi Ubuntu-22 py3.9 + run_on: + - ubuntu2204-small + expansions: + MOD_WSGI_VERSION: "4" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: mod_wsgi-ubuntu-22-py3.13 + tasks: + - name: mod-wsgi-standalone + - name: mod-wsgi-replica-set + - name: mod-wsgi-embedded-mode-standalone + - name: mod-wsgi-embedded-mode-replica-set + display_name: mod_wsgi Ubuntu-22 py3.13 + run_on: + - ubuntu2204-small + expansions: + MOD_WSGI_VERSION: "4" + PYTHON_BINARY: /opt/python/3.13/bin/python3 + +# Disable test commands variants. +- name: disable-test-commands-rhel8-py3.9 + tasks: + - name: .latest + display_name: Disable test commands RHEL8 py3.9 + run_on: + - rhel87-small + expansions: + AUTH: auth + SSL: ssl + DISABLE_TEST_COMMANDS: "1" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + +# Serverless variants. +- name: serverless-rhel8-py3.9 + tasks: + - name: serverless_task_group + display_name: Serverless RHEL8 py3.9 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + test_serverless: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: serverless-rhel8-py3.13 + tasks: + - name: serverless_task_group + display_name: Serverless RHEL8 py3.13 + run_on: + - rhel87-small + batchtime: 10080 + expansions: + test_serverless: "true" + AUTH: auth + SSL: ssl + PYTHON_BINARY: /opt/python/3.13/bin/python3 + +# AWS Auth tests. +- name: aws-auth-ubuntu-20-py3.9 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth Ubuntu-20 py3.9 + run_on: + - ubuntu2004-small + expansions: + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: aws-auth-ubuntu-20-py3.13 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth Ubuntu-20 py3.13 + run_on: + - ubuntu2004-small + expansions: + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: aws-auth-win64-py3.9 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth Win64 py3.9 + run_on: + - windows-64-vsMulti-small + expansions: + skip_ECS_auth_test: "true" + PYTHON_BINARY: C:/python/Python39/python.exe +- name: aws-auth-win64-py3.13 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth Win64 py3.13 + run_on: + - windows-64-vsMulti-small + expansions: + skip_ECS_auth_test: "true" + PYTHON_BINARY: C:/python/Python313/python.exe +- name: aws-auth-macos-py3.9 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth macOS py3.9 + run_on: + - macos-14 + expansions: + skip_ECS_auth_test: "true" + skip_EC2_auth_test: "true" + skip_web_identity_auth_test: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 +- name: aws-auth-macos-py3.13 + tasks: + - name: aws-auth-test-4.4 + - name: aws-auth-test-5.0 + - name: aws-auth-test-6.0 + - name: aws-auth-test-7.0 + - name: aws-auth-test-8.0 + - name: aws-auth-test-rapid + - name: aws-auth-test-latest + display_name: AWS Auth macOS py3.13 + run_on: + - macos-14 + expansions: + skip_ECS_auth_test: "true" + skip_EC2_auth_test: "true" + skip_web_identity_auth_test: "true" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 + +- matrix_name: "tests-fips" + matrix_spec: + platform: + - rhel9-fips + auth: "auth" + ssl: "ssl" + display_name: "${platform} ${auth} ${ssl}" + tasks: + - "test-fips-standalone" + +# Test one server version with zSeries, POWER8, and ARM. +- matrix_name: "test-different-cpu-architectures" + matrix_spec: + platform: + - rhel8-zseries # Added in 5.0.8 (SERVER-44074) + - rhel8-power8 # Added in 4.2.7 (SERVER-44072) + - rhel8-arm64 # Added in 4.4.2 (SERVER-48282) + auth-ssl: "*" + display_name: "${platform} ${auth-ssl}" + tasks: + - ".6.0" + +- matrix_name: "tests-python-version-supports-openssl-102-test-ssl" + matrix_spec: + platform: rhel7 + # Python 3.10+ requires OpenSSL 1.1.1+ + python-version: ["3.9"] + auth-ssl: "*" + display_name: "OpenSSL 1.0.2 ${python-version} ${platform} ${auth-ssl}" + tasks: + - ".5.0" + +- matrix_name: "test-search-index-helpers" + matrix_spec: + platform: rhel8 + python-version: "3.9" + display_name: "Search Index Helpers ${platform}" + tasks: + - name: "test_atlas_task_group_search_indexes" + +- matrix_name: "mockupdb-tests" + matrix_spec: + platform: rhel8 + python-version: 3.9 + display_name: "MockupDB Tests" + tasks: + - name: "mockupdb" + +- matrix_name: "tests-doctests" + matrix_spec: + platform: rhel8 + python-version: ["3.9"] + display_name: "Doctests ${python-version} ${platform}" + tasks: + - name: "doctests" + +- name: "no-server" + display_name: "No server test" + run_on: + - rhel84-small + tasks: + - name: "no-server" + +- name: "Coverage Report" + display_name: "Coverage Report" + run_on: + - rhel84-small + tasks: + - name: "coverage-report" + +- matrix_name: "atlas-connect" + matrix_spec: + platform: rhel8 + python-version: "*" + display_name: "Atlas connect ${python-version} ${platform}" + tasks: + - name: "atlas-connect" + +# 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 + display_name: OCSP test RHEL8 v5.0 py3.10 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp + display_name: OCSP test RHEL8 v6.0 py3.11 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp + display_name: OCSP test RHEL8 v7.0 py3.12 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp + display_name: OCSP test RHEL8 v8.0 py3.13 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp + display_name: OCSP test RHEL8 rapid pypy3.9 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + AUTH: noauth + SSL: ssl + TOPOLOGY: server + VERSION: rapid + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: ocsp-test-rhel8-latest-pypy3.10 + tasks: + - name: .ocsp + display_name: OCSP test RHEL8 latest pypy3.10 + run_on: + - rhel87-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test Win64 v4.4 py3.9 + run_on: + - windows-64-vsMulti-small + batchtime: 20160 + expansions: + 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: + - name: .ocsp-rsa !.ocsp-staple + display_name: OCSP test Win64 v8.0 py3.13 + run_on: + - windows-64-vsMulti-small + batchtime: 20160 + expansions: + 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 + run_on: + - macos-14 + batchtime: 20160 + expansions: + 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 + run_on: + - macos-14 + batchtime: 20160 + expansions: + AUTH: noauth + SSL: ssl + TOPOLOGY: server + VERSION: "8.0" + PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 + +# Load balancer tests +- name: load-balancer-rhel8-v6.0-py3.9-auth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v6.0 py3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "6.0" + AUTH: auth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: load-balancer-rhel8-v6.0-py3.10-noauth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v6.0 py3.10 NoAuth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "6.0" + AUTH: noauth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: load-balancer-rhel8-v6.0-py3.11-noauth-nossl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v6.0 py3.11 NoAuth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "6.0" + AUTH: noauth + SSL: nossl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: load-balancer-rhel8-v7.0-py3.12-auth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v7.0 py3.12 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "7.0" + AUTH: auth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: load-balancer-rhel8-v7.0-py3.13-noauth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v7.0 py3.13 NoAuth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "7.0" + AUTH: noauth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: load-balancer-rhel8-v7.0-pypy3.9-noauth-nossl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v7.0 pypy3.9 NoAuth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "7.0" + AUTH: noauth + SSL: nossl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: load-balancer-rhel8-v8.0-pypy3.10-auth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v8.0 pypy3.10 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "8.0" + AUTH: auth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 +- name: load-balancer-rhel8-v8.0-py3.9-noauth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v8.0 py3.9 NoAuth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "8.0" + AUTH: noauth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 +- name: load-balancer-rhel8-v8.0-py3.10-noauth-nossl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 v8.0 py3.10 NoAuth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: "8.0" + AUTH: noauth + SSL: nossl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.10/bin/python3 +- name: load-balancer-rhel8-latest-py3.11-auth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 latest py3.11 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: latest + AUTH: auth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.11/bin/python3 +- name: load-balancer-rhel8-latest-py3.12-noauth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 latest py3.12 NoAuth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: latest + AUTH: noauth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.12/bin/python3 +- name: load-balancer-rhel8-latest-py3.13-noauth-nossl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 latest py3.13 NoAuth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: latest + AUTH: noauth + SSL: nossl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.13/bin/python3 +- name: load-balancer-rhel8-rapid-pypy3.9-auth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 rapid pypy3.9 Auth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: rapid + AUTH: auth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/pypy3.9/bin/python3 +- name: load-balancer-rhel8-rapid-pypy3.10-noauth-ssl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 rapid pypy3.10 NoAuth SSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: rapid + AUTH: noauth + SSL: ssl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 +- name: load-balancer-rhel8-rapid-py3.9-noauth-nossl + tasks: + - name: load-balancer-test + display_name: Load Balancer RHEL8 rapid py3.9 NoAuth NoSSL + run_on: + - rhel87-small + batchtime: 10080 + expansions: + VERSION: rapid + AUTH: noauth + SSL: nossl + test_loadbalancer: "true" + PYTHON_BINARY: /opt/python/3.9/bin/python3 + +- matrix_name: "oidc-auth-test" + matrix_spec: + platform: [ rhel8, macos, windows ] + display_name: "OIDC Auth ${platform}" + tasks: + - name: testoidc_task_group + batchtime: 20160 # 14 days + +- name: testazureoidc-variant + display_name: "OIDC Auth Azure" + run_on: ubuntu2204-small + tasks: + - name: testazureoidc_task_group + batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README + +- name: testgcpoidc-variant + display_name: "OIDC Auth GCP" + run_on: ubuntu2204-small + tasks: + - name: testgcpoidc_task_group + batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README + +- name: testgcpkms-variant + display_name: "GCP KMS" + run_on: + - debian11-small + tasks: + - name: testgcpkms_task_group + batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README + - testgcpkms-fail-task + +- name: testazurekms-variant + display_name: "Azure KMS" + run_on: debian11-small + tasks: + - name: testazurekms_task_group + batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README + - testazurekms-fail-task + +- name: rhel8-test-lambda + display_name: AWS Lambda handler tests run_on: rhel87-small tasks: - name: test_aws_lambda_task_group +- name: rhel8-pr-assign-reviewer + display_name: Assign PR Reviewer + run_on: rhel87-small + tasks: + - name: "assign-pr-reviewer" + - name: rhel8-import-time - display_name: Import Time + display_name: Import Time Check run_on: rhel87-small tasks: - name: "check-import-time" @@ -1811,7 +4374,7 @@ buildvariants: - name: "backport-pr" - name: "perf-tests" - display_name: "Performance Benchmarks" + display_name: "Performance Benchmark Tests" batchtime: 10080 # 7 days run_on: rhel90-dbx-perf-large tasks: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 05529ecb25..6d614a9afe 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -9,17 +9,13 @@ # Note: Run this file with `hatch run`, `pipx run`, or `uv run`. from __future__ import annotations -import sys from dataclasses import dataclass -from inspect import getmembers, isfunction from itertools import cycle, product, zip_longest -from pathlib import Path from typing import Any 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.evg_task import EvgTaskRef from shrub.v3.shrub_service import ShrubService ############## @@ -27,6 +23,7 @@ ############## ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] +VERSIONS_6_0_PLUS = ["6.0", "7.0", "8.0", "rapid", "latest"] CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] PYPYS = ["pypy3.9", "pypy3.10"] ALL_PYTHONS = CPYTHONS + PYPYS @@ -35,13 +32,7 @@ AUTH_SSLS = [("auth", "ssl"), ("noauth", "ssl"), ("noauth", "nossl")] TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"] C_EXTS = ["with_ext", "without_ext"] -# By default test each of the topologies with a subset of auth/ssl. -SUB_TASKS = [ - ".sharded_cluster .auth .ssl", - ".replica_set .noauth .ssl", - ".standalone .noauth .nossl", -] -SYNCS = ["sync", "async", "sync_async"] +SYNCS = ["sync", "async"] DISPLAY_LOOKUP = dict( ssl=dict(ssl="SSL", nossl="NoSSL"), auth=dict(auth="Auth", noauth="NoAuth"), @@ -59,15 +50,11 @@ class Host: display_name: str -# Hosts with toolchains. 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") -HOSTS["ubuntu20"] = Host("ubuntu20", "ubuntu2004-small", "Ubuntu-20") -HOSTS["ubuntu22"] = Host("ubuntu22", "ubuntu2204-small", "Ubuntu-22") -HOSTS["rhel7"] = Host("rhel7", "rhel79-small", "RHEL7") ############## @@ -88,12 +75,9 @@ def create_variant( task_refs = [EvgTaskRef(name=n) for n in task_names] kwargs.setdefault("expansions", dict()) expansions = kwargs.pop("expansions", dict()).copy() - if "run_on" in kwargs: - run_on = kwargs.pop("run_on") - else: - host = host or "rhel8" - run_on = [HOSTS[host].run_on] - name = display_name.replace(" ", "-").replace("*-", "").lower() + 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: @@ -119,7 +103,7 @@ def get_python_binary(python: str, host: str) -> str: python = python.replace(".", "") return f"{base}/Python{python}/python.exe" - if host in ["rhel8", "ubuntu22", "ubuntu20", "rhel7"]: + if host == "rhel8": return f"/opt/python/{python}/bin/python3" if host in ["macos", "macos-arm64"]: @@ -128,31 +112,10 @@ def get_python_binary(python: str, host: str) -> str: raise ValueError(f"no match found for python {python} on {host}") -def get_versions_from(min_version: str) -> list[str]: - """Get all server versions starting from a minimum version.""" - min_version_float = float(min_version) - rapid_latest = ["rapid", "latest"] - versions = [v for v in ALL_VERSIONS if v not in rapid_latest] - return [v for v in versions if float(v) >= min_version_float] + rapid_latest - - -def get_versions_until(max_version: str) -> list[str]: - """Get all server version up to a max version.""" - max_version_float = float(max_version) - versions = [v for v in ALL_VERSIONS if v not in ["rapid", "latest"]] - versions = [v for v in versions if float(v) <= max_version_float] - if not len(versions): - raise ValueError(f"No server versions found less <= {max_version}") - return versions - - -def get_display_name(base: str, host: str | None = None, **kwargs) -> str: +def get_display_name(base: str, host: str, **kwargs) -> str: """Get the display name of a variant.""" - display_name = base - if host is not None: - display_name += f" {HOSTS[host].display_name}" + display_name = f"{base} {HOSTS[host].display_name}" version = kwargs.pop("VERSION", None) - version = version or kwargs.pop("version", None) if version: if version not in ["rapid", "latest"]: version = f"v{version}" @@ -201,7 +164,7 @@ def create_ocsp_variants() -> list[BuildVariant]: variants = [] batchtime = BATCHTIME_WEEK * 2 expansions = dict(AUTH="noauth", SSL="ssl", TOPOLOGY="server") - base_display = "OCSP" + base_display = "OCSP test" # OCSP tests on rhel8 with all servers v4.4+ and all python versions. versions = [v for v in ALL_VERSIONS if v != "4.0"] @@ -209,7 +172,7 @@ def create_ocsp_variants() -> list[BuildVariant]: host = "rhel8" variant = create_variant( [".ocsp"], - get_display_name(base_display, host, version=version, python=python), + get_display_name(base_display, host, version, python), python=python, version=version, host=host, @@ -224,7 +187,7 @@ def create_ocsp_variants() -> list[BuildVariant]: python = CPYTHONS[0] if version == "4.4" else CPYTHONS[-1] variant = create_variant( [".ocsp-rsa !.ocsp-staple"], - get_display_name(base_display, host, version=version, python=python), + get_display_name(base_display, host, version, python), python=python, version=version, host=host, @@ -241,13 +204,12 @@ def create_server_variants() -> list[BuildVariant]: # Run the full matrix on linux with min and max CPython, and latest pypy. host = "rhel8" - # Prefix the display name with an asterisk so it is sorted first. - base_display_name = "* Test" - for python in [*MIN_MAX_PYTHON, PYPYS[-1]]: - expansions = dict(COVERAGE="coverage") - display_name = get_display_name(base_display_name, host, python=python, **expansions) + for python, (auth, ssl) in product([*MIN_MAX_PYTHON, PYPYS[-1]], AUTH_SSLS): + display_name = f"Test {host}" + expansions = dict(AUTH=auth, SSL=ssl, COVERAGE="coverage") + display_name = get_display_name("Test", host, python=python, **expansions) variant = create_variant( - [f".{t} .sync_async" for t in TOPOLOGIES], + [f".{t}" for t in TOPOLOGIES], display_name, python=python, host=host, @@ -256,12 +218,15 @@ def create_server_variants() -> list[BuildVariant]: ) variants.append(variant) - # Test the rest of the pythons. - for python in CPYTHONS[1:-1] + PYPYS[:-1]: + # Test the rest of the pythons on linux. + for python, (auth, ssl), topology in zip_cycle( + CPYTHONS[1:-1] + PYPYS[:-1], AUTH_SSLS, TOPOLOGIES + ): display_name = f"Test {host}" - display_name = get_display_name(base_display_name, host, python=python) + expansions = dict(AUTH=auth, SSL=ssl) + display_name = get_display_name("Test", host, python=python, **expansions) variant = create_variant( - [f"{t} .sync_async" for t in SUB_TASKS], + [f".{topology}"], display_name, python=python, host=host, @@ -271,15 +236,16 @@ def create_server_variants() -> list[BuildVariant]: # Test a subset on each of the other platforms. for host in ("macos", "macos-arm64", "win64", "win32"): - for python in MIN_MAX_PYTHON: - tasks = [f"{t} !.sync_async" for t in SUB_TASKS] + for (python, (auth, ssl), topology), sync in product( + zip_cycle(MIN_MAX_PYTHON, AUTH_SSLS, TOPOLOGIES), SYNCS + ): + test_suite = "default" if sync == "sync" else "default_async" + tasks = [f".{topology}"] # MacOS arm64 only works on server versions 6.0+ if host == "macos-arm64": - tasks = [] - for version in get_versions_from("6.0"): - tasks.extend(f"{t} .{version} !.sync_async" for t in SUB_TASKS) - expansions = dict(SKIP_CSOT_TESTS="true") - display_name = get_display_name(base_display_name, host, python=python, **expansions) + tasks = [f".{topology} .{version}" for version in VERSIONS_6_0_PLUS] + 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( tasks, display_name, @@ -297,8 +263,8 @@ def create_encryption_variants() -> list[BuildVariant]: tags = ["encryption_tag"] batchtime = BATCHTIME_WEEK - def get_encryption_expansions(encryption): - expansions = dict(test_encryption="true") + 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: @@ -307,13 +273,13 @@ def get_encryption_expansions(encryption): host = "rhel8" - # Test against all server versions for the three main python versions. + # 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 = get_encryption_expansions(encryption) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( - [f"{t} .sync_async" for t in SUB_TASKS], + [f".{t}" for t in TOPOLOGIES], display_name, python=python, host=host, @@ -324,11 +290,13 @@ def get_encryption_expansions(encryption): variants.append(variant) # Test the rest of the pythons on linux for all server versions. - for encryption, python, task in zip_cycle(encryptions, CPYTHONS[1:-1] + PYPYS[:-1], SUB_TASKS): - expansions = get_encryption_expansions(encryption) + for encryption, python, ssl in zip_cycle( + encryptions, CPYTHONS[1:-1] + PYPYS[:-1], ["ssl", "nossl"] + ): + expansions = get_encryption_expansions(encryption, ssl) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( - [f"{task} .sync_async"], + [".replica_set"], display_name, python=python, host=host, @@ -338,9 +306,10 @@ def get_encryption_expansions(encryption): # 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 .sync_async"] + task_names = [".latest .replica_set"] for host, encryption, python in product(["macos", "win64"], encryptions, MIN_MAX_PYTHON): - expansions = get_encryption_expansions(encryption) + ssl = "ssl" if python == CPYTHONS[0] else "nossl" + expansions = get_encryption_expansions(encryption, ssl) display_name = get_display_name(encryption, host, python=python, **expansions) variant = create_variant( task_names, @@ -356,20 +325,25 @@ def get_encryption_expansions(encryption): def create_load_balancer_variants(): - # Load balancer tests - run all supported server versions using the lowest supported python. + # Load balancer tests - run all supported versions for all combinations of auth and ssl and system python. host = "rhel8" + task_names = ["load-balancer-test"] batchtime = BATCHTIME_WEEK - versions = get_versions_from("6.0") + expansions_base = dict(test_loadbalancer="true") + versions = ["6.0", "7.0", "8.0", "latest", "rapid"] variants = [] - for version in versions: - python = CPYTHONS[0] - display_name = get_display_name("Load Balancer", host, python=python, version=version) + pythons = CPYTHONS + PYPYS + for ind, (version, (auth, ssl)) in enumerate(product(versions, AUTH_SSLS)): + expansions = dict(VERSION=version, AUTH=auth, SSL=ssl) + expansions.update(expansions_base) + python = pythons[ind % len(pythons)] + display_name = get_display_name("Load Balancer", host, python=python, **expansions) variant = create_variant( - [".load-balancer"], + task_names, display_name, python=python, host=host, - version=version, + expansions=expansions, batchtime=batchtime, ) variants.append(variant) @@ -380,13 +354,12 @@ def create_compression_variants(): # Compression tests - standalone versions of each server, across python versions, with and without c extensions. # PyPy interpreters are always tested without extensions. host = "rhel8" - base_task = ".standalone .noauth .nossl .sync_async" - task_names = dict(snappy=[base_task], zlib=[base_task], zstd=[f"{base_task} !.4.0"]) + task_names = dict(snappy=[".standalone"], zlib=[".standalone"], zstd=[".standalone !.4.0"]) variants = [] for ind, (compressor, c_ext) in enumerate(product(["snappy", "zlib", "zstd"], C_EXTS)): expansions = dict(COMPRESSORS=compressor) handle_c_ext(c_ext, expansions) - base_name = f"Compression {compressor}" + base_name = f"{compressor} compression" python = CPYTHONS[ind % len(CPYTHONS)] display_name = get_display_name(base_name, host, python=python, **expansions) variant = create_variant( @@ -402,7 +375,7 @@ def create_compression_variants(): for compressor, python in zip_cycle(["snappy", "zlib", "zstd"], other_pythons): expansions = dict(COMPRESSORS=compressor) handle_c_ext(c_ext, expansions) - base_name = f"Compression {compressor}" + base_name = f"{compressor} compression" display_name = get_display_name(base_name, host, python=python, **expansions) variant = create_variant( task_names[compressor], @@ -428,7 +401,7 @@ def create_enterprise_auth_variants(): host = "win64" else: host = "rhel8" - display_name = get_display_name("Auth Enterprise", host, python=python, **expansions) + display_name = get_display_name("Enterprise Auth", host, python=python, **expansions) variant = create_variant( ["test-enterprise-auth"], display_name, host=host, python=python, expansions=expansions ) @@ -440,23 +413,24 @@ def create_enterprise_auth_variants(): def create_pyopenssl_variants(): base_name = "PyOpenSSL" batchtime = BATCHTIME_WEEK - expansions = dict(test_pyopenssl="true") + base_expansions = dict(test_pyopenssl="true", SSL="ssl") variants = [] for python in ALL_PYTHONS: # Only test "noauth" with min python. auth = "noauth" if python == CPYTHONS[0] else "auth" - ssl = "nossl" if auth == "noauth" else "ssl" if python == CPYTHONS[0]: host = "macos" elif python == CPYTHONS[-1]: host = "win64" else: host = "rhel8" + expansions = dict(AUTH=auth) + expansions.update(base_expansions) display_name = get_display_name(base_name, host, python=python) variant = create_variant( - [f".replica_set .{auth} .{ssl} .sync_async", f".7.0 .{auth} .{ssl} .sync_async"], + [".replica_set", ".7.0"], display_name, python=python, host=host, @@ -468,397 +442,10 @@ def create_pyopenssl_variants(): return variants -def create_storage_engine_variants(): - host = "rhel8" - engines = ["InMemory", "MMAPv1"] - variants = [] - for engine in engines: - python = CPYTHONS[0] - expansions = dict(STORAGE_ENGINE=engine.lower()) - if engine == engines[0]: - tasks = [f".standalone .noauth .nossl .{v} .sync_async" for v in ALL_VERSIONS] - else: - # MongoDB 4.2 drops support for MMAPv1 - versions = get_versions_until("4.0") - tasks = [f".standalone .{v} .noauth .nossl .sync_async" for v in versions] + [ - f".replica_set .{v} .noauth .nossl .sync_async" for v in versions - ] - display_name = get_display_name(f"Storage {engine}", host, python=python) - variant = create_variant( - tasks, display_name, host=host, python=python, expansions=expansions - ) - variants.append(variant) - return variants - - -def create_stable_api_variants(): - host = "rhel8" - tags = ["versionedApi_tag"] - tasks = [f".standalone .{v} .noauth .nossl .sync_async" for v in get_versions_from("5.0")] - variants = [] - types = ["require v1", "accept v2"] - - # All python versions across platforms. - for python, test_type in product(MIN_MAX_PYTHON, types): - expansions = dict(AUTH="auth") - # Test against a cluster with requireApiVersion=1. - if test_type == types[0]: - # REQUIRE_API_VERSION is set to make drivers-evergreen-tools - # start a cluster with the requireApiVersion parameter. - expansions["REQUIRE_API_VERSION"] = "1" - # MONGODB_API_VERSION is the apiVersion to use in the test suite. - expansions["MONGODB_API_VERSION"] = "1" - else: - # Test against a cluster with acceptApiVersion2 but without - # requireApiVersion, and don't automatically add apiVersion to - # clients created in the test suite. - expansions["ORCHESTRATION_FILE"] = "versioned-api-testing.json" - base_display_name = f"Stable API {test_type}" - display_name = get_display_name(base_display_name, host, python=python, **expansions) - variant = create_variant( - tasks, display_name, host=host, python=python, tags=tags, expansions=expansions - ) - variants.append(variant) - - return variants - - -def create_green_framework_variants(): - variants = [] - tasks = [".standalone .noauth .nossl .sync_async"] - host = "rhel8" - for python, framework in product([CPYTHONS[0], CPYTHONS[-2]], ["eventlet", "gevent"]): - expansions = dict(GREEN_FRAMEWORK=framework, AUTH="auth", SSL="ssl") - display_name = get_display_name(f"Green {framework.capitalize()}", host, python=python) - variant = create_variant( - tasks, display_name, host=host, python=python, expansions=expansions - ) - variants.append(variant) - return variants - - -def create_no_c_ext_variants(): - variants = [] - host = "rhel8" - for python, topology in zip_cycle(CPYTHONS, TOPOLOGIES): - tasks = [f".{topology} .noauth .nossl .sync_async"] - expansions = dict() - handle_c_ext(C_EXTS[0], expansions) - display_name = get_display_name("No C Ext", host, python=python) - variant = create_variant( - tasks, display_name, host=host, python=python, expansions=expansions - ) - variants.append(variant) - return variants - - -def create_atlas_data_lake_variants(): - variants = [] - host = "ubuntu22" - for python, c_ext in product(MIN_MAX_PYTHON, C_EXTS): - tasks = ["atlas-data-lake-tests"] - expansions = dict(AUTH="auth") - handle_c_ext(c_ext, expansions) - display_name = get_display_name("Atlas Data Lake", host, python=python, **expansions) - variant = create_variant( - tasks, display_name, host=host, python=python, expansions=expansions - ) - variants.append(variant) - return variants - - -def create_mod_wsgi_variants(): - variants = [] - host = "ubuntu22" - tasks = [ - "mod-wsgi-standalone", - "mod-wsgi-replica-set", - "mod-wsgi-embedded-mode-standalone", - "mod-wsgi-embedded-mode-replica-set", - ] - expansions = dict(MOD_WSGI_VERSION="4") - for python in MIN_MAX_PYTHON: - display_name = get_display_name("mod_wsgi", host, python=python) - variant = create_variant( - tasks, display_name, host=host, python=python, expansions=expansions - ) - variants.append(variant) - return variants - - -def create_disable_test_commands_variants(): - host = "rhel8" - expansions = dict(AUTH="auth", SSL="ssl", DISABLE_TEST_COMMANDS="1") - python = CPYTHONS[0] - display_name = get_display_name("Disable test commands", host, python=python) - tasks = [".latest .sync_async"] - return [create_variant(tasks, display_name, host=host, python=python, expansions=expansions)] - - -def create_serverless_variants(): - host = "rhel8" - batchtime = BATCHTIME_WEEK - expansions = dict(test_serverless="true", AUTH="auth", SSL="ssl") - tasks = ["serverless_task_group"] - base_name = "Serverless" - return [ - create_variant( - tasks, - get_display_name(base_name, host, python=python), - host=host, - python=python, - expansions=expansions, - batchtime=batchtime, - ) - for python in MIN_MAX_PYTHON - ] - - -def create_oidc_auth_variants(): - variants = [] - other_tasks = ["testazureoidc_task_group", "testgcpoidc_task_group", "testk8soidc_task_group"] - for host in ["ubuntu22", "macos", "win64"]: - tasks = ["testoidc_task_group"] - if host == "ubuntu22": - tasks += other_tasks - variants.append( - create_variant( - tasks, - get_display_name("Auth OIDC", host), - host=host, - batchtime=BATCHTIME_WEEK * 2, - ) - ) - return variants - - -def create_search_index_variants(): - host = "rhel8" - python = CPYTHONS[0] - return [ - create_variant( - ["test_atlas_task_group_search_indexes"], - get_display_name("Search Index Helpers", host, python=python), - python=python, - host=host, - ) - ] - - -def create_mockupdb_variants(): - host = "rhel8" - python = CPYTHONS[0] - return [ - create_variant( - ["mockupdb"], - get_display_name("MockupDB", host, python=python), - python=python, - host=host, - ) - ] - - -def create_doctests_variants(): - host = "rhel8" - python = CPYTHONS[0] - return [ - create_variant( - ["doctests"], - get_display_name("Doctests", host, python=python), - python=python, - host=host, - ) - ] - - -def create_atlas_connect_variants(): - host = "rhel8" - return [ - create_variant( - ["atlas-connect"], - get_display_name("Atlas connect", host, python=python), - python=python, - host=host, - ) - for python in MIN_MAX_PYTHON - ] - - -def create_aws_auth_variants(): - variants = [] - tasks = [ - "aws-auth-test-4.4", - "aws-auth-test-5.0", - "aws-auth-test-6.0", - "aws-auth-test-7.0", - "aws-auth-test-8.0", - "aws-auth-test-rapid", - "aws-auth-test-latest", - ] - - for host, python in product(["ubuntu20", "win64", "macos"], MIN_MAX_PYTHON): - expansions = dict() - if host != "ubuntu20": - expansions["skip_ECS_auth_test"] = "true" - if host == "macos": - expansions["skip_EC2_auth_test"] = "true" - expansions["skip_web_identity_auth_test"] = "true" - variant = create_variant( - tasks, - get_display_name("Auth AWS", host, python=python), - host=host, - python=python, - expansions=expansions, - ) - variants.append(variant) - return variants - - -def create_alternative_hosts_variants(): - expansions = dict(SKIP_HATCH="true") - batchtime = BATCHTIME_WEEK - variants = [] - - host = "rhel7" - variants.append( - create_variant( - [".5.0 .standalone !.sync_async"], - get_display_name("OpenSSL 1.0.2", "rhel7", python=CPYTHONS[0], **expansions), - host=host, - python=CPYTHONS[0], - batchtime=batchtime, - expansions=expansions, - ) - ) - - hosts = ["rhel92-fips", "rhel8-zseries-small", "rhel8-power-small", "rhel82-arm64-small"] - host_names = ["RHEL9-FIPS", "RHEL8-zseries", "RHEL8-POWER8", "RHEL8-arm64"] - for host, host_name in zip(hosts, host_names): - variants.append( - create_variant( - [".6.0 .standalone !.sync_async"], - display_name=get_display_name(f"Other hosts {host_name}", **expansions), - expansions=expansions, - batchtime=batchtime, - run_on=[host], - ) - ) - return variants - - -############## -# Tasks -############## - - -def create_server_tasks(): - tasks = [] - for topo, version, (auth, ssl), sync in product(TOPOLOGIES, ALL_VERSIONS, AUTH_SSLS, SYNCS): - name = f"test-{version}-{topo}-{auth}-{ssl}-{sync}".lower() - tags = [version, topo, auth, ssl, sync] - bootstrap_vars = dict( - VERSION=version, - TOPOLOGY=topo if topo != "standalone" else "server", - AUTH=auth, - SSL=ssl, - ) - bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars) - test_suites = "" - if sync == "sync": - test_suites = "default" - elif sync == "async": - test_suites = "default_async" - test_vars = dict( - AUTH=auth, - SSL=ssl, - SYNC=sync, - TEST_SUITES=test_suites, - ) - test_func = FunctionCall(func="run tests", vars=test_vars) - tasks.append(EvgTask(name=name, tags=tags, commands=[bootstrap_func, test_func])) - return tasks - - -def create_load_balancer_tasks(): - tasks = [] - for auth, ssl in AUTH_SSLS: - name = f"test-load-balancer-{auth}-{ssl}".lower() - tags = ["load-balancer", auth, ssl] - bootstrap_vars = dict(TOPOLOGY="sharded_cluster", AUTH=auth, SSL=ssl, LOAD_BALANCER="true") - bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars) - balancer_func = FunctionCall(func="run load-balancer") - test_vars = dict(AUTH=auth, SSL=ssl, test_loadbalancer="true") - test_func = FunctionCall(func="run tests", vars=test_vars) - tasks.append( - EvgTask(name=name, tags=tags, commands=[bootstrap_func, balancer_func, test_func]) - ) - return tasks - - ################## # Generate Config ################## - -def write_variants_to_file(): - mod = sys.modules[__name__] - here = Path(__file__).absolute().parent - target = here.parent / "generated_configs" / "variants.yml" - if target.exists(): - target.unlink() - with target.open("w") as fid: - fid.write("buildvariants:\n") - - for name, func in getmembers(mod, isfunction): - if not name.endswith("_variants"): - continue - if not name.startswith("create_"): - raise ValueError("Variant creators must start with create_") - title = name.replace("create_", "").replace("_variants", "").replace("_", " ").capitalize() - project = EvgProject(tasks=None, buildvariants=func()) - out = ShrubService.generate_yaml(project).splitlines() - with target.open("a") as fid: - fid.write(f" # {title} tests\n") - for line in out[1:]: - fid.write(f"{line}\n") - fid.write("\n") - - # Remove extra trailing newline: - data = target.read_text().splitlines() - with target.open("w") as fid: - for line in data[:-1]: - fid.write(f"{line}\n") - - -def write_tasks_to_file(): - mod = sys.modules[__name__] - here = Path(__file__).absolute().parent - target = here.parent / "generated_configs" / "tasks.yml" - if target.exists(): - target.unlink() - with target.open("w") as fid: - fid.write("tasks:\n") - - for name, func in getmembers(mod, isfunction): - if not name.endswith("_tasks"): - continue - if not name.startswith("create_"): - raise ValueError("Task creators must start with create_") - title = name.replace("create_", "").replace("_tasks", "").replace("_", " ").capitalize() - project = EvgProject(tasks=func(), buildvariants=None) - out = ShrubService.generate_yaml(project).splitlines() - with target.open("a") as fid: - fid.write(f" # {title} tests\n") - for line in out[1:]: - fid.write(f"{line}\n") - fid.write("\n") - - # Remove extra trailing newline: - data = target.read_text().splitlines() - with target.open("w") as fid: - for line in data[:-1]: - fid.write(f"{line}\n") - - -write_variants_to_file() -write_tasks_to_file() +variants = create_pyopenssl_variants() +# print(len(variants)) +generate_yaml(variants=variants) diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index 43517e1fa7..f5369b7c4c 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -32,7 +32,6 @@ """ from __future__ import annotations -import asyncio import contextlib import os import warnings @@ -2037,8 +2036,6 @@ async def _process_kill_cursors(self) -> None: for address, cursor_id, conn_mgr in pinned_cursors: try: await self._cleanup_cursor_lock(cursor_id, address, conn_mgr, None, False) - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: # Raise the exception when client is closed so that it @@ -2053,8 +2050,6 @@ async def _process_kill_cursors(self) -> None: for address, cursor_ids in address_to_cursor_ids.items(): try: await self._kill_cursors(cursor_ids, address, topology, session=None) - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: raise @@ -2069,8 +2064,6 @@ async def _process_periodic_tasks(self) -> None: try: await self._process_kill_cursors() await self._topology.update_pool() - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: return diff --git a/pymongo/asynchronous/monitor.py b/pymongo/asynchronous/monitor.py index 780704fabb..bbfd6a2998 100644 --- a/pymongo/asynchronous/monitor.py +++ b/pymongo/asynchronous/monitor.py @@ -16,7 +16,6 @@ from __future__ import annotations -import asyncio import atexit import logging import time @@ -27,7 +26,7 @@ from pymongo._csot import MovingMinimum from pymongo.errors import NetworkTimeout, NotPrimaryError, OperationFailure, _OperationCancelled from pymongo.hello import Hello -from pymongo.lock import _async_create_lock +from pymongo.lock import _create_lock from pymongo.logger import _SDAM_LOGGER, _debug_log, _SDAMStatusMessage from pymongo.periodic_executor import _shutdown_executors from pymongo.pool_options import _is_faas @@ -277,7 +276,7 @@ async def _check_server(self) -> ServerDescription: await self._reset_connection() if isinstance(error, _OperationCancelled): raise - await self._rtt_monitor.reset() + self._rtt_monitor.reset() # Server type defaults to Unknown. return ServerDescription(address, error=error) @@ -316,9 +315,9 @@ async def _check_once(self) -> ServerDescription: self._cancel_context = conn.cancel_context response, round_trip_time = await self._check_with_socket(conn) if not response.awaitable: - await self._rtt_monitor.add_sample(round_trip_time) + self._rtt_monitor.add_sample(round_trip_time) - avg_rtt, min_rtt = await self._rtt_monitor.get() + avg_rtt, min_rtt = self._rtt_monitor.get() sd = ServerDescription(address, response, avg_rtt, min_round_trip_time=min_rtt) if self._publish: assert self._listeners is not None @@ -414,8 +413,6 @@ def _get_seedlist(self) -> Optional[list[tuple[str, Any]]]: if len(seedlist) == 0: # As per the spec: this should be treated as a failure. raise Exception - except asyncio.CancelledError: - raise except Exception: # As per the spec, upon encountering an error: # - An error must not be raised @@ -444,7 +441,7 @@ def __init__(self, topology: Topology, topology_settings: TopologySettings, pool self._pool = pool self._moving_average = MovingAverage() self._moving_min = MovingMinimum() - self._lock = _async_create_lock() + self._lock = _create_lock() async def close(self) -> None: self.gc_safe_close() @@ -452,20 +449,20 @@ async def close(self) -> None: # thread has the socket checked out, it will be closed when checked in. await self._pool.reset() - async def add_sample(self, sample: float) -> None: + def add_sample(self, sample: float) -> None: """Add a RTT sample.""" - async with self._lock: + with self._lock: self._moving_average.add_sample(sample) self._moving_min.add_sample(sample) - async def get(self) -> tuple[Optional[float], float]: + def get(self) -> tuple[Optional[float], float]: """Get the calculated average, or None if no samples yet and the min.""" - async with self._lock: + with self._lock: return self._moving_average.get(), self._moving_min.get() - async def reset(self) -> None: + def reset(self) -> None: """Reset the average RTT.""" - async with self._lock: + with self._lock: self._moving_average.reset() self._moving_min.reset() @@ -475,12 +472,10 @@ async def _run(self) -> None: # heartbeat protocol (MongoDB 4.4+). # XXX: Skip check if the server is unknown? rtt = await self._ping() - await self.add_sample(rtt) + self.add_sample(rtt) except ReferenceError: # Topology was garbage-collected. await self.close() - except asyncio.CancelledError: - raise except Exception: await self._pool.reset() diff --git a/pymongo/asynchronous/pool.py b/pymongo/asynchronous/pool.py index a37aa3b46a..2fe9579aef 100644 --- a/pymongo/asynchronous/pool.py +++ b/pymongo/asynchronous/pool.py @@ -704,8 +704,6 @@ def _close_conn(self) -> None: # shutdown. try: self.conn.close() - except asyncio.CancelledError: - raise except Exception: # noqa: S110 pass diff --git a/pymongo/network_layer.py b/pymongo/network_layer.py index 377689047b..aa16e85a07 100644 --- a/pymongo/network_layer.py +++ b/pymongo/network_layer.py @@ -271,8 +271,7 @@ async def async_receive_data( ) for task in pending: task.cancel() - if pending: - await asyncio.wait(pending) + await asyncio.wait(pending) if len(done) == 0: raise socket.timeout("timed out") if read_task in done: diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index 055688ab65..badcffe081 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -32,7 +32,6 @@ """ from __future__ import annotations -import asyncio import contextlib import os import warnings @@ -2031,8 +2030,6 @@ def _process_kill_cursors(self) -> None: for address, cursor_id, conn_mgr in pinned_cursors: try: self._cleanup_cursor_lock(cursor_id, address, conn_mgr, None, False) - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: # Raise the exception when client is closed so that it @@ -2047,8 +2044,6 @@ def _process_kill_cursors(self) -> None: for address, cursor_ids in address_to_cursor_ids.items(): try: self._kill_cursors(cursor_ids, address, topology, session=None) - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: raise @@ -2063,8 +2058,6 @@ def _process_periodic_tasks(self) -> None: try: self._process_kill_cursors() self._topology.update_pool() - except asyncio.CancelledError: - raise except Exception as exc: if isinstance(exc, InvalidOperation) and self._topology._closed: return diff --git a/pymongo/synchronous/monitor.py b/pymongo/synchronous/monitor.py index d82a5f976d..a806670f2c 100644 --- a/pymongo/synchronous/monitor.py +++ b/pymongo/synchronous/monitor.py @@ -16,7 +16,6 @@ from __future__ import annotations -import asyncio import atexit import logging import time @@ -414,8 +413,6 @@ def _get_seedlist(self) -> Optional[list[tuple[str, Any]]]: if len(seedlist) == 0: # As per the spec: this should be treated as a failure. raise Exception - except asyncio.CancelledError: - raise except Exception: # As per the spec, upon encountering an error: # - An error must not be raised @@ -479,8 +476,6 @@ def _run(self) -> None: except ReferenceError: # Topology was garbage-collected. self.close() - except asyncio.CancelledError: - raise except Exception: self._pool.reset() diff --git a/pymongo/synchronous/pool.py b/pymongo/synchronous/pool.py index 99201b822e..6ac7b4eca9 100644 --- a/pymongo/synchronous/pool.py +++ b/pymongo/synchronous/pool.py @@ -702,8 +702,6 @@ def _close_conn(self) -> None: # shutdown. try: self.conn.close() - except asyncio.CancelledError: - raise except Exception: # noqa: S110 pass diff --git a/test/__init__.py b/test/__init__.py index dba3312424..c1944f5870 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -17,7 +17,6 @@ import asyncio import gc -import logging import multiprocessing import os import signal @@ -26,7 +25,6 @@ import sys import threading import time -import traceback import unittest import warnings from asyncio import iscoroutinefunction @@ -193,8 +191,6 @@ def _connect(self, host, port, **kwargs): client.close() def _init_client(self): - self.mongoses = [] - self.connection_attempts = [] self.client = self._connect(host, port) if self.client is not None: # Return early when connected to dataLake as mongohoused does not diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index bed49de161..9ca5a32ffc 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -17,7 +17,6 @@ import asyncio import gc -import logging import multiprocessing import os import signal @@ -26,7 +25,6 @@ import sys import threading import time -import traceback import unittest import warnings from asyncio import iscoroutinefunction @@ -193,8 +191,6 @@ async def _connect(self, host, port, **kwargs): await client.close() async def _init_client(self): - self.mongoses = [] - self.connection_attempts = [] self.client = await self._connect(host, port) if self.client is not None: # Return early when connected to dataLake as mongohoused does not diff --git a/test/asynchronous/test_auth_spec.py b/test/asynchronous/test_auth_spec.py index e9e43d5759..a6ab1cb331 100644 --- a/test/asynchronous/test_auth_spec.py +++ b/test/asynchronous/test_auth_spec.py @@ -25,7 +25,7 @@ sys.path[0:0] = [""] from test import unittest -from test.asynchronous.unified_format import generate_test_classes +from test.unified_format import generate_test_classes from pymongo import AsyncMongoClient from pymongo.asynchronous.auth_oidc import OIDCCallback diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 08da00cc1e..873631bbe5 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -35,7 +35,7 @@ async_client_context, unittest, ) -from test.asynchronous.unified_format import generate_test_classes +from test.unified_format import generate_test_classes from test.utils import ( AllowListEventListener, EventListener, diff --git a/test/asynchronous/test_client.py b/test/asynchronous/test_client.py index 292a78d645..47cbff6d5b 100644 --- a/test/asynchronous/test_client.py +++ b/test/asynchronous/test_client.py @@ -2580,7 +2580,7 @@ async def test_direct_client_maintains_pool_to_arbiter(self): await async_wait_until(lambda: len(c.nodes) == 1, "connect") self.assertEqual(await c.address, ("c", 3)) # Assert that we create 1 pooled connection. - await listener.async_wait_for_event(monitoring.ConnectionReadyEvent, 1) + listener.wait_for_event(monitoring.ConnectionReadyEvent, 1) self.assertEqual(listener.event_count(monitoring.ConnectionCreatedEvent), 1) arbiter = c._topology.get_server_by_address(("c", 3)) self.assertEqual(len(arbiter.pool.conns), 1) diff --git a/test/asynchronous/test_connection_logging.py b/test/asynchronous/test_connection_logging.py index 945c6c59b5..6bc9835b70 100644 --- a/test/asynchronous/test_connection_logging.py +++ b/test/asynchronous/test_connection_logging.py @@ -22,7 +22,7 @@ sys.path[0:0] = [""] from test import unittest -from test.asynchronous.unified_format import generate_test_classes +from test.unified_format import generate_test_classes _IS_SYNC = False diff --git a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py index bc9638b443..ffff428379 100644 --- a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py +++ b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py @@ -44,6 +44,9 @@ class TestAsyncConnectionsSurvivePrimaryStepDown(AsyncIntegrationTest): listener: CMAPListener coll: AsyncCollection + async def asyncTearDown(self): + await reset_client_context() + @async_client_context.require_replica_set async def asyncSetUp(self): self.listener = CMAPListener() diff --git a/test/asynchronous/test_create_entities.py b/test/asynchronous/test_create_entities.py index 1f68cf6ddc..cb2ec63f4c 100644 --- a/test/asynchronous/test_create_entities.py +++ b/test/asynchronous/test_create_entities.py @@ -56,9 +56,6 @@ async def test_store_events_as_entities(self): self.assertGreater(len(final_entity_map["events1"]), 0) for event in final_entity_map["events1"]: self.assertIn("PoolCreatedEvent", event["name"]) - if self.scenario_runner.mongos_clients: - for client in self.scenario_runner.mongos_clients: - await client.close() async def test_store_all_others_as_entities(self): self.scenario_runner = UnifiedSpecTestMixinV1() @@ -125,9 +122,6 @@ async def test_store_all_others_as_entities(self): self.assertEqual(entity_map["failures"], []) self.assertEqual(entity_map["successes"], 2) self.assertEqual(entity_map["iterations"], 5) - if self.scenario_runner.mongos_clients: - for client in self.scenario_runner.mongos_clients: - await client.close() if __name__ == "__main__": diff --git a/test/asynchronous/test_crud_unified.py b/test/asynchronous/test_crud_unified.py index e6f42d5bdf..3d8deb36e9 100644 --- a/test/asynchronous/test_crud_unified.py +++ b/test/asynchronous/test_crud_unified.py @@ -22,7 +22,7 @@ sys.path[0:0] = [""] from test import unittest -from test.asynchronous.unified_format import generate_test_classes +from test.unified_format import generate_test_classes _IS_SYNC = False diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index a34741c144..9c88f6ff20 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -46,7 +46,6 @@ unittest, ) from test.asynchronous.test_bulk import AsyncBulkTestBase -from test.asynchronous.unified_format import generate_test_classes from test.asynchronous.utils_spec_runner import AsyncSpecRunner from test.helpers import ( AWS_CREDS, @@ -57,6 +56,7 @@ KMIP_CREDS, LOCAL_MASTER_KEY, ) +from test.unified_format import generate_test_classes from test.utils import ( AllowListEventListener, OvertCommandListener, diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index 9018452b54..189e69a921 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -304,6 +304,7 @@ async def _create_entity(self, entity_spec, uri=None): kwargs["h"] = uri client = await self.test.async_rs_or_single_client(**kwargs) self[spec["id"]] = client + self.test.addAsyncCleanup(client.close) return elif entity_type == "database": client = self[spec["client"]] @@ -529,6 +530,11 @@ async def asyncSetUp(self): # initialize internals self.match_evaluator = MatchEvaluatorUtil(self) + async def asyncTearDown(self): + for client in self.mongos_clients: + await client.close() + await super().asyncTearDown() + def maybe_skip_test(self, spec): # add any special-casing for skipping tests here if async_client_context.storage_engine == "mmapv1": @@ -1036,6 +1042,7 @@ async def _testOperation_targetedFailPoint(self, spec): ) client = await self.async_single_client("{}:{}".format(*session._pinned_address)) + self.addAsyncCleanup(client.close) await self.__set_fail_point(client=client, command_args=spec["failPoint"]) async def _testOperation_createEntities(self, spec): diff --git a/test/asynchronous/utils_spec_runner.py b/test/asynchronous/utils_spec_runner.py index 75aa50b578..f0463244d7 100644 --- a/test/asynchronous/utils_spec_runner.py +++ b/test/asynchronous/utils_spec_runner.py @@ -264,6 +264,8 @@ async def asyncSetUp(self) -> None: async def asyncTearDown(self) -> None: self.knobs.disable() + for client in self.mongos_clients: + await client.close() async def _set_fail_point(self, client, command_args): cmd = SON([("configureFailPoint", "failCommand")]) diff --git a/test/test_connections_survive_primary_stepdown_spec.py b/test/test_connections_survive_primary_stepdown_spec.py index 84ef6decd5..4387850a00 100644 --- a/test/test_connections_survive_primary_stepdown_spec.py +++ b/test/test_connections_survive_primary_stepdown_spec.py @@ -44,6 +44,9 @@ class TestConnectionsSurvivePrimaryStepDown(IntegrationTest): listener: CMAPListener coll: Collection + def tearDown(self): + reset_client_context() + @client_context.require_replica_set def setUp(self): self.listener = CMAPListener() diff --git a/test/test_create_entities.py b/test/test_create_entities.py index 9d77a08eee..ad75fe5702 100644 --- a/test/test_create_entities.py +++ b/test/test_create_entities.py @@ -56,9 +56,6 @@ def test_store_events_as_entities(self): self.assertGreater(len(final_entity_map["events1"]), 0) for event in final_entity_map["events1"]: self.assertIn("PoolCreatedEvent", event["name"]) - if self.scenario_runner.mongos_clients: - for client in self.scenario_runner.mongos_clients: - client.close() def test_store_all_others_as_entities(self): self.scenario_runner = UnifiedSpecTestMixinV1() @@ -125,9 +122,6 @@ def test_store_all_others_as_entities(self): self.assertEqual(entity_map["failures"], []) self.assertEqual(entity_map["successes"], 2) self.assertEqual(entity_map["iterations"], 5) - if self.scenario_runner.mongos_clients: - for client in self.scenario_runner.mongos_clients: - client.close() if __name__ == "__main__": diff --git a/test/unified_format.py b/test/unified_format.py index 8e62ef8e1d..766489fb7c 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -303,6 +303,7 @@ def _create_entity(self, entity_spec, uri=None): kwargs["h"] = uri client = self.test.rs_or_single_client(**kwargs) self[spec["id"]] = client + self.test.addCleanup(client.close) return elif entity_type == "database": client = self[spec["client"]] @@ -528,6 +529,11 @@ def setUp(self): # initialize internals self.match_evaluator = MatchEvaluatorUtil(self) + def tearDown(self): + for client in self.mongos_clients: + client.close() + super().tearDown() + def maybe_skip_test(self, spec): # add any special-casing for skipping tests here if client_context.storage_engine == "mmapv1": @@ -1027,6 +1033,7 @@ def _testOperation_targetedFailPoint(self, spec): ) client = self.single_client("{}:{}".format(*session._pinned_address)) + self.addCleanup(client.close) self.__set_fail_point(client=client, command_args=spec["failPoint"]) def _testOperation_createEntities(self, spec): diff --git a/test/utils_spec_runner.py b/test/utils_spec_runner.py index 3dea4ede1c..682cf0b0f8 100644 --- a/test/utils_spec_runner.py +++ b/test/utils_spec_runner.py @@ -264,6 +264,8 @@ def setUp(self) -> None: def tearDown(self) -> None: self.knobs.disable() + for client in self.mongos_clients: + client.close() def _set_fail_point(self, client, command_args): cmd = SON([("configureFailPoint", "failCommand")])