diff --git a/.evergreen/generated_configs/functions.yml b/.evergreen/generated_configs/functions.yml index df7393de4c..b4fbf28b92 100644 --- a/.evergreen/generated_configs/functions.yml +++ b/.evergreen/generated_configs/functions.yml @@ -111,6 +111,7 @@ functions: - LOAD_BALANCER - LOCAL_ATLAS - NO_EXT + - DISABLE_TEST_COMMANDS - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_SESSION_TOKEN @@ -155,6 +156,8 @@ functions: - IS_WIN32 - REQUIRE_FIPS - TEST_MIN_DEPS + - SYNC + - TEST_CRYPT_SHARED type: test - command: subprocess.exec params: @@ -254,6 +257,7 @@ functions: include_expansions_in_env: - UV_PYTHON - COVERAGE + - IS_WIN32 type: test # Upload coverage codecov diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 4924f05ffb..70855d1285 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -3761,1113 +3761,1325 @@ tasks: - "9.0" # Standard tests - - name: test-standard-v4.4-python3.12-sync-noauth-ssl-replica-set + - name: test-standard-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: "4.4" - UV_PYTHON: "3.12" - TEST_NAME: default_sync + TEST_MIN_DEPS: "1" + SYNC: sync tags: - test-standard - server-4.4 - - python-3.12 - - replica_set-noauth-ssl + - python-3.11 + - standalone-noauth-nossl + - noauth + - macos + - win32 + - win64 - sync - - name: test-standard-v4.4-python3.15t-sync-noauth-ssl-replica-set + - name: test-standard-v7.0-python3.15t-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "7.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" - UV_PYTHON: 3.15t - TEST_NAME: default_sync + VERSION: "7.0" + SYNC: sync tags: - test-standard - - server-4.4 + - server-7.0 - python-3.15t - replica_set-noauth-ssl + - noauth + - macos + - macos-arm64 + - win64 - sync - free-threaded - - name: test-standard-v4.4-python3.13-sync-auth-ssl-sharded-cluster + - name: test-standard-v9.0-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "9.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" - UV_PYTHON: "3.13" - TEST_NAME: default_sync + VERSION: "9.0" + SYNC: async tags: - test-standard - - server-4.4 - - python-3.13 + - server-9.0 + - python-3.15 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v4.4-python3.15-sync-auth-ssl-sharded-cluster + - auth + - macos + - macos-arm64 + - win32 + - win64 + - async + - name: test-standard-v5.0-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" - UV_PYTHON: "3.15" - TEST_NAME: default_sync + VERSION: "5.0" + SYNC: async tags: - test-standard - - server-4.4 + - server-5.0 - python-3.15 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.4" - TEST_MIN_DEPS: "1" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.4" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_sync - tags: - - test-standard - - server-4.4 - - python-3.11 - - standalone-noauth-nossl - - sync - - name: test-standard-v4.4-python3.14-sync-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.4" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.4" - UV_PYTHON: "3.14" - TEST_NAME: default_sync - tags: - - test-standard - - server-4.4 - - python-3.14 - - standalone-noauth-nossl - - sync - - name: test-standard-v5.0-python3.12-async-noauth-ssl-replica-set + - auth + - macos + - win32 + - win64 + - async + - name: test-standard-v6.0-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "5.0" + TOPOLOGY: sharded_cluster + VERSION: "6.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "5.0" - UV_PYTHON: "3.12" - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: async tags: - test-standard - - server-5.0 - - python-3.12 - - replica_set-noauth-ssl + - server-6.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - macos-arm64 + - win32 + - win64 - async - - name: test-standard-v5.0-python3.15t-async-noauth-ssl-replica-set + - name: test-standard-v8.0-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "5.0" + TOPOLOGY: sharded_cluster + VERSION: "8.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "5.0" - UV_PYTHON: 3.15t - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async tags: - test-standard - - server-5.0 - - python-3.15t - - replica_set-noauth-ssl + - server-8.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - macos-arm64 + - win32 + - win64 - async - - free-threaded - - name: test-standard-v5.0-python3.13-async-auth-ssl-sharded-cluster + - name: test-standard-rapid-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: rapid - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" - UV_PYTHON: "3.13" - TEST_NAME: default_async + VERSION: rapid + SYNC: async tags: - test-standard - - server-5.0 - - python-3.13 + - server-rapid + - python-3.15 - sharded_cluster-auth-ssl + - auth + - macos + - macos-arm64 + - win32 + - win64 - async - - name: test-standard-v5.0-python3.15-async-auth-ssl-sharded-cluster + - name: test-standard-latest-python3.15-async-auth-ssl-sharded-cluster-cov commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: latest + COVERAGE: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" - UV_PYTHON: "3.15" - TEST_NAME: default_async + VERSION: latest + COVERAGE: "1" + SYNC: async tags: - test-standard - - server-5.0 + - server-latest - python-3.15 - sharded_cluster-auth-ssl + - auth + - macos + - macos-arm64 + - win32 + - win64 - async - - name: test-standard-v5.0-python3.11-async-noauth-nossl-standalone-min-deps + - cov + + # String query preview tests + - name: test-string-query-preview-v8.2-python3.15-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "5.0" - TEST_MIN_DEPS: "1" + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.2" - func: run tests vars: AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "5.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.2" + UV_PYTHON: "3.15" tags: - - test-standard - - server-5.0 - - python-3.11 - - standalone-noauth-nossl - - async - - name: test-standard-v5.0-python3.14-async-noauth-nossl-standalone + - test-string-query-preview + - server-8.2 + - python-3.15 + - replica_set-noauth-ssl + - noauth + + # Test compression tests + - name: test-compression-snappy-latest-python3.15-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "5.0" + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "5.0" - UV_PYTHON: "3.14" - TEST_NAME: default_async + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + SYNC: sync + COMPRESSORS: snappy tags: - - test-standard - - server-5.0 - - python-3.14 - - standalone-noauth-nossl - - async - - name: test-standard-v6.0-python3.11-sync-noauth-ssl-replica-set-min-deps + - test-compression + - server-latest + - python-3.15 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-compression-zlib-latest-python3.15-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" - TEST_MIN_DEPS: "1" + VERSION: latest - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_sync + VERSION: latest + SYNC: sync + COMPRESSORS: zlib tags: - - test-standard - - server-6.0 - - python-3.11 + - test-compression + - server-latest + - python-3.15 - replica_set-noauth-ssl + - noauth - sync - - name: test-standard-v6.0-python3.14-sync-noauth-ssl-replica-set + - name: test-compression-zstd-latest-python3.15-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: latest - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" - UV_PYTHON: "3.14" - TEST_NAME: default_sync + VERSION: latest + SYNC: sync + COMPRESSORS: zstd tags: - - test-standard - - server-6.0 - - python-3.14 + - test-compression + - server-latest + - python-3.15 - replica_set-noauth-ssl + - noauth - sync - - name: test-standard-v6.0-python3.12-sync-auth-ssl-sharded-cluster + - name: test-compression-snappy-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" + VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" - UV_PYTHON: "3.12" - TEST_NAME: default_sync + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-6.0 - - python-3.12 + - test-compression + - server-4.4 + - python-3.11 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v6.0-python3.15t-sync-auth-ssl-sharded-cluster + - auth + - async + - name: test-compression-snappy-v5.0-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" + VERSION: "5.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" - UV_PYTHON: 3.15t - TEST_NAME: default_sync + VERSION: "5.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-6.0 - - python-3.15t + - test-compression + - server-5.0 + - python-3.12 - sharded_cluster-auth-ssl - - sync - - free-threaded - - name: test-standard-v6.0-python3.14t-sync-noauth-nossl-standalone + - auth + - async + - name: test-compression-snappy-v6.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "6.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "6.0" - UV_PYTHON: 3.14t - TEST_NAME: default_sync + SYNC: async + COMPRESSORS: snappy tags: - - test-standard + - test-compression - server-6.0 - - python-3.14t - - standalone-noauth-nossl - - sync - - free-threaded - - name: test-standard-v7.0-python3.11-async-noauth-ssl-replica-set-min-deps + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-compression-snappy-v7.0-python3.14t-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster VERSION: "7.0" - TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: 3.14t + AUTH: auth SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster VERSION: "7.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + SYNC: async + COMPRESSORS: snappy tags: - - test-standard + - test-compression - server-7.0 - - python-3.11 - - replica_set-noauth-ssl + - python-3.14t + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.14-async-noauth-ssl-replica-set + - free-threaded + - name: test-compression-snappy-v8.0-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" + TOPOLOGY: sharded_cluster + VERSION: "8.0" - func: run tests vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" + TEST_NAME: default UV_PYTHON: "3.14" - TEST_NAME: default_async + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 + - test-compression + - server-8.0 - python-3.14 - - replica_set-noauth-ssl + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.12-async-auth-ssl-sharded-cluster + - name: test-compression-snappy-v9.0-python3.15t-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "9.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" - UV_PYTHON: "3.12" - TEST_NAME: default_async + VERSION: "9.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 - - python-3.12 + - test-compression + - server-9.0 + - python-3.15t - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.15t-async-auth-ssl-sharded-cluster + - free-threaded + - name: test-compression-snappy-rapid-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: rapid - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" - UV_PYTHON: 3.15t - TEST_NAME: default_async + VERSION: rapid + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 - - python-3.15t + - test-compression + - server-rapid + - python-3.15 - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-v7.0-python3.14t-async-noauth-nossl-standalone + - name: test-compression-zlib-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "7.0" + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "7.0" - UV_PYTHON: 3.14t - TEST_NAME: default_async + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-7.0 - - python-3.14t - - standalone-noauth-nossl + - test-compression + - server-4.4 + - python-3.11 + - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-v8.0-python3.14t-sync-noauth-ssl-replica-set + - name: test-compression-zlib-v5.0-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.0" + TOPOLOGY: sharded_cluster + VERSION: "5.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.0" - UV_PYTHON: 3.14t - TEST_NAME: default_sync + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 - - python-3.14t - - replica_set-noauth-ssl - - sync - - free-threaded - - name: test-standard-v8.0-python3.11-sync-auth-ssl-sharded-cluster-min-deps + - test-compression + - server-5.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-compression-zlib-v6.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" - TEST_MIN_DEPS: "1" + VERSION: "6.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_sync + VERSION: "6.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 - - python-3.11 + - test-compression + - server-6.0 + - python-3.13 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v8.0-python3.14-sync-auth-ssl-sharded-cluster + - auth + - async + - name: test-compression-zlib-v7.0-python3.14t-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" + VERSION: "7.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.14t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" - UV_PYTHON: "3.14" - TEST_NAME: default_sync + VERSION: "7.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 - - python-3.14 + - test-compression + - server-7.0 + - python-3.14t - sharded_cluster-auth-ssl - - sync - - name: test-standard-v8.0-python3.13-sync-noauth-nossl-standalone + - auth + - async + - free-threaded + - name: test-compression-zlib-v8.0-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "8.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "8.0" - UV_PYTHON: "3.13" - TEST_NAME: default_sync + SYNC: async + COMPRESSORS: zlib tags: - - test-standard + - test-compression - server-8.0 - - python-3.13 - - standalone-noauth-nossl - - sync - - name: test-standard-v8.0-python3.15-sync-noauth-nossl-standalone + - python-3.14 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-compression-zlib-v9.0-python3.15t-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" - UV_PYTHON: "3.15" - TEST_NAME: default_sync - tags: - - test-standard - - server-8.0 - - python-3.15 - - standalone-noauth-nossl - - sync - - name: test-standard-v9.0-python3.14t-async-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - - func: run tests - vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster VERSION: "9.0" - UV_PYTHON: 3.14t - TEST_NAME: default_async + SYNC: async + COMPRESSORS: zlib tags: - - test-standard + - test-compression - server-9.0 - - python-3.14t - - replica_set-noauth-ssl + - python-3.15t + - sharded_cluster-auth-ssl + - auth - async - free-threaded - - name: test-standard-v9.0-python3.15-async-noauth-ssl-replica-set-cov + - name: test-compression-zlib-rapid-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - COVERAGE: "1" + TOPOLOGY: sharded_cluster + VERSION: rapid - func: run tests vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - COVERAGE: "1" + TEST_NAME: default UV_PYTHON: "3.15" - TEST_NAME: default_async + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-9.0 + - test-compression + - server-rapid - python-3.15 - - replica_set-noauth-ssl + - sharded_cluster-auth-ssl + - auth - async - - pr - - name: test-standard-v9.0-python3.11-async-auth-ssl-sharded-cluster-min-deps + - name: test-compression-zstd-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" + VERSION: "4.4" TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" + VERSION: "4.4" TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 + - test-compression + - server-4.4 - python-3.11 - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.14-async-auth-ssl-sharded-cluster + - name: test-compression-zstd-v5.0-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" + VERSION: "5.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" - UV_PYTHON: "3.14" - TEST_NAME: default_async + VERSION: "5.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.14 + - test-compression + - server-5.0 + - python-3.12 - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.15t-sync-auth-ssl-sharded-cluster-cov + - name: test-compression-zstd-v6.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" - COVERAGE: "1" + VERSION: "6.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" - COVERAGE: "1" - UV_PYTHON: 3.15t - TEST_NAME: default_sync + VERSION: "6.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.15t + - test-compression + - server-6.0 + - python-3.13 - sharded_cluster-auth-ssl - - sync + - auth + - async + - name: test-compression-zstd-v7.0-python3.14t-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.14t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SYNC: async + COMPRESSORS: zstd + tags: + - test-compression + - server-7.0 + - python-3.14t + - sharded_cluster-auth-ssl + - auth + - async - free-threaded - - pr - - name: test-standard-v9.0-python3.11-async-noauth-nossl-standalone-min-deps-cov + - name: test-compression-zstd-v8.0-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "9.0" - TEST_MIN_DEPS: "1" - COVERAGE: "1" + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "9.0" - TEST_MIN_DEPS: "1" - COVERAGE: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.11 - - standalone-noauth-nossl + - test-compression + - server-8.0 + - python-3.14 + - sharded_cluster-auth-ssl + - auth - async - - pr - - name: test-standard-v9.0-python3.13-async-noauth-nossl-standalone + - name: test-compression-zstd-v9.0-python3.15t-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "9.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "9.0" - UV_PYTHON: "3.13" - TEST_NAME: default_async + SYNC: async + COMPRESSORS: zstd tags: - - test-standard + - test-compression - server-9.0 - - python-3.13 - - standalone-noauth-nossl + - python-3.15t + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.15-async-noauth-nossl-standalone + - free-threaded + - name: test-compression-zstd-rapid-python3.15-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "9.0" + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "9.0" + TEST_NAME: default UV_PYTHON: "3.15" - TEST_NAME: default_async + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 + - test-compression + - server-rapid - python-3.15 - - standalone-noauth-nossl + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-latest-python3.13-async-noauth-ssl-replica-set-cov + + # Test disable test commands tests + - name: test-disable-test-commands-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.13" - TEST_NAME: default_async + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" + SYNC: sync tags: - - test-standard - - server-latest - - python-3.13 - - replica_set-noauth-ssl - - async - - name: test-standard-latest-python3.15-async-noauth-ssl-replica-set-cov + - test-disable-test-commands + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - sync + - name: test-disable-test-commands-v5.0-python3.12-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" + VERSION: "5.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.15" - TEST_NAME: default_async + VERSION: "5.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard - - server-latest - - python-3.15 + - test-disable-test-commands + - server-5.0 + - python-3.12 - replica_set-noauth-ssl - - async - - name: test-standard-latest-python3.14t-async-auth-ssl-sharded-cluster-cov + - noauth + - sync + - name: test-disable-test-commands-v6.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: latest - COVERAGE: "1" + VERSION: "6.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: latest - COVERAGE: "1" - UV_PYTHON: 3.14t - TEST_NAME: default_async + VERSION: "6.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: async tags: - - test-standard - - server-latest - - python-3.14t + - test-disable-test-commands + - server-6.0 + - python-3.13 - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-latest-python3.12-async-noauth-nossl-standalone-cov + - name: test-disable-test-commands-v7.0-python3.14t-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" + VERSION: "7.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.14t AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.12" - TEST_NAME: default_async + VERSION: "7.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard - - server-latest - - python-3.12 + - test-disable-test-commands + - server-7.0 + - python-3.14t - standalone-noauth-nossl - - async - - name: test-standard-latest-python3.15t-async-noauth-nossl-standalone-cov + - noauth + - sync + - free-threaded + - name: test-disable-test-commands-v8.0-python3.14-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync + tags: + - test-disable-test-commands + - server-8.0 + - python-3.14 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-disable-test-commands-v9.0-python3.15t-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + DISABLE_TEST_COMMANDS: "1" + - func: run tests + vars: + TEST_NAME: default UV_PYTHON: 3.15t - TEST_NAME: default_async + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: async tags: - - test-standard - - server-latest + - test-disable-test-commands + - server-9.0 - python-3.15t - - standalone-noauth-nossl + - sharded_cluster-auth-ssl + - auth - async - free-threaded - - name: test-standard-rapid-python3.13-sync-noauth-ssl-replica-set + - name: test-disable-test-commands-rapid-python3.15-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: rapid + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: rapid - UV_PYTHON: "3.13" - TEST_NAME: default_sync + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard + - test-disable-test-commands - server-rapid - - python-3.13 - - replica_set-noauth-ssl + - python-3.15 + - standalone-noauth-nossl + - noauth - sync - - name: test-standard-rapid-python3.15-sync-noauth-ssl-replica-set + - name: test-disable-test-commands-latest-python3.11-sync-noauth-ssl-replica-set-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid + VERSION: latest + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid - UV_PYTHON: "3.15" - TEST_NAME: default_sync + VERSION: latest + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" + SYNC: sync tags: - - test-standard - - server-rapid - - python-3.15 + - test-disable-test-commands + - server-latest + - python-3.11 - replica_set-noauth-ssl + - noauth - sync - - name: test-standard-rapid-python3.14t-sync-auth-ssl-sharded-cluster + + # Test doctest tests + - name: test-doctest-v4.4-python3.11-noauth-nossl-standalone-min-deps commands: - func: run server vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid + TEST_NAME: doctest + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid - UV_PYTHON: 3.14t - TEST_NAME: default_sync + TEST_NAME: doctest + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" tags: - - test-standard - - server-rapid - - python-3.14t - - sharded_cluster-auth-ssl - - sync - - free-threaded - - name: test-standard-rapid-python3.12-sync-noauth-nossl-standalone + - test-doctest + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - name: test-doctest-v5.0-python3.12-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: "5.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.12" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid - UV_PYTHON: "3.12" - TEST_NAME: default_sync + VERSION: "5.0" tags: - - test-standard - - server-rapid + - test-doctest + - server-5.0 - python-3.12 - standalone-noauth-nossl - - sync - - name: test-standard-rapid-python3.15t-sync-noauth-nossl-standalone + - noauth + - name: test-doctest-v6.0-python3.13-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: "6.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.13" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid - UV_PYTHON: 3.15t - TEST_NAME: default_sync + VERSION: "6.0" tags: - - test-standard - - server-rapid - - python-3.15t + - test-doctest + - server-6.0 + - python-3.13 - standalone-noauth-nossl - - sync + - noauth + - name: test-doctest-v7.0-python3.14t-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: doctest + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: doctest + UV_PYTHON: 3.14t + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + tags: + - test-doctest + - server-7.0 + - python-3.14t + - standalone-noauth-nossl + - noauth - free-threaded - - # String query preview tests - - name: test-string-query-preview-v8.2-python3.15-noauth-ssl-replica-set + - name: test-doctest-v8.0-python3.14-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.2" + SSL: nossl + TOPOLOGY: standalone + VERSION: "8.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.14" AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.2" - UV_PYTHON: "3.15" + SSL: nossl + TOPOLOGY: standalone + VERSION: "8.0" tags: - - test-string-query-preview - - server-8.2 - - python-3.15 - - replica_set-noauth-ssl + - test-doctest + - server-8.0 + - python-3.14 + - standalone-noauth-nossl - noauth - - # Test non standard tests - - name: test-non-standard-v4.4-python3.12-noauth-ssl-replica-set + - name: test-doctest-v9.0-python3.15t-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "4.4" + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: 3.15t AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "4.4" - UV_PYTHON: "3.12" + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" tags: - - test-non-standard - - server-4.4 - - python-3.12 - - replica_set-noauth-ssl + - test-doctest + - server-9.0 + - python-3.15t + - standalone-noauth-nossl - noauth - - name: test-non-standard-v4.4-python3.13-auth-ssl-sharded-cluster + - free-threaded + - name: test-doctest-rapid-python3.15-noauth-nossl-standalone commands: - func: run server vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.4" + TEST_NAME: doctest + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid - func: run tests vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.4" - UV_PYTHON: "3.13" + TEST_NAME: doctest + UV_PYTHON: "3.15" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid tags: - - test-non-standard - - server-4.4 - - python-3.13 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v4.4-python3.11-noauth-nossl-standalone-min-deps + - test-doctest + - server-rapid + - python-3.15 + - standalone-noauth-nossl + - noauth + - name: test-doctest-latest-python3.11-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: doctest + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: doctest + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + TEST_MIN_DEPS: "1" + tags: + - test-doctest + - server-latest + - python-3.11 + - standalone-noauth-nossl + - noauth + + # Test encryption pyopenssl tests + - name: test-encryption-pyopenssl-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps commands: - func: run server vars: + TEST_NAME: encryption AUTH: noauth SSL: nossl TOPOLOGY: standalone @@ -4875,565 +5087,2255 @@ tasks: TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.4" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" + TEST_NAME: encryption + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SUB_TEST_NAME: pyopenssl + SYNC: sync + tags: + - test-encryption-pyopenssl + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - rhel8 + - sync + - name: test-encryption-pyopenssl-v7.0-python3.15t-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: 3.15t + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + SUB_TEST_NAME: pyopenssl + SYNC: sync + tags: + - test-encryption-pyopenssl + - server-7.0 + - python-3.15t + - replica_set-noauth-ssl + - noauth + - rhel8 + - sync + - free-threaded + - name: test-encryption-pyopenssl-v9.0-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - pr + - cov + - name: test-encryption-pyopenssl-v5.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-5.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - name: test-encryption-pyopenssl-v6.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-6.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - name: test-encryption-pyopenssl-v8.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-8.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - name: test-encryption-pyopenssl-rapid-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-rapid + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - name: test-encryption-pyopenssl-latest-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-encryption-pyopenssl + - server-latest + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - cov + + # Test encryption tests + - name: test-encryption-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: sync + tags: + - test-encryption + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - rhel8 + - macos + - win64 + - sync + - name: test-encryption-v7.0-python3.15t-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: 3.15t + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + SYNC: sync + tags: + - test-encryption + - server-7.0 + - python-3.15t + - replica_set-noauth-ssl + - noauth + - rhel8 + - macos + - win64 + - sync + - free-threaded + - name: test-encryption-v9.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + SYNC: async + tags: + - test-encryption + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - win64 + - async + - name: test-encryption-v9.0-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: async + tags: + - test-encryption + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - pr + - cov + - name: test-encryption-v5.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SYNC: async + tags: + - test-encryption + - server-5.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-encryption-v6.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: async + tags: + - test-encryption + - server-6.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-encryption-v8.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async + tags: + - test-encryption + - server-8.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-encryption-rapid-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + tags: + - test-encryption + - server-rapid + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-encryption-latest-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + SYNC: async + tags: + - test-encryption + - server-latest + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - win64 + - async + - name: test-encryption-latest-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + SYNC: async + tags: + - test-encryption + - server-latest + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - cov + - name: test-encryption-crypt-shared-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_CRYPT_SHARED: "true" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_CRYPT_SHARED: "true" + TEST_MIN_DEPS: "1" + SYNC: sync + tags: + - test-encryption + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - rhel8 + - macos + - win64 + - sync + - crypt-shared + - name: test-encryption-crypt-shared-v7.0-python3.15t-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: 3.15t + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "7.0" + TEST_CRYPT_SHARED: "true" + SYNC: sync + tags: + - test-encryption + - server-7.0 + - python-3.15t + - replica_set-noauth-ssl + - noauth + - rhel8 + - macos + - win64 + - sync + - free-threaded + - crypt-shared + - name: test-encryption-crypt-shared-v9.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-v9.0-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_CRYPT_SHARED: "true" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_CRYPT_SHARED: "true" + COVERAGE: "1" + SYNC: async + tags: + - test-encryption + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - pr + - crypt-shared + - cov + - name: test-encryption-crypt-shared-v5.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-5.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-v6.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-6.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-v8.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-8.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-rapid-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-rapid + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-latest-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + TEST_CRYPT_SHARED: "true" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + TEST_CRYPT_SHARED: "true" + SYNC: async + tags: + - test-encryption + - server-latest + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - macos + - win64 + - async + - crypt-shared + - name: test-encryption-crypt-shared-latest-python3.15-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: encryption + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + TEST_CRYPT_SHARED: "true" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: encryption + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + TEST_CRYPT_SHARED: "true" + COVERAGE: "1" + SYNC: async + tags: + - test-encryption + - server-latest + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - async + - crypt-shared + - cov + + # Test gevent tests + - name: test-gevent-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - sync + - name: test-gevent-v5.0-python3.12-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-5.0 + - python-3.12 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-gevent-v6.0-python3.13-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-6.0 + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-gevent-v7.0-python3.14-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-7.0 + - python-3.14 + - standalone-noauth-nossl + - noauth + - sync + - name: test-gevent-v8.0-python3.15-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-8.0 + - python-3.15 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-gevent-v9.0-python3.11-sync-auth-ssl-sharded-cluster-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_MIN_DEPS: "1" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-9.0 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-gevent-rapid-python3.12-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-rapid + - python-3.12 + - standalone-noauth-nossl + - noauth + - sync + - name: test-gevent-latest-python3.13-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-latest + - python-3.13 + - replica_set-noauth-ssl + - noauth + - sync + + # Test load balancer tests + - name: test-load-balancer-v6.0-python3.11-sync-auth-ssl-sharded-cluster-min-deps + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_MIN_DEPS: "1" + SYNC: sync + tags: + - test-load-balancer + - server-6.0 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-load-balancer-v7.0-python3.12-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.12" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SYNC: sync + tags: + - test-load-balancer + - server-7.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-load-balancer-v8.0-python3.13-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: sync + tags: + - test-load-balancer + - server-8.0 + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-load-balancer-v9.0-python3.14t-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.14t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + SYNC: sync + tags: + - test-load-balancer + - server-9.0 + - python-3.14t + - sharded_cluster-auth-ssl + - auth + - sync + - free-threaded + - name: test-load-balancer-rapid-python3.14-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.14" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: sync + tags: + - test-load-balancer + - server-rapid + - python-3.14 + - sharded_cluster-auth-ssl + - auth + - sync + - name: test-load-balancer-latest-python3.15t-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.15t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + SYNC: sync + tags: + - test-load-balancer + - server-latest + - python-3.15t + - sharded_cluster-auth-ssl + - auth + - sync + - free-threaded + - cov + - name: test-load-balancer-v6.0-python3.11-async-auth-ssl-sharded-cluster-min-deps + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + TEST_MIN_DEPS: "1" + SYNC: async + tags: + - test-load-balancer + - server-6.0 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-load-balancer-v7.0-python3.12-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.12" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SYNC: async + tags: + - test-load-balancer + - server-7.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-load-balancer-v8.0-python3.13-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async + tags: + - test-load-balancer + - server-8.0 + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-load-balancer-v9.0-python3.14t-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.14t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + SYNC: async + tags: + - test-load-balancer + - server-9.0 + - python-3.14t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - name: test-load-balancer-rapid-python3.14-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: "3.14" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + tags: + - test-load-balancer + - server-rapid + - python-3.14 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-load-balancer-latest-python3.15t-async-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.15t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + COVERAGE: "1" + SYNC: async + tags: + - test-load-balancer + - server-latest + - python-3.15t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - cov + + # Test no c ext tests + - name: test-no-c-ext-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - sync + - name: test-no-c-ext-v5.0-python3.12-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-5.0 + - python-3.12 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-no-c-ext-v6.0-python3.13-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: async + NO_EXT: "1" + tags: + - test-no-c-ext + - server-6.0 + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-no-c-ext-v7.0-python3.14t-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.14t + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-7.0 + - python-3.14t + - standalone-noauth-nossl + - noauth + - sync + - free-threaded + - name: test-no-c-ext-v8.0-python3.14-sync-noauth-ssl-replica-set + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-8.0 + - python-3.14 + - replica_set-noauth-ssl + - noauth + - sync + - name: test-no-c-ext-v9.0-python3.15t-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + SYNC: async + NO_EXT: "1" + tags: + - test-no-c-ext + - server-9.0 + - python-3.15t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - name: test-no-c-ext-rapid-python3.15-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-rapid + - python-3.15 + - standalone-noauth-nossl + - noauth + - sync + - name: test-no-c-ext-latest-python3.11-sync-noauth-ssl-replica-set-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + TEST_MIN_DEPS: "1" + SYNC: sync + NO_EXT: "1" + tags: + - test-no-c-ext + - server-latest + - python-3.11 + - replica_set-noauth-ssl + - noauth + - sync + + # Test numpy tests + - name: test-numpy-python3.11-python3.11 + commands: + - func: test numpy + vars: + UV_PYTHON: "3.11" + tags: + - binary + - vector + - python-3.11 + - test-numpy + - name: test-numpy-win32-python3.11-python3.11 + commands: + - func: test numpy + vars: + UV_PYTHON: "3.11" + IS_WIN32: "1" + tags: + - binary + - vector + - python-3.11 + - test-numpy-win32 + - name: test-numpy-python3.15-python3.15-cov + commands: + - func: test numpy + vars: + UV_PYTHON: "3.15" + COVERAGE: "1" + tags: + - binary + - vector + - python-3.15 + - test-numpy + - pr + - name: test-numpy-win32-python3.15-python3.15 + commands: + - func: test numpy + vars: + UV_PYTHON: "3.15" + IS_WIN32: "1" + tags: + - binary + - vector + - python-3.15 + - test-numpy-win32 + + # Test pyopenssl tests + - name: test-pyopenssl-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-4.4 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-v5.0-python3.12-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-5.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-v6.0-python3.13-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-6.0 + - python-3.13 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-v7.0-python3.14-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-7.0 + - python-3.14 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-v8.0-python3.15-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-8.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-v9.0-python3.11-async-auth-ssl-sharded-cluster-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + TEST_MIN_DEPS: "1" + SUB_TEST_NAME: pyopenssl + SYNC: async + tags: + - test-pyopenssl + - server-9.0 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-rapid-python3.12-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SUB_TEST_NAME: pyopenssl + SYNC: async tags: - - test-non-standard - - server-4.4 - - python-3.11 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-v5.0-python3.14-noauth-ssl-replica-set + - test-pyopenssl + - server-rapid + - python-3.12 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - macos + - win64 + - async + - name: test-pyopenssl-latest-python3.13-sync-noauth-ssl-replica-set commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: latest - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" - UV_PYTHON: "3.14" + VERSION: latest + SUB_TEST_NAME: pyopenssl + SYNC: sync tags: - - test-non-standard - - server-5.0 - - python-3.14 + - test-pyopenssl + - server-latest + - python-3.13 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v5.0-python3.15t-auth-ssl-sharded-cluster + - rhel8 + - macos + - win64 + - sync + + # Test stable api tests + - name: test-stable-api-require-v1-v5.0-python3.11-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - UV_PYTHON: 3.15t + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + TEST_MIN_DEPS: "1" + SYNC: async tags: - - test-non-standard + - test-stable-api - server-5.0 - - python-3.15t + - python-3.11 - sharded_cluster-auth-ssl - auth - - free-threaded - - name: test-non-standard-v5.0-python3.14t-noauth-nossl-standalone + - async + - name: test-stable-api-accept-v2-v5.0-python3.11-sync-noauth-nossl-standalone-min-deps commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "5.0" + ORCHESTRATION_FILE: versioned-api-testing.json + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "5.0" - UV_PYTHON: 3.14t - tags: - - test-non-standard - - server-5.0 - - python-3.14t - - standalone-noauth-nossl - - noauth - - free-threaded - - name: test-non-standard-v6.0-python3.11-noauth-ssl-replica-set-min-deps - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" - TEST_MIN_DEPS: "1" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" + ORCHESTRATION_FILE: versioned-api-testing.json TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" + SYNC: sync tags: - - test-non-standard - - server-6.0 + - test-stable-api + - server-5.0 - python-3.11 - - replica_set-noauth-ssl + - standalone-noauth-nossl - noauth - - name: test-non-standard-v6.0-python3.12-auth-ssl-sharded-cluster + - sync + - name: test-stable-api-require-v1-v6.0-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - UV_PYTHON: "3.12" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + SYNC: async tags: - - test-non-standard + - test-stable-api - server-6.0 - python-3.12 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v6.0-python3.15-noauth-nossl-standalone + - async + - name: test-stable-api-accept-v2-v6.0-python3.12-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "6.0" + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "6.0" - UV_PYTHON: "3.15" + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard + - test-stable-api - server-6.0 - - python-3.15 + - python-3.12 - standalone-noauth-nossl - noauth - - name: test-non-standard-v7.0-python3.14t-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" - UV_PYTHON: 3.14t - tags: - - test-non-standard - - server-7.0 - - python-3.14t - - replica_set-noauth-ssl - - noauth - - free-threaded - - name: test-non-standard-v7.0-python3.14-auth-ssl-sharded-cluster + - sync + - name: test-stable-api-require-v1-v7.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - UV_PYTHON: "3.14" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + SYNC: async tags: - - test-non-standard + - test-stable-api - server-7.0 - - python-3.14 + - python-3.13 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v7.0-python3.13-noauth-nossl-standalone + - async + - name: test-stable-api-accept-v2-v7.0-python3.13-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "7.0" + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.13" AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - UV_PYTHON: "3.13" + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard + - test-stable-api - server-7.0 - python-3.13 - standalone-noauth-nossl - noauth - - name: test-non-standard-v8.0-python3.15-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.0" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.0" - UV_PYTHON: "3.15" - tags: - - test-non-standard - - server-8.0 - - python-3.15 - - replica_set-noauth-ssl - - noauth - - name: test-non-standard-v8.0-python3.11-auth-ssl-sharded-cluster-min-deps + - sync + - name: test-stable-api-require-v1-v8.0-python3.14t-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TEST_MIN_DEPS: "1" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.14t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + SYNC: async tags: - - test-non-standard + - test-stable-api - server-8.0 - - python-3.11 + - python-3.14t - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v8.0-python3.15t-noauth-nossl-standalone + - async + - free-threaded + - name: test-stable-api-accept-v2-v8.0-python3.14t-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "8.0" + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.14t AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - UV_PYTHON: 3.15t + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard + - test-stable-api - server-8.0 - - python-3.15t + - python-3.14t - standalone-noauth-nossl - noauth + - sync - free-threaded - - name: test-non-standard-v9.0-python3.13-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - UV_PYTHON: "3.13" - tags: - - test-non-standard - - server-9.0 - - python-3.13 - - replica_set-noauth-ssl - - noauth - - name: test-non-standard-v9.0-python3.14t-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "9.0" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "9.0" - UV_PYTHON: 3.14t - tags: - - test-non-standard - - server-9.0 - - python-3.14t - - sharded_cluster-auth-ssl - - auth - - free-threaded - - name: test-non-standard-v9.0-python3.15-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "9.0" - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "9.0" - COVERAGE: "1" - UV_PYTHON: "3.15" - tags: - - test-non-standard - - server-9.0 - - python-3.15 - - sharded_cluster-auth-ssl - - auth - - pr - - cov - - name: test-non-standard-v9.0-python3.15-auth-ssl-sharded-cluster + - name: test-stable-api-require-v1-v9.0-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "9.0" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "9.0" - UV_PYTHON: "3.15" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + SYNC: async tags: - - test-non-standard-no-cov + - test-stable-api - server-9.0 - - python-3.15 + - python-3.14 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v9.0-python3.12-noauth-nossl-standalone + - async + - name: test-stable-api-accept-v2-v9.0-python3.14-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "9.0" + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "9.0" - UV_PYTHON: "3.12" + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard + - test-stable-api - server-9.0 - - python-3.12 + - python-3.14 - standalone-noauth-nossl - - noauth - - name: test-non-standard-latest-python3.12-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - UV_PYTHON: "3.12" - tags: - - test-non-standard - - server-latest - - python-3.12 - - replica_set-noauth-ssl - - noauth - - name: test-non-standard-latest-python3.13-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: latest - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.13" - tags: - - test-non-standard - - server-latest - - python-3.13 - - sharded_cluster-auth-ssl - - auth - - cov - - name: test-non-standard-latest-python3.13-auth-ssl-sharded-cluster + - noauth + - sync + - name: test-stable-api-require-v1-rapid-python3.15t-async-auth-ssl-sharded-cluster commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: latest + VERSION: rapid + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: latest - UV_PYTHON: "3.13" + VERSION: rapid + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + SYNC: async tags: - - test-non-standard-no-cov - - server-latest - - python-3.13 + - test-stable-api + - server-rapid + - python-3.15t - sharded_cluster-auth-ssl - auth - - name: test-non-standard-latest-python3.11-noauth-nossl-standalone-min-deps + - async + - free-threaded + - name: test-stable-api-accept-v2-rapid-python3.15t-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - TEST_MIN_DEPS: "1" + VERSION: rapid + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - tags: - - test-non-standard - - server-latest - - python-3.11 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-rapid-python3.15t-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set VERSION: rapid - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid - UV_PYTHON: 3.15t + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard + - test-stable-api - server-rapid - python-3.15t - - replica_set-noauth-ssl + - standalone-noauth-nossl - noauth + - sync - free-threaded - - name: test-non-standard-rapid-python3.15-auth-ssl-sharded-cluster + - name: test-stable-api-require-v1-latest-python3.15-async-auth-ssl-sharded-cluster-cov commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: rapid + VERSION: latest + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + COVERAGE: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: rapid - UV_PYTHON: "3.15" + VERSION: latest + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" + COVERAGE: "1" + SYNC: async tags: - - test-non-standard - - server-rapid + - test-stable-api + - server-latest - python-3.15 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-rapid-python3.14-noauth-nossl-standalone + - async + - cov + - name: test-stable-api-accept-v2-latest-python3.15-sync-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: latest + ORCHESTRATION_FILE: versioned-api-testing.json - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.15" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid - UV_PYTHON: "3.14" + VERSION: latest + ORCHESTRATION_FILE: versioned-api-testing.json + SYNC: sync tags: - - test-non-standard - - server-rapid - - python-3.14 + - test-stable-api + - server-latest + - python-3.15 - standalone-noauth-nossl - noauth - - # Test numpy tests - - name: test-numpy-python3.11-python3.11 - commands: - - func: test numpy - vars: - UV_PYTHON: "3.11" - tags: - - binary - - vector - - python-3.11 - - test-numpy - - name: test-numpy-python3.15-python3.15-cov - commands: - - func: test numpy - vars: - UV_PYTHON: "3.15" - COVERAGE: "1" - tags: - - binary - - vector - - python-3.15 - - test-numpy - - pr + - sync # Test standard auth tests - name: test-standard-auth-v4.4-python3.11-auth-ssl-sharded-cluster-min-deps @@ -5660,3 +7562,227 @@ tasks: - python-3.15 - sharded_cluster-auth-ssl - auth + + # Test storage inmemory tests + - name: test-storage-inmemory-v4.4-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + STORAGE_ENGINE: inmemory + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "4.4" + STORAGE_ENGINE: inmemory + TEST_MIN_DEPS: "1" + SYNC: sync + tags: + - test-storage-inmemory + - server-4.4 + - python-3.11 + - standalone-noauth-nossl + - noauth + - sync + - name: test-storage-inmemory-v5.0-python3.12-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "5.0" + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.12" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "5.0" + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-5.0 + - python-3.12 + - standalone-noauth-nossl + - noauth + - sync + - name: test-storage-inmemory-v6.0-python3.13-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "6.0" + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "6.0" + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-6.0 + - python-3.13 + - standalone-noauth-nossl + - noauth + - sync + - name: test-storage-inmemory-v7.0-python3.14t-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.14t + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-7.0 + - python-3.14t + - standalone-noauth-nossl + - noauth + - sync + - free-threaded + - name: test-storage-inmemory-v8.0-python3.14-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "8.0" + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "8.0" + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-8.0 + - python-3.14 + - standalone-noauth-nossl + - noauth + - sync + - name: test-storage-inmemory-v9.0-python3.15t-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-9.0 + - python-3.15t + - standalone-noauth-nossl + - noauth + - sync + - free-threaded + - name: test-storage-inmemory-rapid-python3.15-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + STORAGE_ENGINE: inmemory + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + STORAGE_ENGINE: inmemory + SYNC: sync + tags: + - test-storage-inmemory + - server-rapid + - python-3.15 + - standalone-noauth-nossl + - noauth + - sync + - name: test-storage-inmemory-latest-python3.11-sync-noauth-nossl-standalone-min-deps + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + STORAGE_ENGINE: inmemory + TEST_MIN_DEPS: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + STORAGE_ENGINE: inmemory + TEST_MIN_DEPS: "1" + SYNC: sync + tags: + - test-storage-inmemory + - server-latest + - python-3.11 + - standalone-noauth-nossl + - noauth + - sync diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index b1d34bce8d..5d17c0bab7 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -116,41 +116,12 @@ buildvariants: - rhel8.10-small # Compression tests - - name: compression-snappy-rhel8 + - name: compression-rhel8 tasks: - - name: .test-standard - display_name: Compression snappy RHEL8 + - name: .test-compression + display_name: Compression RHEL8 run_on: - rhel8.10-small - expansions: - COMPRESSOR: snappy - - name: compression-zlib-rhel8 - tasks: - - name: .test-standard - display_name: Compression zlib RHEL8 - run_on: - - rhel8.10-small - expansions: - COMPRESSOR: zlib - - name: compression-zstd-rhel8 - tasks: - - name: .test-standard - display_name: Compression zstd RHEL8 - run_on: - - rhel8.10-small - expansions: - COMPRESSOR: zstd - - name: compression-zstd-ubuntu-22 - tasks: - - name: .test-standard !.server-4.4 !.server-5.0 .python-3.14 - - name: .test-standard !.server-4.4 !.server-5.0 .python-3.14t - - name: .test-standard !.server-4.4 !.server-5.0 .python-3.15 - - name: .test-standard !.server-4.4 !.server-5.0 .python-3.15t - display_name: Compression zstd Ubuntu-22 - run_on: - - ubuntu2204-small - expansions: - COMPRESSOR: ztsd # Coverage report tests - name: coverage-report @@ -163,131 +134,48 @@ buildvariants: # Disable test commands tests - name: disable-test-commands-rhel8 tasks: - - name: .test-standard .server-latest + - name: .test-disable-test-commands display_name: Disable test commands RHEL8 run_on: - rhel8.10-small - expansions: - AUTH: auth - SSL: ssl - DISABLE_TEST_COMMANDS: "1" # Doctests tests - name: doctests-rhel8 tasks: - - name: .test-non-standard .standalone-noauth-nossl + - name: .test-doctest display_name: Doctests RHEL8 run_on: - rhel8.10-small - expansions: - TEST_NAME: doctest # Encryption tests - name: encryption-rhel8 tasks: - - name: .test-non-standard !.python-3.15t + - name: .test-encryption .rhel8 - name: .test-string-query-preview + - name: .test-encryption-pyopenssl .rhel8 display_name: Encryption RHEL8 run_on: - rhel8.10-small batchtime: 1440 - expansions: - TEST_NAME: encryption tags: [encryption_tag] - name: encryption-macos tasks: - - name: .test-non-standard !.cov !.python-3.15t - - name: .test-non-standard-no-cov !.python-3.15t + - name: .test-encryption .macos - name: .test-string-query-preview display_name: Encryption macOS run_on: - macos-14 batchtime: 1440 - expansions: - TEST_NAME: encryption tags: [encryption_tag] - name: encryption-win64 tasks: - - name: .test-non-standard !.cov !.python-3.15t - - name: .test-non-standard-no-cov !.python-3.15t + - name: .test-encryption .win64 - name: .test-string-query-preview display_name: Encryption Win64 run_on: - windows-2022-latest-small batchtime: 1440 - expansions: - TEST_NAME: encryption - tags: [encryption_tag] - - name: encryption-crypt_shared-rhel8 - tasks: - - name: .test-non-standard !.python-3.15t - - name: .test-string-query-preview - display_name: Encryption crypt_shared RHEL8 - run_on: - - rhel8.10-small - batchtime: 1440 - expansions: - TEST_NAME: encryption - TEST_CRYPT_SHARED: "true" - tags: [encryption_tag] - - name: encryption-crypt_shared-macos - tasks: - - name: .test-non-standard !.cov !.python-3.15t - - name: .test-non-standard-no-cov !.python-3.15t - - name: .test-string-query-preview - display_name: Encryption crypt_shared macOS - run_on: - - macos-14 - batchtime: 1440 - expansions: - TEST_NAME: encryption - TEST_CRYPT_SHARED: "true" - tags: [encryption_tag] - - name: encryption-crypt_shared-win64 - tasks: - - name: .test-non-standard !.cov !.python-3.15t - - name: .test-non-standard-no-cov !.python-3.15t - - name: .test-string-query-preview - display_name: Encryption crypt_shared Win64 - run_on: - - windows-2022-latest-small - batchtime: 1440 - expansions: - TEST_NAME: encryption - TEST_CRYPT_SHARED: "true" - tags: [encryption_tag] - - name: encryption-pyopenssl-rhel8 - tasks: - - name: .test-non-standard !.python-3.15t - display_name: Encryption PyOpenSSL RHEL8 - run_on: - - rhel8.10-small - batchtime: 1440 - expansions: - TEST_NAME: encryption - SUB_TEST_NAME: pyopenssl tags: [encryption_tag] - - name: encryption-ubuntu-22 - tasks: - - name: .test-non-standard .python-3.15t !.server-4.4 !.server-5.0 - display_name: Encryption Ubuntu-22 - run_on: - - ubuntu2204-small - batchtime: 1440 - expansions: - TEST_NAME: encryption - tags: [encryption_tag, pr] - - name: encryption-pyopenssl-ubuntu-22 - tasks: - - name: .test-non-standard .python-3.15t !.server-4.4 !.server-5.0 - display_name: Encryption PyOpenSSL Ubuntu-22 - run_on: - - ubuntu2204-small - batchtime: 1440 - expansions: - TEST_NAME: encryption - SUB_TEST_NAME: pyopenssl - tags: [encryption_tag, pr] # Enterprise auth tests - name: auth-enterprise-rhel8 @@ -321,12 +209,10 @@ buildvariants: # Green framework tests - name: green-gevent-rhel8 tasks: - - name: .test-standard .sync !.free-threaded + - name: .test-gevent display_name: Green Gevent RHEL8 run_on: - rhel8.10-small - expansions: - GREEN_FRAMEWORK: gevent # Import time tests - name: import-time @@ -352,18 +238,11 @@ buildvariants: # Load balancer tests - name: load-balancer tasks: - - name: .test-non-standard .server-6.0 .sharded_cluster-auth-ssl - - name: .test-non-standard .server-7.0 .sharded_cluster-auth-ssl - - name: .test-non-standard .server-8.0 .sharded_cluster-auth-ssl - - name: .test-non-standard .server-9.0 .sharded_cluster-auth-ssl - - name: .test-non-standard .server-rapid .sharded_cluster-auth-ssl - - name: .test-non-standard .server-latest .sharded_cluster-auth-ssl + - name: .test-load-balancer display_name: Load Balancer run_on: - rhel8.10-small batchtime: 1440 - expansions: - TEST_NAME: load_balancer # Min support tests - name: min-support-rhel8 @@ -387,12 +266,10 @@ buildvariants: # No c ext tests - name: no-c-ext-rhel8 tasks: - - name: .test-standard + - name: .test-no-c-ext display_name: No C Ext RHEL8 run_on: - rhel8.10-small - expansions: - NO_EXT: "1" # No server tests - name: no-server-rhel8 @@ -480,45 +357,25 @@ buildvariants: # Pyopenssl tests - name: pyopenssl-rhel8 tasks: - - name: .test-standard !.python-3.15t .sync - - name: .test-standard !.python-3.15t .async .replica_set-noauth-ssl + - name: .test-pyopenssl .rhel8 display_name: PyOpenSSL RHEL8 run_on: - rhel8.10-small batchtime: 1440 - expansions: - SUB_TEST_NAME: pyopenssl - name: pyopenssl-macos tasks: - - name: .test-standard !.python-3.15t .sync - - name: .test-standard !.python-3.15t .async .replica_set-noauth-ssl + - name: .test-pyopenssl .macos display_name: PyOpenSSL macOS run_on: - macos-14 batchtime: 1440 - expansions: - SUB_TEST_NAME: pyopenssl - name: pyopenssl-win64 tasks: - - name: .test-standard !.python-3.15t .sync - - name: .test-standard !.python-3.15t .async .replica_set-noauth-ssl + - name: .test-pyopenssl .win64 display_name: PyOpenSSL Win64 run_on: - windows-2022-latest-small batchtime: 1440 - expansions: - SUB_TEST_NAME: pyopenssl - - name: pyopenssl-ubuntu-22 - tasks: - - name: .test-standard .python-3.15t !.server-4.4 !.server-5.0 .sync - - name: .test-standard .python-3.15t !.server-4.4 !.server-5.0 .async .replica_set-noauth-ssl - display_name: PyOpenSSL Ubuntu-22 - run_on: - - ubuntu2204-small - batchtime: 1440 - expansions: - SUB_TEST_NAME: pyopenssl - tags: [pr] # Search index tests - name: search-index-helpers-rhel8 @@ -616,63 +473,32 @@ buildvariants: tags: [pr] # Stable api tests - - name: stable-api-require-v1-rhel8-auth + - name: stable-api-rhel8 tasks: - - name: .test-standard !.replica_set-noauth-ssl .server-5.0 - - name: .test-standard !.replica_set-noauth-ssl .server-6.0 - - name: .test-standard !.replica_set-noauth-ssl .server-7.0 - - name: .test-standard !.replica_set-noauth-ssl .server-8.0 - - name: .test-standard !.replica_set-noauth-ssl .server-9.0 - - name: .test-standard !.replica_set-noauth-ssl .server-rapid - - name: .test-standard !.replica_set-noauth-ssl .server-latest - display_name: Stable API require v1 RHEL8 Auth + - name: .test-stable-api + display_name: Stable API RHEL8 run_on: - rhel8.10-small - expansions: - AUTH: auth - REQUIRE_API_VERSION: "1" - MONGODB_API_VERSION: "1" - tags: [versionedApi_tag] - - name: stable-api-accept-v2-rhel8-auth - tasks: - - name: .test-standard .server-5.0 .standalone-noauth-nossl - - name: .test-standard .server-6.0 .standalone-noauth-nossl - - name: .test-standard .server-7.0 .standalone-noauth-nossl - - name: .test-standard .server-8.0 .standalone-noauth-nossl - - name: .test-standard .server-9.0 .standalone-noauth-nossl - - name: .test-standard .server-rapid .standalone-noauth-nossl - - name: .test-standard .server-latest .standalone-noauth-nossl - display_name: Stable API accept v2 RHEL8 Auth - run_on: - - rhel8.10-small - expansions: - AUTH: auth - ORCHESTRATION_FILE: versioned-api-testing.json tags: [versionedApi_tag] # Standard nonlinux tests - name: test-macos tasks: - - name: .test-standard + - name: .test-standard .macos display_name: "* Test macOS" run_on: - macos-14 tags: [standard-non-linux] - name: test-macos-arm64 tasks: - - name: .test-standard .server-6.0 - - name: .test-standard .server-7.0 - - name: .test-standard .server-8.0 - - name: .test-standard .server-9.0 - - name: .test-standard .server-rapid - - name: .test-standard .server-latest + - name: .test-standard .macos-arm64 display_name: "* Test macOS Arm64" run_on: - macos-14-arm64 tags: [standard-non-linux] - name: test-win64 tasks: - - name: .test-standard + - name: .test-standard .win64 - name: .test-no-orchestration display_name: "* Test Win64" run_on: @@ -680,7 +506,7 @@ buildvariants: tags: [standard-non-linux] - name: test-win32 tasks: - - name: .test-standard !.free-threaded + - name: .test-standard .win32 display_name: "* Test Win32" run_on: - windows-64-vsMulti-small @@ -691,12 +517,10 @@ buildvariants: # Storage engine tests - name: storage-inmemory-rhel8 tasks: - - name: .test-standard .standalone-noauth-nossl + - name: .test-storage-inmemory display_name: Storage InMemory RHEL8 run_on: - rhel8.10-small - expansions: - STORAGE_ENGINE: inmemory # Test numpy tests - name: test-numpy-rhel8 @@ -706,12 +530,13 @@ buildvariants: run_on: - rhel8.10-small tags: [binary, vector, pr] - - name: test-numpy-macos + - name: test-numpy-windows tasks: - name: .test-numpy - display_name: Test Numpy macOS + - name: .test-numpy-win32 + display_name: Test Numpy Windows run_on: - - macos-14 + - windows-64-vsMulti-small tags: [binary, vector] - name: test-numpy-macos-arm64 tasks: @@ -720,19 +545,3 @@ buildvariants: run_on: - macos-14-arm64 tags: [binary, vector] - - name: test-numpy-win64 - tasks: - - name: .test-numpy - display_name: Test Numpy Win64 - run_on: - - windows-2022-latest-small - tags: [binary, vector] - - name: test-numpy-win32 - tasks: - - name: .test-numpy - display_name: Test Numpy Win32 - run_on: - - windows-64-vsMulti-small - expansions: - IS_WIN32: "1" - tags: [binary, vector] diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 4652d33d57..1409f6c247 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -11,6 +11,7 @@ BATCHTIME_WEEK, C_EXTS, CPYTHONS, + CPYTHONS_NO_FREE_THREADED, DEFAULT_HOST, FREE_THREADED_PYTHON, HOSTS, @@ -27,6 +28,7 @@ get_s3_put, get_standard_auth_ssl, get_subprocess_exec, + get_suite_mode, get_task_name, get_variant_name, get_versions_from, @@ -49,6 +51,16 @@ from shrub.v3.evg_task import EvgTask, EvgTaskDependency, EvgTaskRef from utils import PERF_PYTHON_VERSION +# The wire-protocol compressors exercised by the compression tasks. +COMPRESSORS = ["snappy", "zlib", "zstd"] + +# The distros sharing the per-suite task definitions. +ALL_DISTROS = ["rhel8", "macos", "win64"] + +# The middle stable MongoDB version, anchoring the free-threaded standard task. +STABLE_VERSIONS = [v for v in ALL_VERSIONS if v not in ("rapid", "latest")] +MIDDLE_VERSION = STABLE_VERSIONS[len(STABLE_VERSIONS) // 2] + ############## # Variants ############## @@ -111,23 +123,23 @@ def create_standard_nonlinux_variants() -> list[BuildVariant]: variants = [] base_display_name = "* Test" - # Test a subset on each of the other platforms. + # Test the standard family on each of the other platforms; the platform + # tags restrict the cells (macOS arm64 starts at 6.0, win32 has no + # free-threaded CPython). for host_name in ("macos", "macos-arm64", "win64", "win32"): - tasks = [".test-standard"] - # MacOS arm64 only works on server versions 6.0+ - if host_name == "macos-arm64": - tasks = [f".test-standard .server-{version}" for version in get_versions_from("6.0")] - if host_name == "win64": - tasks.append(".test-no-orchestration") host = HOSTS[host_name] - tags = ["standard-non-linux"] + display_name = get_variant_name(base_display_name, host) + tasks = [f".test-standard .{host_name}"] expansions = dict() if host_name == "win32": + # IS_WIN32 makes setup-uv-python.sh use the 32-bit toolchain. expansions["IS_WIN32"] = "1" - tasks = [".test-standard !.free-threaded"] - display_name = get_variant_name(base_display_name, host) - variant = create_variant(tasks, display_name, host=host, tags=tags, expansions=expansions) - variants.append(variant) + elif host_name == "win64": + tasks.append(".test-no-orchestration") + tags = ["standard-non-linux"] + variants.append( + create_variant(tasks, display_name, host=host, tags=tags, expansions=expansions) + ) return variants @@ -137,141 +149,38 @@ def create_encryption_variants() -> list[BuildVariant]: tags = ["encryption_tag"] batchtime = BATCHTIME_DAY - def get_encryption_expansions(encryption): - expansions = dict(TEST_NAME="encryption") - if "crypt_shared" in encryption: - expansions["TEST_CRYPT_SHARED"] = "true" - if "PyOpenSSL" in encryption: - expansions["SUB_TEST_NAME"] = "pyopenssl" - return expansions - - # Test encryption on all hosts. - for encryption, host in product( - ["Encryption", "Encryption crypt_shared"], ["rhel8", "macos", "win64"] - ): - expansions = get_encryption_expansions(encryption) - display_name = get_variant_name(encryption, host, **expansions) - tasks = [".test-non-standard !.python-3.15t", ".test-string-query-preview"] - if host != "rhel8": - # Exclude coverage tasks (encryption suites exceed the 60-min timeout with - # coverage overhead on macOS/win64). - # Also include the non-coverage companion tasks (test-non-standard-no-cov) which - # carry the "latest" server tasks without COVERAGE=1. - tasks = [ - ".test-non-standard !.cov !.python-3.15t", - ".test-non-standard-no-cov !.python-3.15t", - ".test-string-query-preview", - ] - variant = create_variant( - tasks, - display_name, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=tags, - ) - variants.append(variant) - - # Test PyOpenSSL on linux. - host = DEFAULT_HOST - encryption = "Encryption PyOpenSSL" - expansions = get_encryption_expansions(encryption) - display_name = get_variant_name(encryption, host, **expansions) - variant = create_variant( - [".test-non-standard !.python-3.15t"], - display_name, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=tags, - ) - variants.append(variant) - - # The 3.15t encryption tests only run on Ubuntu 22, whose OpenSSL 3.0.2 is - # needed to build the cryptography package; only MongoDB 6.0+ runs there. - host = HOSTS["ubuntu22"] - expansions = get_encryption_expansions("Encryption") - display_name = get_variant_name("Encryption", host, **expansions) - variants.append( - create_variant( - [".test-non-standard .python-3.15t !.server-4.4 !.server-5.0"], - display_name, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=[*tags, "pr"], - ) - ) - - # The 3.15t PyOpenSSL tests only run on Ubuntu 22, whose OpenSSL 3.0.2 is - # needed to build the cryptography package; only MongoDB 6.0+ runs there. - expansions = get_encryption_expansions("Encryption PyOpenSSL") - display_name = get_variant_name("Encryption PyOpenSSL", host, **expansions) - variants.append( - create_variant( - [".test-non-standard .python-3.15t !.server-4.4 !.server-5.0"], - display_name, - host=host, - expansions=expansions, - batchtime=batchtime, - tags=[*tags, "pr"], + # The tasks identify the suite, distro, sync mode, and crypt_shared; each + # variant picks its distro group(s). + for host in ["rhel8", "macos", "win64"]: + tasks = [f".test-encryption .{host}", ".test-string-query-preview"] + if host == "rhel8": + tasks.append(".test-encryption-pyopenssl .rhel8") + display_name = get_variant_name("Encryption", host) + variants.append( + create_variant(tasks, display_name, host=host, batchtime=batchtime, tags=tags) ) - ) return variants def create_load_balancer_variants(): - tasks = [ - f".test-non-standard .server-{v} .sharded_cluster-auth-ssl" - for v in get_versions_from("6.0") - ] - expansions = dict(TEST_NAME="load_balancer") return [ create_variant( - tasks, + [".test-load-balancer"], "Load Balancer", host=DEFAULT_HOST, batchtime=BATCHTIME_DAY, - expansions=expansions, ) ] def create_compression_variants(): - # Compression tests - use the standard linux tests. - host = DEFAULT_HOST - variants = [] - for compressor in "snappy", "zlib", "zstd": - expansions = dict(COMPRESSOR=compressor) - tasks = [".test-standard"] - display_name = get_variant_name(f"Compression {compressor}", host) - variants.append( - create_variant( - tasks, - display_name, - host=host, - expansions=expansions, - ) - ) - # Add explicit tests with compression.zstd support on linux. - host = HOSTS["ubuntu22"] - expansions = dict(COMPRESSOR="ztsd") - tasks = [ - ".test-standard !.server-4.4 !.server-5.0 .python-3.14", - ".test-standard !.server-4.4 !.server-5.0 .python-3.14t", - ".test-standard !.server-4.4 !.server-5.0 .python-3.15", - ".test-standard !.server-4.4 !.server-5.0 .python-3.15t", - ] - display_name = get_variant_name(f"Compression {compressor}", host) - variants.append( + # Compression tests - the tasks carry their compressor. + return [ create_variant( - tasks, - display_name, - host=host, - expansions=expansions, + [".test-compression"], + get_variant_name("Compression", DEFAULT_HOST), ) - ) - return variants + ] def create_enterprise_auth_variants(): @@ -292,137 +201,98 @@ def create_enterprise_auth_variants(): def create_pyopenssl_variants(): - base_name = "PyOpenSSL" - batchtime = BATCHTIME_DAY - expansions = dict(SUB_TEST_NAME="pyopenssl") variants = [] - for host in ["rhel8", "macos", "win64"]: - display_name = get_variant_name(base_name, host) - base_task = ".test-standard !.python-3.15t" - # We only need to run a subset on async. - tasks = [f"{base_task} .sync", f"{base_task} .async .replica_set-noauth-ssl"] + display_name = get_variant_name("PyOpenSSL", host) variants.append( create_variant( - tasks, + [f".test-pyopenssl .{host}"], display_name, host=host, - expansions=expansions, - batchtime=batchtime, + batchtime=BATCHTIME_DAY, ) ) - # The 3.15t PyOpenSSL tests only run on Ubuntu 22, whose OpenSSL 3.0.2 is - # needed to build the cryptography package; only MongoDB 6.0+ runs there. - host = HOSTS["ubuntu22"] - tasks = [ - ".test-standard .python-3.15t !.server-4.4 !.server-5.0 .sync", - ".test-standard .python-3.15t !.server-4.4 !.server-5.0 .async .replica_set-noauth-ssl", - ] - variants.append( - create_variant( - tasks, - get_variant_name(base_name, host), - host=host, - expansions=expansions, - batchtime=batchtime, - tags=["pr"], - ) - ) - return variants def create_storage_engine_variants(): host = DEFAULT_HOST - engines = ["InMemory"] - variants = [] - for engine in engines: - expansions = dict(STORAGE_ENGINE=engine.lower()) - tasks = [".test-standard .standalone-noauth-nossl"] - display_name = get_variant_name(f"Storage {engine}", host) - variant = create_variant(tasks, display_name, host=host, expansions=expansions) - variants.append(variant) - return variants + return [ + create_variant( + [".test-storage-inmemory"], + get_variant_name("Storage InMemory", host), + host=host, + ) + ] def create_stable_api_variants(): host = DEFAULT_HOST - tags = ["versionedApi_tag"] - variants = [] - types = ["require v1", "accept v2"] - - # All python versions across platforms. - for test_type in 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" - tasks = [ - f".test-standard !.replica_set-noauth-ssl .server-{v}" - for v in get_versions_from("5.0") - ] - 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" - tasks = [ - f".test-standard .server-{v} .standalone-noauth-nossl" - for v in get_versions_from("5.0") - ] - base_display_name = f"Stable API {test_type}" - display_name = get_variant_name(base_display_name, host, **expansions) - variant = create_variant(tasks, display_name, host=host, tags=tags, expansions=expansions) - variants.append(variant) - - return variants + return [ + create_variant( + [".test-stable-api"], + get_variant_name("Stable API", host), + host=host, + tags=["versionedApi_tag"], + ) + ] def create_green_framework_variants(): - variants = [] host = DEFAULT_HOST - for framework in ["gevent"]: - tasks = [".test-standard .sync !.free-threaded"] - expansions = dict(GREEN_FRAMEWORK=framework) - display_name = get_variant_name(f"Green {framework.capitalize()}", host) - variant = create_variant(tasks, display_name, host=host, expansions=expansions) - variants.append(variant) - return variants + return [ + create_variant( + [".test-gevent"], + get_variant_name("Green Gevent", host), + host=host, + ) + ] def create_no_c_ext_variants(): host = DEFAULT_HOST - tasks = [".test-standard"] - expansions = dict() - handle_c_ext(C_EXTS[0], expansions) - display_name = get_variant_name("No C Ext", host) - return [create_variant(tasks, display_name, host=host, expansions=expansions)] + return [ + create_variant( + [".test-no-c-ext"], + get_variant_name("No C Ext", host), + host=host, + ) + ] def create_disable_test_commands_variants(): host = DEFAULT_HOST - expansions = dict(AUTH="auth", SSL="ssl", DISABLE_TEST_COMMANDS="1") - display_name = get_variant_name("Disable test commands", host) - tasks = [".test-standard .server-latest"] - return [create_variant(tasks, display_name, host=host, expansions=expansions)] + return [ + create_variant( + [".test-disable-test-commands"], + get_variant_name("Disable test commands", host), + host=host, + ) + ] def create_test_numpy_tasks(): tasks = [] for python in MIN_MAX_PYTHON: - tags = ["binary", "vector", f"python-{python}", "test-numpy"] - vars = dict(UV_PYTHON=python) - if python == MIN_MAX_PYTHON[-1]: - tags.append("pr") - vars["COVERAGE"] = "1" - task_name = get_task_name("test-numpy", python=python, **vars) - test_func = FunctionCall(func="test numpy", vars=vars) - tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) + for win32 in (False, True): + tags = ["binary", "vector", f"python-{python}"] + vars = dict(UV_PYTHON=python) + name_base = "test-numpy" + if win32: + # Only the windows variant selects these: IS_WIN32 makes + # setup-uv-python.sh use the 32-bit toolchain (C:/python/32). + tags.append("test-numpy-win32") + vars["IS_WIN32"] = "1" + name_base += "-win32" + else: + tags.append("test-numpy") + if python == MIN_MAX_PYTHON[-1]: + tags.append("pr") + vars["COVERAGE"] = "1" + task_name = get_task_name(name_base, python=python, **vars) + test_func = FunctionCall(func="test numpy", vars=vars) + tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) return tasks @@ -430,18 +300,25 @@ def create_test_numpy_variants() -> list[BuildVariant]: variants = [] base_display_name = "Test Numpy" - # Test a subset on each of the other platforms. - for host_name in ("rhel8", "macos", "macos-arm64", "win64", "win32"): + # Test a subset on each of the other platforms: Linux, Windows (the 32-bit + # and 64-bit tasks in one variant on their shared distro, named to avoid + # create_variant's "Win64" display-name redirect), and macOS Apple + # silicon. The Intel macOS host is not tested. + for host_name, display_name in ( + ("rhel8", None), + ("win64", f"{base_display_name} Windows"), + ("macos-arm64", None), + ): tasks = [".test-numpy"] + if host_name == "win64": + tasks.append(".test-numpy-win32") host = HOSTS[host_name] tags = ["binary", "vector"] if host_name == "rhel8": tags.append("pr") - expansions = dict() - if host_name == "win32": - expansions["IS_WIN32"] = "1" - display_name = get_variant_name(base_display_name, host) - variant = create_variant(tasks, display_name, host=host, tags=tags, expansions=expansions) + if display_name is None: + display_name = get_variant_name(base_display_name, host) # noqa: PLW2901 + variant = create_variant(tasks, display_name, host=host, tags=tags) variants.append(variant) return variants @@ -506,13 +383,11 @@ def create_mockupdb_variants(): def create_doctests_variants(): host = DEFAULT_HOST - expansions = dict(TEST_NAME="doctest") return [ create_variant( - [".test-non-standard .standalone-noauth-nossl"], + [".test-doctest"], get_variant_name("Doctests", host), host=host, - expansions=expansions, ) ] @@ -752,73 +627,374 @@ def create_no_toolchain_tasks(): return tasks -def create_test_non_standard_tasks(): - """For variants that set a TEST_NAME.""" +def _create_suite_task( + family, + version, + topology, + python, + sync, + suite, + sub_test=None, + crypt_shared=False, + suffix=None, + extra_test_vars=None, + extra_expansions=None, + distros=None, + pr=False, + cov=None, +): + """One task of a per-suite family, identified by its name and tags. The + name carries no distro, so the same definitions are listed for every + distro variant; the distros param tags which variants run the task + (PYTHON-6167).""" + auth, ssl = get_standard_auth_ssl(topology) + tags = [ + family, + f"server-{version}", + f"python-{python}", + f"{topology}-{auth}-{ssl}", + auth, + ] + tags.extend(distros or []) + if sync: + tags.append(sync) + if "t" in python: + tags.append("free-threaded") + if pr: + tags.append("pr") + expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) + if extra_expansions: + # Shared by the run server and run tests calls, for vars the server + # start needs (REQUIRE_API_VERSION, ORCHESTRATION_FILE, ...). + expansions.update(extra_expansions) + if crypt_shared: + tags.append("crypt-shared") + expansions["TEST_CRYPT_SHARED"] = "true" + collects_cov = ( + cov if cov is not None else (version == "latest" and topology == "sharded_cluster") + ) + if python == ALL_PYTHONS[0]: + expansions["TEST_MIN_DEPS"] = "1" + elif collects_cov: + tags.append("cov") + expansions["COVERAGE"] = "1" + base = family + if suffix: + base += f"-{suffix}" + if crypt_shared: + base += "-crypt-shared" + name = get_task_name(base, python=python, sync=sync, **expansions) + server_vars = dict(TEST_NAME=suite, **expansions) + test_vars = dict(TEST_NAME=suite, UV_PYTHON=python, **expansions) + if sub_test: + test_vars["SUB_TEST_NAME"] = sub_test + if sync: + test_vars["SYNC"] = sync + if extra_test_vars: + test_vars.update(extra_test_vars) + server_func = FunctionCall(func="run server", vars=server_vars) + test_func = FunctionCall(func="run tests", vars=test_vars) + return EvgTask(name=name, tags=tags, commands=[server_func, test_func]) + + +def _create_encryption_tasks(family, sub_test=None, crypt_shared=False, distros=None): + """Encryption tasks for one test type: the three standard corners — sync + min-Python min-deps on the min MongoDB standalone, async max-CPython on + the max stable MongoDB sharded cluster, and sync max free-threaded CPython + on the middle MongoDB replica set — plus the max-CPython sharded task + across the remaining MongoDB versions, including latest and rapid. The + names carry no distro, so the same tasks are listed for every distro; + coverage and the pr pin ride rhel8-only twins of the max-stable and + latest cells, which exceed the 60-min timeout with coverage overhead on + macOS/Win64 (PYTHON-6167).""" + all_distros = ALL_DISTROS + distros = distros or all_distros + split_coverage = distros == all_distros tasks = [] - task_combos = set() - # For each version and topology, rotate through the CPythons. - # Only the sharded_cluster topology runs on PRs to keep patch build size manageable. - for (version, topology), python in zip_cycle(list(product(ALL_VERSIONS, TOPOLOGIES)), CPYTHONS): - task_combos.add((version, topology, python)) - # The pinned PR task: the max Python on MAX_VERSION, sharded cluster. - task_combos.add((MAX_VERSION, "sharded_cluster", MAX_PYTHON)) - for version, topology, python in sorted(task_combos): - pr = version == MAX_VERSION and topology == "sharded_cluster" and python == MAX_PYTHON - auth, ssl = get_standard_auth_ssl(topology) - tags = [ - "test-non-standard", - f"server-{version}", - f"python-{python}", - f"{topology}-{auth}-{ssl}", - auth, - ] - if "t" in python: - tags.append("free-threaded") - if pr: - tags.append("pr") - expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) - if python == ALL_PYTHONS[0]: - expansions["TEST_MIN_DEPS"] = "1" - elif pr or (version == "latest" and topology == "sharded_cluster"): - expansions["COVERAGE"] = "1" - tags.append("cov") - name = get_task_name("test-non-standard", python=python, **expansions) - server_func = FunctionCall(func="run server", vars=expansions) - test_vars = expansions.copy() - test_vars["UV_PYTHON"] = python - test_func = FunctionCall(func="run tests", vars=test_vars) - tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) - # For each coverage task, also emit a non-coverage companion so that - # macOS/Win64 encryption variants (which filter out .cov due to timeout - # constraints) still have a "latest" task to activate in patch builds. - if "cov" in tags: - nc_expansions = {k: v for k, v in expansions.items() if k != "COVERAGE"} - # Use a distinct primary tag so companions are not selected by existing - # ".test-non-standard" selectors (e.g. load-balancer, PyOpenSSL variants). - nc_tags = [ - "test-non-standard-no-cov" if t == "test-non-standard" else t - for t in tags - if t not in ("cov", "pr") - ] - nc_name = get_task_name("test-non-standard", python=python, **nc_expansions) - nc_server_func = FunctionCall(func="run server", vars=nc_expansions) - nc_test_vars = nc_expansions.copy() - nc_test_vars["UV_PYTHON"] = python - nc_test_func = FunctionCall(func="run tests", vars=nc_test_vars) - tasks.append( - EvgTask(name=nc_name, tags=nc_tags, commands=[nc_server_func, nc_test_func]) + + def add(version, topology, python, sync, **kwargs): + tasks.append( + _create_suite_task( + family, + version, + topology, + python, + sync, + "encryption", + sub_test=sub_test, + crypt_shared=crypt_shared, + **kwargs, + ) + ) + + # Sync, min Python, min deps, min MongoDB, no auth, no SSL, standalone. + add(MIN_VERSION, "standalone", MIN_PYTHON, "sync", distros=distros) + # Sync, max free-threaded CPython, middle MongoDB, noauth, SSL, replica set. + add(MIDDLE_VERSION, "replica_set", FREE_THREADED_PYTHON, "sync", distros=distros) + # Async, max CPython, max stable MongoDB, auth, SSL, sharded cluster. + if split_coverage: + add(MAX_VERSION, "sharded_cluster", MAX_PYTHON, "async", distros=["macos", "win64"]) + add( + MAX_VERSION, + "sharded_cluster", + MAX_PYTHON, + "async", + distros=["rhel8"], + pr=True, + cov=True, + ) + else: + add(MAX_VERSION, "sharded_cluster", MAX_PYTHON, "async", distros=distros, pr=True, cov=True) + # The max-CPython sharded task across the remaining MongoDB versions; the + # latest cell keeps a rhel8-only coverage twin when the family spans the + # distros that cannot run coverage. + for version in ALL_VERSIONS: + if version in (MIN_VERSION, MIDDLE_VERSION, MAX_VERSION): + continue + if version == "latest" and split_coverage: + add( + version, + "sharded_cluster", + MAX_PYTHON, + "async", + distros=["macos", "win64"], + cov=False, ) + add(version, "sharded_cluster", MAX_PYTHON, "async", distros=["rhel8"], cov=True) + else: + add(version, "sharded_cluster", MAX_PYTHON, "async", distros=distros) return tasks +def create_test_encryption_tasks(): + """Encryption tasks, plus crypt_shared variants of every task.""" + return _create_encryption_tasks("test-encryption") + _create_encryption_tasks( + "test-encryption", crypt_shared=True + ) + + +def create_test_encryption_pyopenssl_tasks(): + """PyOpenSSL tasks on RHEL 8 only (setup_tests.py builds OpenSSL 3 there).""" + return _create_encryption_tasks( + "test-encryption-pyopenssl", sub_test="pyopenssl", distros=["rhel8"] + ) + + +def create_test_load_balancer_tasks(): + """Load balancer tasks: one sync and one async task per MongoDB version + 6.0+ on an authenticated SSL sharded cluster fronted by a load balancer, + running the full default suite — the load-balancer-marked tests are part + of it — with the CPython paired one-to-one across the versions + (PYTHON-6167).""" + return [ + _create_suite_task( + "test-load-balancer", version, "sharded_cluster", python, sync, "load_balancer" + ) + for sync in SYNCS + for version, python in zip(get_versions_from("6.0"), CPYTHONS) + ] + + +def create_test_doctest_tasks(): + """Doctest tasks: one task per MongoDB version on a standalone server.""" + return [ + _create_suite_task("test-doctest", version, "standalone", python, "", "doctest") + for version, python in zip_cycle(ALL_VERSIONS, CPYTHONS) + ] + + +def create_test_compression_tasks(): + """Compression tasks: one sync task per compressor on the latest replica + set plus one async sharded-cluster task per compressor and MongoDB version + for every other version, with the CPython rotated across the cells, so + each compressor is tested against every MongoDB version without + duplicating cells (the compressors differ in client-side support, the + versions in server-side wire support). Each task runs the default suite + with its compressor enabled on every client (PYTHON-6167).""" + tasks = [] + for compressor in COMPRESSORS: + # Sync, max CPython, noauth, SSL, replica set. + tasks.append( + _create_suite_task( + "test-compression", + "latest", + "replica_set", + MAX_PYTHON, + "sync", + "default", + suffix=compressor, + extra_test_vars=dict(COMPRESSORS=compressor), + ) + ) + cells = list(product(COMPRESSORS, [v for v in ALL_VERSIONS if v != "latest"])) + for (compressor, version), python in zip_cycle(cells, CPYTHONS): + # Async, auth, SSL, sharded cluster. + tasks.append( + _create_suite_task( + "test-compression", + version, + "sharded_cluster", + python, + "async", + "default", + suffix=compressor, + extra_test_vars=dict(COMPRESSORS=compressor), + ) + ) + return tasks + + +def _per_version_cells(): + """One cell per MongoDB version: a sharded cluster for every stable and + rapid version, a replica set for latest, all with SSL.""" + return [(version, "sharded_cluster") for version in ALL_VERSIONS if version != "latest"] + [ + ("latest", "replica_set") + ] + + +def create_test_pyopenssl_tasks(): + """PyOpenSSL tasks: one task per MongoDB version — sync on the latest + replica set, async on the sharded-cluster rotation — running the default + suite with the PyOpenSSL extra installed (SUB_TEST_NAME feeds + setup_tests.py), so the PyOpenSSL SSL backend is exercised against every + server version. The tasks run on every distro with the CPython rotated + across the cells; free-threaded CPython is covered by the + encryption-pyopenssl family on RHEL 8, the distro setup_tests.py equips + with OpenSSL 3 (PYTHON-6167).""" + return [ + _create_suite_task( + "test-pyopenssl", + version, + topology, + python, + get_suite_mode(topology), + "default", + sub_test="pyopenssl", + distros=ALL_DISTROS, + ) + for (version, topology), python in zip_cycle( + _per_version_cells(), CPYTHONS_NO_FREE_THREADED + ) + ] + + +def _create_rotation_tasks( + family, extra_test_vars=None, extra_expansions=None, pythons=CPYTHONS, sync=None +): + """One task per MongoDB version, the topology cycling through standalone, + replica set, and sharded cluster (PYTHON-6167).""" + return [ + _create_suite_task( + family, + version, + topology, + python, + sync if sync else get_suite_mode(topology), + "default", + extra_test_vars=extra_test_vars, + extra_expansions=extra_expansions, + ) + for version, topology, python in zip_cycle(ALL_VERSIONS, TOPOLOGIES, pythons) + ] + + +def create_test_gevent_tasks(): + """Gevent tasks: one task per MongoDB version, the topology cycling + through standalone, replica set, and sharded cluster, running the sync + default suite under gevent; run_tests.py monkey-patches with gevent and + skips the async tests. Free-threaded CPython is not supported by gevent + (PYTHON-6167).""" + return _create_rotation_tasks( + "test-gevent", + extra_test_vars=dict(GREEN_FRAMEWORK="gevent"), + pythons=CPYTHONS_NO_FREE_THREADED, + sync="sync", + ) + + +def create_test_disable_test_commands_tasks(): + """Disable-test-commands tasks: one task per MongoDB version, the topology + cycling through standalone, replica set, and sharded cluster (each uses + its own disableTestCommands orchestration config), running the default + suite against a server started without enableTestCommands. The mode + follows the encryption corners: sync on the standalone and replica-set + cells, async on the sharded clusters (PYTHON-6167).""" + return _create_rotation_tasks( + "test-disable-test-commands", + # Shared with the run server call, whose orchestration picks the + # disableTestCommands config from it. + extra_expansions=dict(DISABLE_TEST_COMMANDS="1"), + ) + + +def create_test_no_c_ext_tasks(): + """No-c-ext tasks: one task per MongoDB version, the topology cycling + through standalone, replica set, and sharded cluster, running the default + suite without the C extensions (NO_EXT feeds run_tests.py). The mode + follows the encryption corners: sync on the standalone and replica-set + cells, async on the sharded clusters (PYTHON-6167).""" + return _create_rotation_tasks("test-no-c-ext", extra_test_vars=dict(NO_EXT="1")) + + +def create_test_stable_api_tasks(): + """Stable API tasks: one require-v1 task per MongoDB version 5.0+ on an + authenticated SSL sharded cluster started with requireApiVersion=1, and + one accept-v2 task per version on a standalone server from the + versioned-api-testing orchestration, with the CPython rotated across the + versions. The require-v1 tasks pin apiVersion=1 on the suite; the + accept-v2 tasks do not pin an apiVersion (PYTHON-6167).""" + cells = [ + # Async, auth, SSL, sharded cluster started with requireApiVersion=1. + ( + "require-v1", + "sharded_cluster", + "async", + dict(REQUIRE_API_VERSION="1", MONGODB_API_VERSION="1"), + ), + # Sync, noauth, no SSL, standalone from the versioned-api orchestration. + ("accept-v2", "standalone", "sync", dict(ORCHESTRATION_FILE="versioned-api-testing.json")), + ] + return [ + _create_suite_task( + "test-stable-api", + version, + topology, + python, + sync, + "default", + suffix=suffix, + extra_expansions=extra_expansions, + ) + for version, python in zip_cycle(get_versions_from("5.0"), CPYTHONS) + for suffix, topology, sync, extra_expansions in cells + ] + + +def create_test_storage_inmemory_tasks(): + """InMemory storage engine tasks: one sync standalone task per MongoDB + version, running the default suite against a server started with + STORAGE_ENGINE=inmemory (PYTHON-6167).""" + return [ + _create_suite_task( + "test-storage-inmemory", + version, + "standalone", + python, + "sync", + "default", + extra_expansions=dict(STORAGE_ENGINE="inmemory"), + ) + for version, python in zip_cycle(ALL_VERSIONS, CPYTHONS) + ] + + def create_string_query_preview_tasks(): """Tasks for the preview Queryable Encryption string query types. - The preview query types need a server that is at least 8.2 and older than - 9.0, and ALL_VERSIONS jumps straight from 8.0 to 9.0, so they have nowhere - to run without a dedicated task. setup_tests.py pins the released - pymongocrypt for 8.x, which bundles a libmongocrypt still carrying the - preview types. + The preview types need a server >= 8.2 and < 9.0; ALL_VERSIONS jumps from + 8.0 to 9.0, so they need a dedicated task. setup_tests.py pins the + released pymongocrypt for 8.x, which bundles a libmongocrypt still + carrying the preview types. """ python = CPYTHONS[-1] topology = "replica_set" @@ -880,52 +1056,64 @@ def create_test_standard_auth_tasks(): def create_standard_tasks(): - """For variants that do not set a TEST_NAME.""" - tasks = [] - task_combos = set() - # For each python and topology and sync/async, rotate through the the versions. - for (python, topology, sync), rotated in zip_cycle( - list(product(CPYTHONS, TOPOLOGIES, SYNCS)), ALL_VERSIONS - ): - # PR tasks pin to the Python boundaries on MAX_VERSION; the rotation - # keeps running every combination on its rotated server version. - pr = ( - (python == MIN_PYTHON and topology == "standalone" and sync == "async") - or (python == MAX_PYTHON and topology == "replica_set" and sync == "async") - or (python == FREE_THREADED_PYTHON and topology == "sharded_cluster" and sync == "sync") - ) - task_combos.add((rotated, topology, python, sync, False)) - if pr: - task_combos.add((MAX_VERSION, topology, python, sync, True)) - - # A pinned combo can collide with a rotated one on MAX_VERSION; keep the pinned (pr) task. - combos = {combo[:4]: combo for combo in sorted(task_combos)} - for version, topology, python, sync, pr in combos.values(): - auth, ssl = get_standard_auth_ssl(topology) - tags = [ + """The standard suite on the non-linux platforms, one task per MongoDB + version following the encryption corners: sync min-Python min-deps on the + min MongoDB standalone, sync max free-threaded CPython on the middle + MongoDB replica set, and async max-CPython on the max stable MongoDB + sharded cluster and the remaining versions, with coverage on latest. The + names carry no distro; the platform tags restrict the cells (macOS arm64 + starts at 6.0, win32 has no free-threaded CPython) (PYTHON-6167).""" + all_platforms = ["macos", "macos-arm64", "win32", "win64"] + corners = [ + # Sync, min Python, min deps, min MongoDB, no auth, no SSL, standalone. + ( + MIN_VERSION, + "standalone", + MIN_PYTHON, + "sync", + ["macos", "win32", "win64"], + {}, + ), + # Sync, max free-threaded CPython, middle MongoDB, noauth, SSL, replica set. + ( + MIDDLE_VERSION, + "replica_set", + FREE_THREADED_PYTHON, + "sync", + ["macos", "macos-arm64", "win64"], + {}, + ), + # Async, max CPython, max stable MongoDB, auth, SSL, sharded cluster. + (MAX_VERSION, "sharded_cluster", MAX_PYTHON, "async", all_platforms, {}), + # The max-CPython sharded task across the remaining MongoDB versions; + # the latest cell collects coverage. + *[ + ( + version, + "sharded_cluster", + MAX_PYTHON, + "async", + # macOS arm64 only works on server versions 6.0+. + ["macos", "win32", "win64"] if version == "5.0" else all_platforms, + {}, + ) + for version in ALL_VERSIONS + if version not in (MIN_VERSION, MIDDLE_VERSION, MAX_VERSION) + ], + ] + return [ + _create_suite_task( "test-standard", - f"server-{version}", - f"python-{python}", - f"{topology}-{auth}-{ssl}", + version, + topology, + python, sync, - ] - if "t" in python: - tags.append("free-threaded") - if pr: - tags.append("pr") - expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) - if python == ALL_PYTHONS[0]: - expansions["TEST_MIN_DEPS"] = "1" - if pr or (version == "latest" and python != ALL_PYTHONS[0]): - expansions["COVERAGE"] = "1" - name = get_task_name("test-standard", python=python, sync=sync, **expansions) - server_func = FunctionCall(func="run server", vars=expansions) - test_vars = expansions.copy() - test_vars["UV_PYTHON"] = python - test_vars["TEST_NAME"] = f"default_{sync}" - test_func = FunctionCall(func="run tests", vars=test_vars) - tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) - return tasks + "default", + distros=platforms, + **kwargs, + ) + for version, topology, python, sync, platforms, kwargs in corners + ] def create_no_orchestration_tasks(): @@ -1384,6 +1572,8 @@ def create_run_server_func(): "LOAD_BALANCER", "LOCAL_ATLAS", "NO_EXT", + # The orchestration picks the disableTestCommands config from it. + "DISABLE_TEST_COMMANDS", # The AWS credentials are needed to download the "latest" nightly # build from the private S3 bucket, see DRIVERS-3628. "AWS_ACCESS_KEY_ID", @@ -1422,6 +1612,10 @@ def create_run_tests_func(): "IS_WIN32", "REQUIRE_FIPS", "TEST_MIN_DEPS", + "SYNC", + # setup_tests.py reads it to wire the crypt_shared lib directory for + # the crypt_shared tasks. + "TEST_CRYPT_SHARED", ] args = [".evergreen/just.sh", "setup-tests", "${TEST_NAME}", "${SUB_TEST_NAME}"] setup_cmd = get_subprocess_exec(include_expansions_in_env=includes, args=args) @@ -1430,7 +1624,7 @@ def create_run_tests_func(): def create_test_numpy_func(): - includes = ["UV_PYTHON", "COVERAGE"] + includes = ["UV_PYTHON", "COVERAGE", "IS_WIN32"] test_cmd = get_subprocess_exec( include_expansions_in_env=includes, args=[".evergreen/just.sh", "test-numpy"] ) diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index 0ba291ab5b..643d1df981 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -30,6 +30,7 @@ MIN_PYTHON = CPYTHONS[0] MAX_PYTHON = CPYTHONS[-1] FREE_THREADED_PYTHON = [p for p in CPYTHONS if "t" in p][-1] +CPYTHONS_NO_FREE_THREADED = [p for p in CPYTHONS if "t" not in p] MIN_VERSION = min((v for v in ALL_VERSIONS if v[0].isdigit()), key=float) MAX_VERSION = max((v for v in ALL_VERSIONS if v[0].isdigit()), key=float) BATCHTIME_WEEK = 10080 @@ -226,6 +227,13 @@ def get_standard_auth_ssl(topology): return auth, ssl +def get_suite_mode(topology): + """The sync mode of a per-suite cell, following the encryption corners: + sync on the standalone and replica-set cells, async on the sharded + clusters.""" + return "async" if topology == "sharded_cluster" else "sync" + + def get_assume_role(**kwargs): kwargs.setdefault("command_type", EvgCommandType.SETUP) kwargs.setdefault("role_arn", "${assume_role_arn}") diff --git a/.evergreen/scripts/run_tests.py b/.evergreen/scripts/run_tests.py index 7193cd9146..c5a6b19df1 100644 --- a/.evergreen/scripts/run_tests.py +++ b/.evergreen/scripts/run_tests.py @@ -85,6 +85,15 @@ def handle_green_framework() -> None: LOGGER.info(f"Running tests with {GREEN_FRAMEWORK}...") +def handle_load_balancer_marker() -> None: + """Select the full default suite alongside the load-balancer-marked tests. + + The pytest addopts only select the implicit default markers, which + pytest_conf.py does not grant to the load-balancer-marked modules + (PYTHON-6167).""" + TEST_ARGS.extend(["-m", "default or default_async or load_balancer"]) + + def handle_c_ext() -> None: if platform.python_implementation() != "CPython": return @@ -144,6 +153,8 @@ def run() -> None: # Handle green framework first so they can patch modules. if GREEN_FRAMEWORK: handle_green_framework() + elif TEST_NAME == "load_balancer": + handle_load_balancer_marker() # Ensure C extensions if applicable. if not os.environ.get("NO_EXT"): diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index 28e0666eaf..44de7136d3 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -5,6 +5,7 @@ import platform import shutil import stat +import subprocess from pathlib import Path from urllib import request @@ -168,6 +169,41 @@ def load_config_from_file(path: str | Path) -> dict[str, str]: return config +def ensure_openssl3() -> None: + """Build a local OpenSSL 3 when the system library is older (PYTHON-6167). + + cryptography 47+ refuses OpenSSL 1.1.x; sources install-openssl3.sh from + drivers-evergreen-tools, exporting OPENSSL_DIR and LD_LIBRARY_PATH. + """ + if PLATFORM != "linux": + return + openssl = shutil.which("openssl") + if openssl: + version = subprocess.run( # noqa: S603 + [openssl, "version"], capture_output=True, text=True, check=True + ).stdout.split()[1] + if int(version.split(".")[0]) >= 3: + return + LOGGER.info("No system OpenSSL 3: building one into the drivers-evergreen-tools prefix...") + env = subprocess.run( # noqa: S603 + [ + "/bin/bash", + "-c", + '. "$1" >/dev/null && env', + "bash", + f"{DRIVERS_TOOLS}/.evergreen/install-openssl3.sh", + ], + capture_output=True, + text=True, + check=True, + ).stdout + for line in env.splitlines(): + name, _, value = line.partition("=") + if name in ("OPENSSL_DIR", "LD_LIBRARY_PATH"): + os.environ[name] = value + write_env(name, value) + + def get_secrets(name: str) -> dict[str, str]: secrets_dir = Path(f"{DRIVERS_TOOLS}/.evergreen/secrets_handling") run_command(f"bash {secrets_dir.as_posix()}/setup-secrets.sh {name}", cwd=secrets_dir) @@ -439,18 +475,30 @@ def handle_test_env() -> None: if sub_test_name == "pyopenssl": UV_ARGS.append("--extra ocsp") + if test_name == "encryption" or sub_test_name == "pyopenssl": + # The free-threaded cells build cryptography from source, which + # refuses OpenSSL 1.1: build OpenSSL 3 on linux (PYTHON-6167). + if "t" in os.environ.get("UV_PYTHON", ""): + ensure_openssl3() + if opts.crypt_shared: + # Preserve the flag for the tests, which run their crypt_shared cases + # only when it is set. + write_env("TEST_CRYPT_SHARED", "1") config = read_env(f"{DRIVERS_TOOLS}/mo-expansion.sh") CRYPT_SHARED_DIR = Path(config["CRYPT_SHARED_LIB_PATH"]).parent.as_posix() LOGGER.info("Using crypt_shared_dir %s", CRYPT_SHARED_DIR) + # The trailing expansions must stay live; escape the literal prefix. + escaped_dir = CRYPT_SHARED_DIR.replace("$", "\\$").replace("`", "\\`") if PLATFORM == "windows": - write_env("PATH", f"{CRYPT_SHARED_DIR}:$PATH") + write_env("PATH", f"{escaped_dir}:$PATH", escape=False) else: write_env( "DYLD_FALLBACK_LIBRARY_PATH", - f"{CRYPT_SHARED_DIR}:${{DYLD_FALLBACK_LIBRARY_PATH:-}}", + f"{escaped_dir}:${{DYLD_FALLBACK_LIBRARY_PATH:-}}", + escape=False, ) - write_env("LD_LIBRARY_PATH", f"{CRYPT_SHARED_DIR}:${{LD_LIBRARY_PATH:-}}") + write_env("LD_LIBRARY_PATH", f"{escaped_dir}:${{LD_LIBRARY_PATH:-}}", escape=False) if test_name == "kms": from kms_tester import setup_kms @@ -546,6 +594,12 @@ def handle_test_env() -> None: TEST_SUITE = TEST_SUITE_MAP.get(test_name) if TEST_SUITE: TEST_ARGS = f"-m {TEST_SUITE} {TEST_ARGS}" + # Suites sharing one pytest marker across test/ and test/asynchronous/ + # select the sync or async half by path when SYNC is set. + if opts.sync == "async": + TEST_ARGS = f"test/asynchronous {TEST_ARGS}" + elif opts.sync == "sync": + TEST_ARGS = f"--ignore=test/asynchronous {TEST_ARGS}" write_env("TEST_ARGS", TEST_ARGS) write_env("UV_ARGS", " ".join(UV_ARGS)) diff --git a/.evergreen/scripts/test_generate_config.py b/.evergreen/scripts/test_generate_config.py index f078f2f305..95759eb2ce 100644 --- a/.evergreen/scripts/test_generate_config.py +++ b/.evergreen/scripts/test_generate_config.py @@ -36,6 +36,43 @@ def pr_tasks(): return [task for task in all_tasks() if "pr" in (task.tags or [])] +def family_tasks(family, crypt_shared=None): + """The tasks of one per-suite family, optionally filtered by the + crypt-shared tag.""" + return [ + task + for task in all_tasks() + if family in (task.tags or []) + and (crypt_shared is None or ("crypt-shared" in (task.tags or [])) == crypt_shared) + ] + + +def group_by_version(tasks): + """Group the tasks by their VERSION var, preserving order.""" + by_version = {} + for task in tasks: + by_version.setdefault(task_vars(task).get("VERSION"), []).append(task) + return by_version + + +def assert_covers_versions(label, tasks, expected): + """The tasks cover exactly the expected set of server versions.""" + versions = {task_vars(task).get("VERSION") for task in tasks} + assert versions == set(expected), f"{label} versions: {sorted(versions)}" + + +def assert_modes(label, tasks, expected): + """Each task carries the sync or async tag matching its SYNC var, and the + tasks cover the expected set of modes.""" + modes = set() + for task in tasks: + tags = task.tags or [] + mode = "sync" if "sync" in tags else "async" + modes.add(mode) + assert task_vars(task).get("SYNC") == mode, f"{label} {task.name}" + assert modes == set(expected), f"{label} modes: {sorted(modes)}, want {sorted(expected)}" + + def all_variants(): variants = [] for name, func in getmembers(generate_config, isfunction): @@ -72,6 +109,17 @@ def variant_selects(variant, task): return False +def test_run_tests_env_carries_crypt_shared(): + """The run tests setup env carries TEST_CRYPT_SHARED, which + setup_tests.py reads to wire the crypt_shared lib directory for the + crypt_shared twins (PYTHON-6167).""" + _, cmds = generate_config.create_run_tests_func() + setup_cmd = cmds[0] + includes = setup_cmd.params["include_expansions_in_env"] + assert "TEST_CRYPT_SHARED" in includes, includes + assert "LIBMONGOCRYPT_URL" in includes, includes + + def test_pr_tasks_pin_max_version(): """Task-level pins: pr tasks pin MAX_VERSION (the "latest" nightly is unstable); the explicit 4.4 min-deps pin is the exception. Variant-merged @@ -189,8 +237,7 @@ def test_pr_min_deps_tasks_also_run_coverage(): def test_standard_family_pr_budget(): """Patch-build PR budget: at most 5 pr-tagged test-standard tasks (the - pre-pin baseline), at most 3 on Python 3.14+ (the ubuntu22 compression - filter).""" + pre-pin baseline), at most 3 on Python 3.14+.""" tasks = [task for task in pr_tasks() if "test-standard" in (task.tags or [])] assert len(tasks) <= 5, f"too many test-standard PR tasks: {[t.name for t in tasks]}" newer = [ @@ -205,14 +252,11 @@ def test_standard_family_pr_budget(): def test_pr_tasks_run_coverage(): - """Pr tasks that pin a server version run with COVERAGE=1; no-cov - companions and infrastructure tasks (no VERSION) are exempt.""" + """Pr tasks that pin a server version run with COVERAGE=1.""" offenders = [ task.name for task in pr_tasks() - if task_vars(task).get("VERSION") is not None - and "test-non-standard-no-cov" not in (task.tags or []) - and task_vars(task).get("COVERAGE") != "1" + if task_vars(task).get("VERSION") is not None and task_vars(task).get("COVERAGE") != "1" ] assert not offenders, f"PR tasks without COVERAGE: {offenders}" @@ -229,9 +273,14 @@ def test_rotated_tasks_keep_nightly_coverage(): continue rotated_latest = "server-latest" in tags or ("ocsp-ecdsa" in tags and "latest" in tags) is_tested = ("test-standard" in tags and "server-latest" in tags) or ( - "test-non-standard" in tags + any( + t in tags + for t in ("test-encryption", "test-encryption-pyopenssl", "test-load-balancer") + ) and "server-latest" in tags and "sharded_cluster-auth-ssl" in tags + and "macos" not in tags + and "win64" not in tags ) is_aws_max_python = ( "auth-aws" in tags @@ -265,14 +314,623 @@ def test_rotated_tasks_keep_nightly_coverage(): assert not offenders, f"nightly 9.0 OCSP tasks not on min-deps Python: {offenders}" -def test_non_standard_cov_tasks_have_no_cov_companions(): - """Each non-standard coverage task also emits a no-cov companion, so the - macOS/Win64 encryption variants (which filter .cov) have a task to - activate in patch builds.""" - no_cov = {task.name for task in all_tasks() if "test-non-standard-no-cov" in (task.tags or [])} - for task in all_tasks(): - if "test-non-standard-no-cov" in (task.tags or []): - assert "pr" not in (task.tags or []), f"no-cov companion tagged pr: {task.name}" - elif "cov" in (task.tags or []) and "test-non-standard" in (task.tags or []): - companion = task.name.removesuffix("-cov") - assert companion in no_cov, f"missing no-cov companion for {task.name}" +def test_load_balancer_marker_selection(monkeypatch): + """The load balancer tasks select the full default suite alongside the + load-balancer-marked tests: pytest_conf.py only grants the implicit + default markers to unmarked tests, so the load_balancer marker must be + selected explicitly (PYTHON-6167).""" + import run_tests + + monkeypatch.setattr(run_tests, "TEST_NAME", "load_balancer") + monkeypatch.setattr(run_tests, "GREEN_FRAMEWORK", None) + monkeypatch.setattr(run_tests, "TEST_ARGS", ["--ignore=test/asynchronous"]) + run_tests.handle_load_balancer_marker() + assert run_tests.TEST_ARGS[-2:] == [ + "-m", + "default or default_async or load_balancer", + ] + + +def test_ensure_openssl3_escapes_persisted_values(monkeypatch, tmp_path): + """ensure_openssl3() passes the install-openssl3.sh path to bash as a + positional argument and persists the exported values shell-escaped in + env.sh, so a DRIVERS_TOOLS path carrying command substitution cannot + execute at write time or when the environment file is sourced + (PYTHON-6167).""" + import subprocess + + import setup_tests + import utils + + monkeypatch.setattr(setup_tests, "PLATFORM", "linux") + env_file = tmp_path / "test-env.sh" + monkeypatch.setattr(utils, "ENV_FILE", env_file) + monkeypatch.setattr(setup_tests, "ENV_FILE", env_file) + + # A system openssl older than 3.0 forces the source path. + fake_openssl = tmp_path / "openssl" + fake_openssl.write_text('#!/bin/sh\necho "OpenSSL 1.1.1w 11 Sep 2023"\n') + fake_openssl.chmod(0o755) + monkeypatch.setattr(setup_tests.shutil, "which", lambda _name: str(fake_openssl)) + + # The drivers-evergreen-tools path carries a command substitution payload, + # reflected into the exported values by the install script. + payload_dir = tmp_path / "dr$(touch pwned.txt)vers" + script_dir = payload_dir / ".evergreen" + script_dir.mkdir(parents=True) + script = script_dir / "install-openssl3.sh" + script.write_text(f"export OPENSSL_DIR='{script_dir}/openssl3'\n") + monkeypatch.setenv("DRIVERS_TOOLS", str(payload_dir)) + monkeypatch.setattr(setup_tests, "DRIVERS_TOOLS", str(payload_dir)) + + setup_tests.ensure_openssl3() + + # The payload must not have executed at write time... + assert not (Path.cwd() / "pwned.txt").exists() + assert not (tmp_path / "pwned.txt").exists() + # ...nor when the persisted environment is sourced: the values round-trip + # literally. + env = subprocess.run( # noqa: S603 + ["/bin/bash", "-c", '. "$1" >/dev/null && env', "bash", str(env_file)], + capture_output=True, + text=True, + check=True, + cwd=str(tmp_path), + ).stdout + assert f"OPENSSL_DIR={script_dir}/openssl3" in env + assert not (Path.cwd() / "pwned.txt").exists() + assert not (tmp_path / "pwned.txt").exists() + + +def test_crypt_shared_persisted_to_env(monkeypatch, tmp_path): + """The crypt_shared setup persists TEST_CRYPT_SHARED to the test + environment: the encryption tests use it to decide whether to run their + crypt_shared cases (PYTHON-6167).""" + import setup_tests + import utils + + monkeypatch.setattr(setup_tests, "check_drivers_tools", lambda: None) + monkeypatch.setattr(setup_tests, "run_command", lambda *args, **kwargs: None) + monkeypatch.setattr(setup_tests, "ensure_openssl3", lambda: None) + env_file = tmp_path / "test-env.sh" + monkeypatch.setattr(utils, "ENV_FILE", env_file) + monkeypatch.setattr(setup_tests, "ENV_FILE", env_file) + drivers_tools = tmp_path / "drivers-tools" + mo_expansion = drivers_tools / "mo-expansion.sh" + mo_expansion.parent.mkdir(parents=True) + mo_expansion.write_text('CRYPT_SHARED_LIB_PATH="/crypt_shared/lib/mongo_crypt.so"\n') + monkeypatch.setenv("DRIVERS_TOOLS", str(drivers_tools)) + monkeypatch.setattr(setup_tests, "DRIVERS_TOOLS", str(drivers_tools)) + monkeypatch.setenv("TEST_CRYPT_SHARED", "1") + monkeypatch.setattr(sys, "argv", ["setup_tests.py", "default"]) + + setup_tests.handle_test_env() + + env_lines = env_file.read_text().splitlines() + assert 'export TEST_CRYPT_SHARED="1"' in env_lines, env_lines + assert any( + line.startswith("export LD_LIBRARY_PATH=") and "/crypt_shared/lib" in line + for line in env_lines + ), env_lines + + +def test_sync_option_env_override(monkeypatch): + """The SYNC env var selects the --sync option (PYTHON-6167).""" + import utils + + monkeypatch.setattr(sys, "argv", ["setup_tests.py", "encryption"]) + monkeypatch.delenv("SYNC", raising=False) + opts, _ = utils.get_test_options("Set up the test environment.") + assert opts.sync is None + monkeypatch.setenv("SYNC", "async") + opts, _ = utils.get_test_options("Set up the test environment.") + assert opts.sync == "async" + + +SUITE_FAMILIES = { + "test-encryption": "encryption", + "test-encryption-pyopenssl": "encryption", + "test-load-balancer": "load_balancer", + "test-doctest": "doctest", + "test-compression": "default", + "test-pyopenssl": "default", + "test-gevent": "default", + "test-disable-test-commands": "default", + "test-no-c-ext": "default", + "test-stable-api": "default", + "test-standard": "default", + "test-storage-inmemory": "default", +} + + +def test_suite_families(): + """Each per-suite family identifies its suite in its name and TEST_NAME, + runs its deliberate matrix size, never mixes min-deps with coverage, and + is selected only by its own variants (PYTHON-6167).""" + sizes = { + # The three standard corners plus the max-CPython sharded task across + # the remaining MongoDB versions (8 per group), with rhel8-only + # coverage twins of the max-stable and latest cells (10 per group), + # doubled for the crypt_shared twins. + "test-encryption": 20, + # PyOpenSSL encryption runs on RHEL 8 only: one 8-task group. + "test-encryption-pyopenssl": 8, + # One sync and one async all-sharded task per version 6.0+, running + # the full default suite. + "test-load-balancer": 12, + # One standalone task per server version. + "test-doctest": 8, + # One sync task per compressor on the latest replica set plus one + # async sharded-cluster task per compressor and version. + "test-compression": 24, + # One task per server version per distro: sync on the latest replica + # set, async on the sharded-cluster rotation. + "test-pyopenssl": 8, + "test-gevent": 8, + # One task per server version: sync on the standalone and replica-set + # cells, async on the sharded-cluster cells. + "test-disable-test-commands": 8, + "test-no-c-ext": 8, + # One accept-v2 standalone task and one require-v1 sharded-cluster + # task per server version 5.0+. + "test-stable-api": 14, + # One task per server version: the encryption corners spread across + # the four non-linux platforms (arm64 6.0+, no free-threaded win32). + "test-standard": 8, + # One sync standalone task per server version on the InMemory engine. + "test-storage-inmemory": 8, + } + for family, suite in SUITE_FAMILIES.items(): + tasks = [task for task in all_tasks() if family in (task.tags or [])] + assert len(tasks) == sizes[family], f"{family} has {len(tasks)} tasks, want {sizes[family]}" + for task in tasks: + where = f"{family} {task.name}" + assert task.name.startswith(family), where + assert task_vars(task).get("TEST_NAME") == suite, where + vars = task_vars(task) + assert not (vars.get("TEST_MIN_DEPS") == "1" and vars.get("COVERAGE") == "1"), ( + f"{where} mixes min-deps with coverage" + ) + offenders = [ + task.name + for task in all_tasks() + if any(tag.startswith("test-non-standard") for tag in (task.tags or [])) + ] + assert not offenders, f"test-non-standard tasks remain: {offenders}" + + # The per-suite pr pins: the encryption suites pin the RHEL 8 + # sharded-cluster task on MAX_VERSION with coverage; the other families + # have no pr pin. + expected_pins = {"test-encryption": 2, "test-encryption-pyopenssl": 1} + pins_by_family = {} + for task in pr_tasks(): + for family in expected_pins: + if family in (task.tags or []): + pins_by_family.setdefault(family, []).append(task) + assert set(pins_by_family) == set(expected_pins), f"per-suite pr pins: {sorted(pins_by_family)}" + for family, pins in pins_by_family.items(): + assert len(pins) == expected_pins[family], f"{family} pr pins: {[t.name for t in pins]}" + for pin in pins: + tags = pin.tags or [] + assert "rhel8" in tags, pin.name + assert "cov" in tags, pin.name + assert task_vars(pin).get("VERSION") == generate_config_utils.MAX_VERSION, pin.name + assert task_vars(pin).get("UV_PYTHON") == generate_config_utils.MAX_PYTHON, pin.name + + # No variant runs another suite's tasks. + for variant in all_variants(): + selected = [task for task in all_tasks() if variant_selects(variant, task)] + families = { + family for task in selected for family in SUITE_FAMILIES if family in (task.tags or []) + } + if variant.name == "encryption-rhel8": + expected = {"test-encryption", "test-encryption-pyopenssl"} + elif variant.name.startswith("encryption"): + expected = {"test-encryption"} + elif variant.name == "load-balancer": + expected = {"test-load-balancer"} + elif variant.name.startswith("doctests"): + expected = {"test-doctest"} + elif variant.name.startswith("compression"): + expected = {"test-compression"} + elif variant.name.startswith("pyopenssl"): + expected = {"test-pyopenssl"} + elif variant.name.startswith("green-gevent"): + expected = {"test-gevent"} + elif variant.name.startswith("disable-test-commands"): + expected = {"test-disable-test-commands"} + elif variant.name.startswith("no-c-ext"): + expected = {"test-no-c-ext"} + elif variant.name.startswith("stable-api"): + expected = {"test-stable-api"} + elif variant.name.startswith("test-macos") or variant.name.startswith("test-win"): + expected = {"test-standard"} + elif variant.name.startswith("storage-inmemory"): + expected = {"test-storage-inmemory"} + else: + expected = set() + assert families == expected, ( + f"{variant.name} selects {sorted(families)}, want {sorted(expected)}" + ) + + +def corner_rows(split_coverage): + """The encryption-corner cells shared by the encryption and standard + families: version -> (python, topology tag, sync mode, min deps, task + count). The three-distro encryption family splits the max-stable and + latest cells into a plain task plus a rhel8-only coverage twin; a family + without the split folds coverage into the single task.""" + corners = { + # Sync, min Python, min deps, min MongoDB, standalone. + generate_config_utils.MIN_VERSION: ( + generate_config_utils.MIN_PYTHON, + "standalone-noauth-nossl", + "sync", + True, + 1, + ), + # Async, max CPython, max stable MongoDB, sharded cluster. + generate_config.MAX_VERSION: ( + generate_config_utils.MAX_PYTHON, + "sharded_cluster-auth-ssl", + "async", + False, + 2 if split_coverage else 1, + ), + # Sync, max free-threaded CPython, middle MongoDB, replica set. + generate_config.MIDDLE_VERSION: ( + generate_config_utils.FREE_THREADED_PYTHON, + "replica_set-noauth-ssl", + "sync", + False, + 1, + ), + } + for version in set(generate_config_utils.ALL_VERSIONS) - set(corners): + corners[version] = ( + generate_config_utils.MAX_PYTHON, + "sharded_cluster-auth-ssl", + "async", + False, + 2 if version == "latest" and split_coverage else 1, + ) + return corners + + +def assert_corner_cells(label, cells, row): + """The corner cell(s) of one version run the corner's Python, topology, + sync mode, and min-deps.""" + python, topology, mode, min_deps, count = row + assert len(cells) == count, f"{label}: {len(cells)} tasks, want {count}" + for task in cells: + where = f"{label} {task.name}" + assert f"python-{python}" in (task.tags or []), where + assert topology in (task.tags or []), where + assert mode in (task.tags or []), where + assert task_vars(task).get("UV_PYTHON") == python, where + assert (task_vars(task).get("TEST_MIN_DEPS") == "1") == min_deps, where + + +def test_encryption_shape(): + """Per test type: the three standard corners — sync min-Python min-deps on + the min MongoDB standalone, async max-CPython on the max stable MongoDB + sharded cluster, and sync max free-threaded CPython on the middle MongoDB + replica set — plus the max-CPython sharded task across the remaining + MongoDB versions, including latest and rapid. The names carry no distro; + every encryption variant runs the shared tasks, with the max-stable and + latest coverage twins riding rhel8 only (PYTHON-6167).""" + for family, crypt_shared in ( + ("test-encryption", False), + ("test-encryption", True), + ("test-encryption-pyopenssl", False), + ): + if crypt_shared and family != "test-encryption": + continue + group = family_tasks(family, crypt_shared=crypt_shared) + label = f"{family}/crypt_shared={crypt_shared}" + assert group, f"{label} has no tasks" + by_version = group_by_version(group) + assert_covers_versions(label, group, generate_config_utils.ALL_VERSIONS) + + # The three-distro family splits the max-stable and latest cells into + # a plain task plus a rhel8-only coverage twin; the rhel8-only + # pyopenssl family folds coverage into the single task. + corners = corner_rows(family == "test-encryption") + for version, row in corners.items(): + assert_corner_cells(f"{label} {version}", by_version[version], row) + # The crypt_shared tasks mirror the regular cells and set + # TEST_CRYPT_SHARED on the run server call; free-threaded + # encryption-pyopenssl cells ride RHEL 8 only. + if crypt_shared: + regular = family_tasks(family, crypt_shared=False) + assert {t.name.replace("-crypt-shared", "") for t in group} == { + t.name for t in regular + }, "crypt_shared tasks do not mirror the regular cells" + # The shared tasks carry every distro tag; the twins only rhel8. + for task in group: + tags = task.tags or [] + assert "ubuntu22" not in tags, task.name + assert {"rhel8", "macos", "win64"} & set(tags), f"{task.name} carries no distro tag" + if "cov" in tags or "pr" in tags: + assert "rhel8" in tags, task.name + assert not {"macos", "win64"} & set(tags), task.name + if "free-threaded" in tags and family == "test-encryption-pyopenssl": + assert "rhel8" in tags, task.name + servers = [ + (task, c) + for task in group + for c in task.commands or [] + if getattr(c, "func", None) == "run server" + ] + if crypt_shared: + for task, server in servers: + assert server.vars.get("TEST_CRYPT_SHARED") == "true", task.name + # Every encryption variant lists the same coverage of all versions. + for variant in all_variants(): + if not variant.name.startswith("encryption") or not variant.name.endswith( + ("rhel8", "macos", "win64") + ): + continue + if family == "test-encryption-pyopenssl" and variant.name != "encryption-rhel8": + # The pyopenssl encryption tasks ride the RHEL 8 variant only. + assert not [t for t in group if variant_selects(variant, t)], variant.name + continue + selected = [task for task in group if variant_selects(variant, task)] + selected_versions = {task_vars(task).get("VERSION") for task in selected} + assert selected_versions == set(generate_config_utils.ALL_VERSIONS), ( + f"{variant.name} versions: {sorted(selected_versions)}" + ) + + +def test_compression_shape(): + """Compression: one sync task per compressor on the latest replica set plus + one async sharded-cluster task per compressor and MongoDB version for every + other version, so each compressor is tested against every MongoDB version + without duplicating cells; every task enables its compressor + (PYTHON-6167).""" + tasks = family_tasks("test-compression") + assert tasks, "test-compression has no tasks" + for compressor in ("snappy", "zlib", "zstd"): + group = [t for t in tasks if f"test-compression-{compressor}" in t.name] + assert_covers_versions(compressor, group, generate_config_utils.ALL_VERSIONS) + by_version = group_by_version(group) + primary = by_version["latest"][0] + assert "replica_set-noauth-ssl" in (primary.tags or []), primary.name + assert_modes(f"{compressor} latest", [primary], {"sync"}) + for version, cell_tasks in by_version.items(): + if version == "latest": + continue + assert len(cell_tasks) == 1, ( + f"{compressor} {version} cells: {[t.name for t in cell_tasks]}" + ) + cell = cell_tasks[0] + assert "sharded_cluster-auth-ssl" in (cell.tags or []), cell.name + assert_modes(f"{compressor} {version}", [cell], {"async"}) + for task in tasks: + assert task_vars(task).get("COMPRESSORS"), f"{task.name} does not set COMPRESSORS" + + +def test_stable_api_shape(): + """Stable API: one consolidated family — a sync accept-v2 standalone task + and an async require-v1 sharded-cluster task per MongoDB version 5.0+, + with the CPython rotated across the versions. The require-v1 tasks start + the server with requireApiVersion=1 and pin apiVersion=1 on the suite; the + accept-v2 tasks use the versioned-api orchestration without pinning an + apiVersion; every stable-api variant lists all versions (PYTHON-6167).""" + tasks = family_tasks("test-stable-api") + assert tasks, "test-stable-api has no tasks" + by_version = group_by_version(tasks) + assert_covers_versions("stable api", tasks, generate_config_utils.get_versions_from("5.0")) + for version, cells in by_version.items(): + assert len(cells) == 2, f"{version} cells: {[t.name for t in cells]}" + require_v1 = [t for t in cells if "-require-v1-" in t.name] + accept_v2 = [t for t in cells if "-accept-v2-" in t.name] + assert len(require_v1) == 1, f"{version} require-v1 cells: {[t.name for t in cells]}" + assert len(accept_v2) == 1, f"{version} accept-v2 cells: {[t.name for t in cells]}" + # Async, auth, SSL, sharded cluster with requireApiVersion=1. + task = require_v1[0] + where = f"stable api {task.name}" + tags = task.tags or [] + assert "sharded_cluster-auth-ssl" in tags, where + assert "async" in tags, where + vars = task_vars(task) + assert vars.get("REQUIRE_API_VERSION") == "1", where + assert vars.get("MONGODB_API_VERSION") == "1", where + servers = [c for c in task.commands or [] if getattr(c, "func", None) == "run server"] + assert servers[0].vars.get("REQUIRE_API_VERSION") == "1", where + # Sync, noauth, no SSL, standalone from the versioned-api orchestration. + task = accept_v2[0] + where = f"stable api {task.name}" + tags = task.tags or [] + assert "standalone-noauth-nossl" in tags, where + assert "sync" in tags, where + vars = task_vars(task) + assert vars.get("ORCHESTRATION_FILE") == "versioned-api-testing.json", where + assert not vars.get("MONGODB_API_VERSION"), where + servers = [c for c in task.commands or [] if getattr(c, "func", None) == "run server"] + assert servers[0].vars.get("ORCHESTRATION_FILE") == "versioned-api-testing.json", where + + +def test_standard_shape(): + """The standard family: one task per MongoDB version following the + encryption corners — sync min-Python min-deps on the min MongoDB + standalone, sync max free-threaded CPython on the middle MongoDB replica + set, async max-CPython on the max stable MongoDB sharded cluster and the + remaining versions, with coverage on latest. The names carry no distro; + the platform tags restrict the cells: macos-arm64 starts at 6.0 and win32 + gets no free-threaded CPython; every platform variant lists its full + version coverage (PYTHON-6167).""" + tasks = family_tasks("test-standard") + assert tasks, "test-standard has no tasks" + by_version = group_by_version(tasks) + assert_covers_versions("standard", tasks, generate_config_utils.ALL_VERSIONS) + corners = corner_rows(split_coverage=False) + # The platform tags restrict the cells: macOS arm64 only works on server + # versions 6.0+, and win32 gets no free-threaded CPython. + platforms = { + generate_config_utils.MIN_VERSION: {"macos", "win32", "win64"}, + generate_config.MIDDLE_VERSION: {"macos", "macos-arm64", "win64"}, + "5.0": {"macos", "win32", "win64"}, + } + for version, (python, topology, mode, min_deps, count) in corners.items(): + cells = by_version[version] + assert len(cells) == count, f"{version} cells: {[t.name for t in cells]}" + cell_platforms = platforms.get(version) or { + "macos", + "macos-arm64", + "win32", + "win64", + } + task = cells[0] + where = f"standard {task.name}" + assert_corner_cells(f"standard {version}", cells, (python, topology, mode, min_deps, 1)) + assert set(cell_platforms) <= set(task.tags or []), where + assert not ("free-threaded" in (task.tags or []) and "win32" in cell_platforms), where + latest = by_version["latest"][0] + assert "cov" in (latest.tags or []), latest.name + assert task_vars(latest).get("COVERAGE") == "1", latest.name + # Every platform variant lists its full version coverage: macOS arm64 + # starts at 6.0, and win32 skips the free-threaded middle corner. + for variant in all_variants(): + if not variant.name.startswith("test-macos") and not variant.name.startswith("test-win"): + continue + selected = [task for task in tasks if variant_selects(variant, task)] + selected_versions = {task_vars(task).get("VERSION") for task in selected} + if variant.name == "test-macos-arm64": + expected = set(generate_config_utils.get_versions_from("6.0")) + elif variant.name == "test-win32": + expected = set(generate_config_utils.ALL_VERSIONS) - {generate_config.MIDDLE_VERSION} + else: + expected = set(generate_config_utils.ALL_VERSIONS) + assert selected_versions == expected, ( + f"{variant.name} versions: {sorted(selected_versions)}" + ) + + +def test_per_version_families_cover_every_server_version(): + """The per-version families cover every server version without duplicating + cells: PyOpenSSL (SUB_TEST_NAME=pyopenssl), disable-test-commands + (DISABLE_TEST_COMMANDS=1), no-c-ext (NO_EXT=1), and gevent + (GREEN_FRAMEWORK=gevent) assign the sync mode like the encryption corners — + sync on the standalone and replica-set cells, async on the sharded-cluster + cells, except gevent which only runs the sync half — load balancer runs a + sync and an async all-sharded task per version 6.0+ covering the full + suite, and storage-inmemory runs one sync standalone task per version + (PYTHON-6167).""" + for family, distros, extra_var, split_modes, per_version in ( + ("test-pyopenssl", ("rhel8", "macos", "win64"), "SUB_TEST_NAME", True, 1), + ("test-gevent", ("",), "GREEN_FRAMEWORK", False, 1), + ("test-disable-test-commands", ("",), "DISABLE_TEST_COMMANDS", True, 1), + ("test-no-c-ext", ("",), "NO_EXT", True, 1), + ("test-load-balancer", ("",), None, True, 2), + ("test-storage-inmemory", ("",), "STORAGE_ENGINE", True, 1), + ): + for distro in distros: + group = [ + task for task in family_tasks(family) if not distro or distro in (task.tags or []) + ] + label = f"{family}/{distro or 'any'}" + assert group, f"{label} has no tasks" + by_version = group_by_version(group) + # Load balancer support starts with MongoDB 6.0. + expected_versions = set( + generate_config_utils.get_versions_from("6.0") + if family == "test-load-balancer" + else generate_config_utils.ALL_VERSIONS + ) + assert_covers_versions(label, group, expected_versions) + for version, cell_tasks in by_version.items(): + assert len(cell_tasks) == per_version, ( + f"{label} {version} cells: {[t.name for t in cell_tasks]}" + ) + if per_version == 2: + assert_modes(label, cell_tasks, {"sync", "async"}) + for task in group: + tags = task.tags or [] + where = f"{label} {task.name}" + if extra_var: + assert task_vars(task).get(extra_var), f"{where} does not set {extra_var}" + topology = next( + tag + for tag in tags + if tag.startswith(("standalone", "replica_set", "sharded_cluster")) + ) + if split_modes and per_version == 2: + # One sync and one async all-sharded task per version. + assert task_vars(task).get("SYNC") == ("sync" if "sync" in tags else "async"), ( + where + ) + elif split_modes: + # Sync on the standalone and replica-set cells, async on + # the sharded clusters, like the encryption corners. + expected_mode = "async" if topology.startswith("sharded") else "sync" + assert expected_mode in tags, where + assert task_vars(task).get("SYNC") == expected_mode, where + elif family == "test-gevent": + # Gevent only runs the sync half; the async tests are + # excluded under the framework. + assert "sync" in tags, where + assert "async" not in tags, where + assert task_vars(task).get("SYNC") == "sync", where + else: + # Load balancer runs both halves in its single task. + assert not {"sync", "async"} & set(tags), where + if family in ("test-gevent", "test-disable-test-commands", "test-no-c-ext"): + # One topology per version, cycling through all three. + topologies = { + next( + tag + for tag in (task.tags or []) + if tag.startswith(("standalone", "replica_set", "sharded_cluster")) + ) + for task in group + } + assert topologies == { + "standalone-noauth-nossl", + "replica_set-noauth-ssl", + "sharded_cluster-auth-ssl", + }, f"{label} topologies: {sorted(topologies)}" + if family == "test-load-balancer": + # Load balancer support requires an authenticated SSL sharded cluster. + assert all( + "sharded_cluster-auth-ssl" in (task.tags or []) and "auth" in (task.tags or []) + for task in group + ), label + if family == "test-disable-test-commands": + # DISABLE_TEST_COMMANDS must reach the run server call, whose + # orchestration picks the disableTestCommands config from it. + for task in group: + servers = [ + c for c in task.commands or [] if getattr(c, "func", None) == "run server" + ] + assert len(servers) == 1, f"{task.name} has no single run server call" + assert servers[0].vars.get("DISABLE_TEST_COMMANDS") == "1", ( + f"{task.name} does not pass DISABLE_TEST_COMMANDS to the server" + ) + if family == "test-storage-inmemory": + # The InMemory engine runs on standalone servers. + assert all("standalone-noauth-nossl" in (task.tags or []) for task in group), label + # Free-threaded CPython only rotates on RHEL 8, the distro + # setup_tests.py equips with OpenSSL 3; gevent does not support it. + if family in ("test-gevent", "test-pyopenssl"): + assert not [t for t in group if "free-threaded" in (t.tags or [])], label + + +def test_numpy_win32_tasks_run_on_windows_only(): + """The win32 numpy tasks use the 32-bit toolchain (IS_WIN32) and are + selected only by the windows variant (PYTHON-6167).""" + win32_tasks = [task for task in all_tasks() if "test-numpy-win32" in (task.tags or [])] + assert win32_tasks, "no win32 numpy tasks" + for task in win32_tasks: + assert "test-numpy" not in (task.tags or []), task.name + assert task_vars(task).get("IS_WIN32") == "1", task.name + for variant in all_variants(): + if not variant.name.startswith("test-numpy"): + continue + selected = [task for task in win32_tasks if variant_selects(variant, task)] + if variant.name == "test-numpy-windows": + assert selected, "the windows numpy variant does not run the win32 tasks" + else: + assert not selected, ( + f"{variant.name} runs the win32 tasks: {[t.name for t in selected]}" + ) diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index fb69539f16..9b93e78310 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -44,7 +44,9 @@ class Distro: "enterprise_auth": "auth", "search_index": "search_index", "kms": "kms", - "load_balancer": "load_balancer", + # No marker: the load balancer tasks run the full default suite, whose + # load-balancer-marked tests are part of it. + "load_balancer": "", "mockupdb": "mockupdb", "ocsp": "ocsp", "perf": "perf", @@ -223,6 +225,14 @@ def get_test_options( other_group.add_argument( "--disable-test-commands", action="store_true", help="Disable test commands." ) + other_group.add_argument( + "--sync", + choices=["sync", "async"], + help=( + "Run only the sync or async half of a directory-split suite " + "(the tests live in test/ and test/asynchronous/ and share one marker)." + ), + ) # Get the options. if not allow_extra_opts: @@ -290,10 +300,17 @@ def read_env(path: Path | str) -> dict[str, str]: return config -def write_env(name: str, value: Any = "1") -> None: +def write_env(name: str, value: Any = "1", escape: bool = True) -> None: + """Append an export line for the value to the test environment file. + + The value is persisted literally: command substitutions in it are escaped, + so sourcing the file never executes them. Pass escape=False for values + that must keep live expansions, like a trailing `$PATH` (PYTHON-6167).""" with ENV_FILE.open("a", newline="\n") as fid: - # Remove any existing quote chars. value = str(value).replace('"', "") + if escape: + # Double quotes expand `$` and backticks: keep the value literal. + value = value.replace("$", "\\$").replace("`", "\\`") fid.write(f'export {name}="{value}"\n') diff --git a/drivers-evergreen-tools b/drivers-evergreen-tools index 354a81692b..f33b31d5ce 160000 --- a/drivers-evergreen-tools +++ b/drivers-evergreen-tools @@ -1 +1 @@ -Subproject commit 354a81692bfd2b654a38277b681d248507d17800 +Subproject commit f33b31d5ce6c444c698dba95077c1c088776a870