diff --git a/.evergreen/generated_configs/functions.yml b/.evergreen/generated_configs/functions.yml index cca9166af5..f27d11892b 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 - FUZZ_MAX_TIME type: test - command: subprocess.exec @@ -255,6 +258,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 2bcc195224..61aa9be67b 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -89,7 +89,11 @@ tasks: UV_PYTHON: "3.11" TEST_MIN_DEPS: "1" COVERAGE: "1" - tags: [auth-aws, auth-aws-regular, pr] + tags: + - auth-aws + - auth-aws-regular + - pr + - rhel8 - name: test-auth-aws-9.0-regular-python3.15-cov commands: - func: run server @@ -103,7 +107,11 @@ tasks: SUB_TEST_NAME: regular UV_PYTHON: "3.15" COVERAGE: "1" - tags: [auth-aws, auth-aws-regular, pr] + tags: + - auth-aws + - auth-aws-regular + - pr + - rhel8 - name: test-auth-aws-9.0-web-identity-python3.15t commands: - func: run server @@ -3795,1090 +3803,1318 @@ 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-cov commands: - func: run server vars: + TEST_NAME: default AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "9.0" + COVERAGE: "1" - 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" + COVERAGE: "1" + 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 + - pr + - cov + - 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 + + # 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" - TEST_MIN_DEPS: "1" + 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" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + SSL: ssl + TOPOLOGY: replica_set + VERSION: latest + SYNC: sync + COMPRESSORS: snappy 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-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: 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: zlib 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-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" - 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: zstd 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-snappy-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" - UV_PYTHON: "3.14" - TEST_NAME: default_sync + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-6.0 - - python-3.14 - - replica_set-noauth-ssl - - sync - - name: test-standard-v6.0-python3.12-sync-auth-ssl-sharded-cluster + - test-compression + - server-4.4 + - python-3.11 + - sharded_cluster-auth-ssl + - 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.12" - TEST_NAME: default_sync + VERSION: "5.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-6.0 + - test-compression + - server-5.0 - python-3.12 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v6.0-python3.15t-sync-auth-ssl-sharded-cluster + - auth + - async + - name: test-compression-snappy-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" - UV_PYTHON: 3.15t - TEST_NAME: default_sync + SYNC: async + COMPRESSORS: snappy tags: - - test-standard + - test-compression - server-6.0 - - python-3.15t + - python-3.13 - sharded_cluster-auth-ssl - - sync - - free-threaded - - name: test-standard-v6.0-python3.14t-sync-noauth-nossl-standalone + - auth + - async + - name: test-compression-snappy-v7.0-python3.14t-async-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" + TEST_NAME: default UV_PYTHON: 3.14t - TEST_NAME: default_sync + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-6.0 + - test-compression + - server-7.0 - python-3.14t - - standalone-noauth-nossl - - sync + - sharded_cluster-auth-ssl + - auth + - async - free-threaded - - name: test-standard-v7.0-python3.11-async-noauth-ssl-replica-set-min-deps + - 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" - TEST_MIN_DEPS: "1" + TOPOLOGY: sharded_cluster + VERSION: "8.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.14" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "8.0" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 - - python-3.11 - - replica_set-noauth-ssl + - test-compression + - server-8.0 + - python-3.14 + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.14-async-noauth-ssl-replica-set + - name: test-compression-snappy-v9.0-python3.15t-async-auth-ssl-sharded-cluster-cov commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "7.0" - UV_PYTHON: "3.14" - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 - - python-3.14 - - replica_set-noauth-ssl + - test-compression + - server-9.0 + - python-3.15t + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.12-async-auth-ssl-sharded-cluster + - free-threaded + - pr + - cov + - 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.12" - TEST_NAME: default_async + VERSION: rapid + SYNC: async + COMPRESSORS: snappy tags: - - test-standard - - server-7.0 - - python-3.12 + - test-compression + - server-rapid + - python-3.15 - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v7.0-python3.15t-async-auth-ssl-sharded-cluster + - name: test-compression-zlib-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: "7.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: "7.0" - UV_PYTHON: 3.15t - TEST_NAME: default_async + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-7.0 - - python-3.15t + - test-compression + - server-4.4 + - python-3.11 - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-v7.0-python3.14t-async-noauth-nossl-standalone + - name: test-compression-zlib-v5.0-python3.12-async-auth-ssl-sharded-cluster 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: "5.0" - 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.12" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-7.0 - - python-3.14t - - standalone-noauth-nossl + - test-compression + - server-5.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-v8.0-python3.14t-sync-noauth-ssl-replica-set + - name: test-compression-zlib-v6.0-python3.13-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: "6.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "8.0" + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: async + COMPRESSORS: zlib + tags: + - test-compression + - server-6.0 + - python-3.13 + - sharded_cluster-auth-ssl + - 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: "7.0" + - func: run tests + vars: + TEST_NAME: default UV_PYTHON: 3.14t - TEST_NAME: default_sync + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "7.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 + - test-compression + - server-7.0 - python-3.14t - - replica_set-noauth-ssl - - sync + - sharded_cluster-auth-ssl + - auth + - async - free-threaded - - name: test-standard-v8.0-python3.11-sync-auth-ssl-sharded-cluster-min-deps + - name: test-compression-zlib-v8.0-python3.14-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" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_sync + SYNC: async + COMPRESSORS: zlib tags: - - test-standard + - test-compression - server-8.0 - - python-3.11 + - python-3.14 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v8.0-python3.14-sync-auth-ssl-sharded-cluster + - auth + - async + - name: test-compression-zlib-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: "8.0" + VERSION: "9.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" - UV_PYTHON: "3.14" - TEST_NAME: default_sync + VERSION: "9.0" + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 - - python-3.14 + - test-compression + - server-9.0 + - python-3.15t - sharded_cluster-auth-ssl - - sync - - name: test-standard-v8.0-python3.13-sync-noauth-nossl-standalone + - auth + - async + - free-threaded + - name: test-compression-zlib-rapid-python3.15-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: rapid - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" - UV_PYTHON: "3.13" - TEST_NAME: default_sync + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + COMPRESSORS: zlib tags: - - test-standard - - server-8.0 - - python-3.13 - - standalone-noauth-nossl - - sync - - name: test-standard-v8.0-python3.15-sync-noauth-nossl-standalone + - test-compression + - server-rapid + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-compression-zstd-v4.4-python3.11-async-auth-ssl-sharded-cluster-min-deps 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: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" - UV_PYTHON: "3.15" - TEST_NAME: default_sync + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "4.4" + TEST_MIN_DEPS: "1" + SYNC: async + COMPRESSORS: zstd 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 + - test-compression + - server-4.4 + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - async + - name: test-compression-zstd-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: "9.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: "9.0" - UV_PYTHON: 3.14t - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "5.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.14t - - replica_set-noauth-ssl + - test-compression + - server-5.0 + - python-3.12 + - sharded_cluster-auth-ssl + - auth - async - - free-threaded - - name: test-standard-v9.0-python3.15-async-noauth-ssl-replica-set-cov + - name: test-compression-zstd-v6.0-python3.13-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: "6.0" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: "3.13" + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: "9.0" - COVERAGE: "1" - UV_PYTHON: "3.15" - TEST_NAME: default_async + TOPOLOGY: sharded_cluster + VERSION: "6.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.15 - - replica_set-noauth-ssl + - test-compression + - server-6.0 + - python-3.13 + - 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-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: "9.0" - TEST_MIN_DEPS: "1" + VERSION: "7.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.14t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" - TEST_MIN_DEPS: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + VERSION: "7.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 - - python-3.11 + - test-compression + - server-7.0 + - python-3.14t - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.14-async-auth-ssl-sharded-cluster + - free-threaded + - name: test-compression-zstd-v8.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" + VERSION: "8.0" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "9.0" - UV_PYTHON: "3.14" - TEST_NAME: default_async + VERSION: "8.0" + SYNC: async + COMPRESSORS: zstd tags: - - test-standard - - server-9.0 + - test-compression + - server-8.0 - python-3.14 - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.15t-sync-auth-ssl-sharded-cluster-cov + - name: test-compression-zstd-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" - COVERAGE: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: 3.15t AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "9.0" - COVERAGE: "1" - UV_PYTHON: 3.15t - TEST_NAME: default_sync + SYNC: async + COMPRESSORS: zstd tags: - - test-standard + - test-compression - server-9.0 - python-3.15t - sharded_cluster-auth-ssl - - sync + - auth + - async - free-threaded - - pr - - name: test-standard-v9.0-python3.11-async-noauth-nossl-standalone-min-deps-cov + - name: test-compression-zstd-rapid-python3.15-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.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + SYNC: async + COMPRESSORS: zstd + tags: + - test-compression + - server-rapid + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - async + + # 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: nossl TOPOLOGY: standalone - VERSION: "9.0" + VERSION: "4.4" + DISABLE_TEST_COMMANDS: "1" TEST_MIN_DEPS: "1" - COVERAGE: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.11" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "9.0" + VERSION: "4.4" + DISABLE_TEST_COMMANDS: "1" TEST_MIN_DEPS: "1" - COVERAGE: "1" - UV_PYTHON: "3.11" - TEST_NAME: default_async + SYNC: sync tags: - - test-standard - - server-9.0 + - test-disable-test-commands + - server-4.4 - python-3.11 - standalone-noauth-nossl - - async - - pr - - name: test-standard-v9.0-python3.13-async-noauth-nossl-standalone + - 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: nossl - TOPOLOGY: standalone - VERSION: "9.0" + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.12" AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "9.0" + SSL: ssl + TOPOLOGY: replica_set + VERSION: "5.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync + tags: + - test-disable-test-commands + - server-5.0 + - python-3.12 + - replica_set-noauth-ssl + - 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: "6.0" + DISABLE_TEST_COMMANDS: "1" + - func: run tests + vars: + TEST_NAME: default UV_PYTHON: "3.13" - TEST_NAME: default_async + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "6.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: async tags: - - test-standard - - server-9.0 + - test-disable-test-commands + - server-6.0 - python-3.13 - - standalone-noauth-nossl + - sharded_cluster-auth-ssl + - auth - async - - name: test-standard-v9.0-python3.15-async-noauth-nossl-standalone + - 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: "9.0" + 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: "9.0" - UV_PYTHON: "3.15" - TEST_NAME: default_async + VERSION: "7.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard - - server-9.0 - - python-3.15 + - test-disable-test-commands + - server-7.0 + - python-3.14t - standalone-noauth-nossl - - async - - name: test-standard-latest-python3.13-async-noauth-ssl-replica-set-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: ssl TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" + VERSION: "8.0" + DISABLE_TEST_COMMANDS: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.13" - TEST_NAME: default_async + VERSION: "8.0" + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard - - server-latest - - python-3.13 + - test-disable-test-commands + - server-8.0 + - python-3.14 - replica_set-noauth-ssl - - async - - name: test-standard-latest-python3.15-async-noauth-ssl-replica-set-cov + - noauth + - sync + - name: test-disable-test-commands-v9.0-python3.15t-async-auth-ssl-sharded-cluster-cov commands: - func: run server vars: - AUTH: noauth + TEST_NAME: default + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: latest + TOPOLOGY: sharded_cluster + VERSION: "9.0" + DISABLE_TEST_COMMANDS: "1" COVERAGE: "1" - func: run tests vars: - AUTH: noauth + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth SSL: ssl - TOPOLOGY: replica_set - VERSION: latest + TOPOLOGY: sharded_cluster + VERSION: "9.0" + DISABLE_TEST_COMMANDS: "1" COVERAGE: "1" + SYNC: async + tags: + - test-disable-test-commands + - server-9.0 + - python-3.15t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - pr + - cov + - name: test-disable-test-commands-rapid-python3.15-sync-noauth-nossl-standalone + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + DISABLE_TEST_COMMANDS: "1" + - func: run tests + vars: + TEST_NAME: default UV_PYTHON: "3.15" - TEST_NAME: default_async + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid + DISABLE_TEST_COMMANDS: "1" + SYNC: sync tags: - - test-standard - - server-latest + - test-disable-test-commands + - server-rapid - python-3.15 - - replica_set-noauth-ssl - - async - - name: test-standard-latest-python3.14t-async-auth-ssl-sharded-cluster-cov + - standalone-noauth-nossl + - noauth + - sync + - name: test-disable-test-commands-latest-python3.11-sync-noauth-ssl-replica-set-min-deps commands: - func: run server vars: - AUTH: auth + TEST_NAME: default + AUTH: noauth SSL: ssl - TOPOLOGY: sharded_cluster + TOPOLOGY: replica_set VERSION: latest - COVERAGE: "1" + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: auth + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: noauth SSL: ssl - TOPOLOGY: sharded_cluster + TOPOLOGY: replica_set VERSION: latest - COVERAGE: "1" - UV_PYTHON: 3.14t - TEST_NAME: default_async + DISABLE_TEST_COMMANDS: "1" + TEST_MIN_DEPS: "1" + SYNC: sync tags: - - test-standard + - test-disable-test-commands - server-latest - - python-3.14t - - sharded_cluster-auth-ssl - - async - - free-threaded - - name: test-standard-latest-python3.12-async-noauth-nossl-standalone-cov + - python-3.11 + - replica_set-noauth-ssl + - noauth + - sync + + # Test doctest tests + - name: test-doctest-v4.4-python3.11-noauth-nossl-standalone-min-deps commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" + VERSION: "4.4" + TEST_MIN_DEPS: "1" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.11" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" - UV_PYTHON: "3.12" - TEST_NAME: default_async + VERSION: "4.4" + TEST_MIN_DEPS: "1" tags: - - test-standard - - server-latest - - python-3.12 + - test-doctest + - server-4.4 + - python-3.11 - standalone-noauth-nossl - - async - - name: test-standard-latest-python3.15t-async-noauth-nossl-standalone-cov + - 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: latest - COVERAGE: "1" + VERSION: "5.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.12" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: latest - COVERAGE: "1" - UV_PYTHON: 3.15t - TEST_NAME: default_async + VERSION: "5.0" tags: - - test-standard - - server-latest - - python-3.15t + - test-doctest + - server-5.0 + - python-3.12 - standalone-noauth-nossl - - async - - free-threaded - - name: test-standard-rapid-python3.13-sync-noauth-ssl-replica-set + - noauth + - name: test-doctest-v6.0-python3.13-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid + SSL: nossl + TOPOLOGY: standalone + VERSION: "6.0" - func: run tests vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid + TEST_NAME: doctest UV_PYTHON: "3.13" - TEST_NAME: default_sync + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "6.0" tags: - - test-standard - - server-rapid + - test-doctest + - server-6.0 - python-3.13 - - replica_set-noauth-ssl - - sync - - name: test-standard-rapid-python3.15-sync-noauth-ssl-replica-set + - standalone-noauth-nossl + - noauth + - name: test-doctest-v7.0-python3.14t-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest 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.15" - TEST_NAME: default_sync - tags: - - test-standard - - server-rapid - - python-3.15 - - replica_set-noauth-ssl - - sync - - name: test-standard-rapid-python3.14t-sync-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" - func: run tests vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid + TEST_NAME: doctest UV_PYTHON: 3.14t - TEST_NAME: default_sync + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "7.0" tags: - - test-standard - - server-rapid + - test-doctest + - server-7.0 - python-3.14t - - sharded_cluster-auth-ssl - - sync + - standalone-noauth-nossl + - noauth - free-threaded - - name: test-standard-rapid-python3.12-sync-noauth-nossl-standalone + - name: test-doctest-v8.0-python3.14-noauth-nossl-standalone commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: "8.0" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.14" AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid - UV_PYTHON: "3.12" - TEST_NAME: default_sync + VERSION: "8.0" tags: - - test-standard - - server-rapid - - python-3.12 + - test-doctest + - server-8.0 + - python-3.14 - standalone-noauth-nossl - - sync - - name: test-standard-rapid-python3.15t-sync-noauth-nossl-standalone + - noauth + - name: test-doctest-v9.0-python3.15t-noauth-nossl-standalone-cov commands: - func: run server vars: + TEST_NAME: doctest AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: "9.0" + COVERAGE: "1" - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: 3.15t AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid - UV_PYTHON: 3.15t - TEST_NAME: default_sync + VERSION: "9.0" + COVERAGE: "1" tags: - - test-standard - - server-rapid + - test-doctest + - server-9.0 - python-3.15t - standalone-noauth-nossl - - sync + - noauth - free-threaded - - # Test non standard tests - - name: test-non-standard-v4.4-python3.12-noauth-ssl-replica-set + - pr + - cov + - name: test-doctest-rapid-python3.15-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: rapid - func: run tests vars: + TEST_NAME: doctest + UV_PYTHON: "3.15" AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "4.4" - UV_PYTHON: "3.12" + SSL: nossl + TOPOLOGY: standalone + VERSION: rapid tags: - - test-non-standard - - server-4.4 - - python-3.12 - - replica_set-noauth-ssl + - test-doctest + - server-rapid + - python-3.15 + - standalone-noauth-nossl - noauth - - name: test-non-standard-v4.4-python3.13-auth-ssl-sharded-cluster + - name: test-doctest-latest-python3.11-noauth-nossl-standalone-min-deps 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: latest + TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.4" - UV_PYTHON: "3.13" + TEST_NAME: doctest + UV_PYTHON: "3.11" + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + TEST_MIN_DEPS: "1" 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-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 @@ -4886,565 +5122,2340 @@ tasks: 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" - UV_PYTHON: "3.11" + SUB_TEST_NAME: pyopenssl + SYNC: sync tags: - - test-non-standard + - test-encryption-pyopenssl - server-4.4 - python-3.11 - standalone-noauth-nossl - noauth - - name: test-non-standard-v5.0-python3.14-noauth-ssl-replica-set + - 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 + - pr + - 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 + - pr + - 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 + - name: test-gevent-v9.0-python3.15-sync-auth-ssl-sharded-cluster-cov + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: "3.15" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: sync + GREEN_FRAMEWORK: gevent + tags: + - test-gevent + - server-9.0 + - python-3.15 + - sharded_cluster-auth-ssl + - auth + - rhel8 + - sync + - pr + - cov + + # 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-cov + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.14t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: sync + tags: + - test-load-balancer + - server-9.0 + - python-3.14t + - sharded_cluster-auth-ssl + - auth + - sync + - free-threaded + - pr + - cov + - 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-cov + commands: + - func: run server + vars: + TEST_NAME: load_balancer + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: load_balancer + UV_PYTHON: 3.14t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: async + tags: + - test-load-balancer + - server-9.0 + - python-3.14t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - pr + - cov + - 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-cov + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: "9.0" + COVERAGE: "1" + SYNC: async + NO_EXT: "1" + tags: + - test-no-c-ext + - server-9.0 + - python-3.15t + - sharded_cluster-auth-ssl + - auth + - async + - free-threaded + - pr + - cov + - 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 + - rhel8 + - 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-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 + - name: test-pyopenssl-v9.0-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: "9.0" + 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.15t + VERSION: "9.0" + COVERAGE: "1" + SUB_TEST_NAME: pyopenssl + SYNC: async tags: - - test-non-standard - - server-5.0 - - python-3.15t + - test-pyopenssl + - server-9.0 + - python-3.15 - sharded_cluster-auth-ssl - auth - - free-threaded - - name: test-non-standard-v5.0-python3.14t-noauth-nossl-standalone + - rhel8 + - async + - pr + - cov + + # 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: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + 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: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + TEST_NAME: default + UV_PYTHON: "3.11" + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: "5.0" - UV_PYTHON: 3.14t + 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.14t - - standalone-noauth-nossl - - noauth - - free-threaded - - name: test-non-standard-v6.0-python3.11-noauth-ssl-replica-set-min-deps + - python-3.11 + - sharded_cluster-auth-ssl + - auth + - 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: ssl - TOPOLOGY: replica_set - VERSION: "6.0" + 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: ssl - TOPOLOGY: replica_set - VERSION: "6.0" + SSL: nossl + TOPOLOGY: standalone + VERSION: "5.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 + - name: test-stable-api-require-v1-v9.0-python3.14-async-auth-ssl-sharded-cluster-cov 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" COVERAGE: "1" - func: run tests vars: + TEST_NAME: default + UV_PYTHON: "3.14" AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "9.0" + REQUIRE_API_VERSION: "1" + MONGODB_API_VERSION: "1" COVERAGE: "1" - UV_PYTHON: "3.15" + SYNC: async tags: - - test-non-standard + - test-stable-api - server-9.0 - - python-3.15 + - python-3.14 - sharded_cluster-auth-ssl - auth + - async - pr - cov - - name: test-non-standard-v9.0-python3.15-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.15" - tags: - - test-non-standard-no-cov - - server-9.0 - - python-3.15 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v9.0-python3.12-noauth-nossl-standalone + - name: test-stable-api-accept-v2-v9.0-python3.14-sync-noauth-nossl-standalone-cov commands: - func: run server vars: + TEST_NAME: default AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "9.0" + ORCHESTRATION_FILE: versioned-api-testing.json + COVERAGE: "1" - 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 + COVERAGE: "1" + 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 + - sync + - pr - cov - - name: test-non-standard-latest-python3.13-auth-ssl-sharded-cluster + - 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 @@ -5671,3 +7682,231 @@ 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-cov + commands: + - func: run server + vars: + TEST_NAME: default + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" + STORAGE_ENGINE: inmemory + COVERAGE: "1" + - func: run tests + vars: + TEST_NAME: default + UV_PYTHON: 3.15t + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: "9.0" + STORAGE_ENGINE: inmemory + COVERAGE: "1" + SYNC: sync + tags: + - test-storage-inmemory + - server-9.0 + - python-3.15t + - standalone-noauth-nossl + - noauth + - sync + - free-threaded + - pr + - cov + - 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 d2b382a28b..3f98551e27 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -76,21 +76,18 @@ buildvariants: display_name: Auth AWS RHEL8 run_on: - rhel8.10-small - tags: [] - name: auth-aws-win64 tasks: - - name: .auth-aws + - name: .auth-aws !.rhel8 display_name: Auth AWS Win64 run_on: - windows-2022-latest-small - tags: [] - name: auth-aws-macos tasks: - - name: .auth-aws !.auth-aws-web-identity !.auth-aws-ec2 + - name: .auth-aws !.auth-aws-web-identity !.auth-aws-ec2 !.rhel8 display_name: Auth AWS macOS run_on: - macos-14 - tags: [pr] - name: auth-aws-ecs-ubuntu-24 tasks: - name: .auth-aws-ecs @@ -116,41 +113,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,125 +131,45 @@ 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-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 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 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 - 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 - 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 - 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 @@ -331,12 +219,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 @@ -362,18 +248,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 @@ -397,12 +276,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 @@ -421,13 +298,6 @@ buildvariants: run_on: - rhel8.10-small batchtime: 10080 - - name: ocsp-staples-rhel8 - tasks: - - name: .ocsp-staple .pr - display_name: OCSP Staples RHEL8 - run_on: - - rhel8.10-small - tags: [pr] - name: ocsp-win64 tasks: - name: .ocsp-rsa !.ocsp-staple .latest @@ -490,45 +360,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] # Sanitizer tests - name: sanitizer-rhel8 @@ -637,63 +487,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: @@ -701,7 +520,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 @@ -712,12 +531,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 @@ -727,33 +544,18 @@ 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 !.rhel8 + - 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: - - name: .test-numpy + - name: .test-numpy !.rhel8 display_name: Test Numpy macOS Arm64 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 270f9be75a..816610186c 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -13,7 +13,6 @@ C_EXTS, CPYTHONS, DEFAULT_HOST, - FREE_THREADED_PYTHON, HOSTS, MAX_PYTHON, MAX_VERSION, @@ -47,6 +46,23 @@ git_get_project, ) from shrub.v3.evg_task import EvgTask, EvgTaskDependency, EvgTaskRef + +# Re-exported so the writer scans and the tests discover the per-suite +# family creators alongside this module's own creators. +from task_suite_families import ( # noqa: F401 + create_standard_tasks, + create_test_compression_tasks, + create_test_disable_test_commands_tasks, + create_test_doctest_tasks, + create_test_encryption_pyopenssl_tasks, + create_test_encryption_tasks, + create_test_gevent_tasks, + create_test_load_balancer_tasks, + create_test_no_c_ext_tasks, + create_test_pyopenssl_tasks, + create_test_stable_api_tasks, + create_test_storage_inmemory_tasks, +) from utils import PERF_PYTHON_VERSION if TYPE_CHECKING: @@ -62,6 +78,9 @@ def create_ocsp_variants() -> list[BuildVariant]: # OCSP tests on default host with all servers v4.4+. # MongoDB servers on Windows and MacOS do not staple OCSP responses and only support RSA. # Only test with MongoDB 4.4 and latest. + # The stapled OCSP tasks (tagged "pr") run in the rhel8 variant on every PR + # so cryptography-backend regressions, like the min-deps ML-KEM breakage in + # PYTHON-6032, are caught before merge instead of on the next weekly batch run. for host_name in ["rhel8", "win64", "macos"]: host = HOSTS[host_name] if host == DEFAULT_HOST: @@ -75,18 +94,6 @@ def create_ocsp_variants() -> list[BuildVariant]: batchtime=BATCHTIME_WEEK, ) variants.append(variant) - # Run the stapled OCSP tasks (tagged "pr") on every PR so cryptography-backend - # regressions, like the min-deps ML-KEM breakage in PYTHON-6032, are caught before merge - # instead of on the next weekly batch run. - if host == DEFAULT_HOST: - variants.append( - create_variant( - [".ocsp-staple .pr"], - get_variant_name("OCSP Staples", host), - tags=["pr"], - host=host, - ) - ) return variants @@ -114,23 +121,22 @@ def create_standard_nonlinux_variants() -> list[BuildVariant]: variants = [] base_display_name = "* Test" - # Test a subset on each of the other platforms. + # The platform tags restrict the cells: macOS arm64 starts at 6.0, and + # 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 @@ -140,140 +146,37 @@ 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"] - 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", - ] - 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"], + # Each variant picks its distro group(s). + for host in ["rhel8", "macos", "win64"]: + tasks = [f".test-encryption .{host}"] + 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(): @@ -294,137 +197,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 selects the 32-bit toolchain. + tags.append("test-numpy-win32") + vars["IS_WIN32"] = "1" + name_base += "-win32" + else: + tags.append("test-numpy") + if python == MIN_MAX_PYTHON[-1]: + # PRs run numpy on Linux only. + tags.extend(["pr", "rhel8"]) + 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 @@ -432,18 +296,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"): - tasks = [".test-numpy"] + # The custom win64 display name avoids create_variant's "Win64" redirect; + # the Intel macOS host is untested. + for host_name, display_name in ( + ("rhel8", None), + ("win64", f"{base_display_name} Windows"), + ("macos-arm64", None), + ): + # The pr-pinned numpy task runs on Linux only. + tasks = [".test-numpy !.rhel8"] + if host_name == "win64": + tasks.append(".test-numpy-win32") host = HOSTS[host_name] tags = ["binary", "vector"] if host_name == "rhel8": + tasks = [".test-numpy"] 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 @@ -508,13 +379,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, ) ] @@ -605,19 +474,17 @@ def create_aws_auth_variants(): for host_name in ["rhel8", "win64", "macos"]: expansions = dict() - tasks = [".auth-aws"] - tags = [] + # The pr-pinned auth-aws tasks run on Linux only. + tasks = [".auth-aws !.rhel8"] if host_name == "macos": - tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ec2"] - tags = ["pr"] - elif host_name == "win64": + tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ec2 !.rhel8"] + elif host_name == "rhel8": tasks = [".auth-aws"] host = HOSTS[host_name] variant = create_variant( tasks, get_variant_name("Auth AWS", host), host=host, - tags=tags, expansions=expansions, ) variants.append(variant) @@ -783,65 +650,6 @@ def create_no_toolchain_tasks(): return tasks -def create_test_non_standard_tasks(): - """For variants that set a TEST_NAME.""" - 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]) - ) - return tasks - - def create_test_standard_auth_tasks(): """We only use auth on sharded clusters""" tasks = [] @@ -882,55 +690,6 @@ def create_test_standard_auth_tasks(): return 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 = [ - "test-standard", - f"server-{version}", - f"python-{python}", - f"{topology}-{auth}-{ssl}", - 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 - - def create_no_orchestration_tasks(): tasks = [] for python in MIN_MAX_PYTHON: @@ -1031,7 +790,8 @@ def create_aws_tasks(): if python == MIN_MAX_PYTHON[0]: test_vars["TEST_MIN_DEPS"] = "1" if pr: - tags.append("pr") + # PRs run the auth-aws pins on Linux only. + tags.extend(["pr", "rhel8"]) if pr or python == MIN_MAX_PYTHON[-1]: test_vars["COVERAGE"] = "1" name = get_task_name(f"{base_name}-{test_type}", **test_vars) @@ -1415,6 +1175,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", @@ -1453,6 +1215,9 @@ 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. + "TEST_CRYPT_SHARED", "FUZZ_MAX_TIME", ] args = [".evergreen/just.sh", "setup-tests", "${TEST_NAME}", "${SUB_TEST_NAME}"] @@ -1462,7 +1227,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 e131bcffe0..34ca80fc89 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 @@ -227,6 +228,11 @@ def get_standard_auth_ssl(topology): return auth, ssl +def get_suite_mode(topology): + """The sync mode of a per-suite cell: sync except on 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 4e94cca970..065b6b464f 100644 --- a/.evergreen/scripts/run_tests.py +++ b/.evergreen/scripts/run_tests.py @@ -86,11 +86,11 @@ def handle_green_framework() -> None: def handle_load_balancer_marker() -> None: - """Select the full default suite plus the load-balancer-marked tests. + """Select the full default suite alongside the load-balancer-marked tests. - The last ``-m`` wins over the one setup_tests.py wrote, and - pytest_conf.py grants the implicit default markers only to unmarked - tests, so the expression needs an explicit ``load_balancer`` term. + 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"]) @@ -157,8 +157,7 @@ def handle_fuzz() -> None: if not inputs: raise RuntimeError("No fuzz regression inputs found in fuzz/regression/") corpus_dir = os.environ.get("FUZZ_CORPUS_DIR", str(ROOT / "fuzz-scratch" / "corpus")) - # Fail fast on a missing or empty corpus; libFuzzer would silently - # skip it. + # Fail fast on a missing or empty corpus; libFuzzer would silently skip it. corpus_files = sorted( str(p) for p in Path(corpus_dir).glob("*") if not p.name.startswith(".") ) @@ -167,8 +166,8 @@ def handle_fuzz() -> None: f"No fuzz seed corpus found in {corpus_dir}; was setup_tests.py run?" ) inputs.extend(corpus_files) - # Each input runs exactly once without random fuzzing; the -atheris_runs - # budget equals the file count so atheris exits cleanly after the last. + # Each input runs once: -atheris_runs equals the file count, so + # atheris exits cleanly after the last one. runs = len(inputs) for target in targets: run_command( @@ -178,9 +177,7 @@ def handle_fuzz() -> None: # Time-boxed fuzzing against the generated seed corpus. corpus_dir = os.environ.get("FUZZ_CORPUS_DIR", str(ROOT / "fuzz-scratch" / "corpus")) - # Fail fast on a missing or empty corpus: libFuzzer would only log - # "starting from an empty corpus" and burn the whole time budget - # without the seeds the task exists to exercise. + # Fail fast: libFuzzer would burn the whole budget without the seeds. if not any(Path(corpus_dir).glob("*")): raise RuntimeError(f"No fuzz seed corpus found in {corpus_dir}; was setup_tests.py run?") # Keep libFuzzer artifacts (crash-*, leak-*, ...) under the scratch dir. diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index c12599cbc0..d3bddb0fd1 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 import sys import zipfile from pathlib import Path @@ -25,6 +26,7 @@ get_test_options, read_env, run_command, + shell_escape, write_env, ) @@ -185,6 +187,40 @@ 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. + """ + 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) @@ -445,18 +481,29 @@ 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: + # The tests run their crypt_shared cases only when this 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 = shell_escape(CRYPT_SHARED_DIR) 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 @@ -597,6 +644,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/task_suite_families.py b/.evergreen/scripts/task_suite_families.py new file mode 100644 index 0000000000..900a2322fe --- /dev/null +++ b/.evergreen/scripts/task_suite_families.py @@ -0,0 +1,557 @@ +"""The per-suite task families of the Evergreen config (PYTHON-6167). + +Each creator builds the tasks of one suite family. generate_config.py +re-exports them so the config writer and the tests keep discovering them +alongside the other task creators. +""" + +from __future__ import annotations + +from itertools import product +from typing import Any + +from generate_config_utils import ( + ALL_PYTHONS, + ALL_VERSIONS, + CPYTHONS, + CPYTHONS_NO_FREE_THREADED, + FREE_THREADED_PYTHON, + MAX_PYTHON, + MAX_VERSION, + MIN_PYTHON, + MIN_VERSION, + SYNCS, + TOPOLOGIES, + get_standard_auth_ssl, + get_suite_mode, + get_task_name, + get_versions_from, + zip_cycle, +) +from shrub.v3.evg_command import FunctionCall +from shrub.v3.evg_task import EvgTask + +# 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 cells. +STABLE_VERSIONS = [v for v in ALL_VERSIONS if v not in ("rapid", "latest")] +MIDDLE_VERSION = STABLE_VERSIONS[len(STABLE_VERSIONS) // 2] + + +def _create_suite_task( + family: str, + version: str, + topology: str, + python: str, + sync: str, + suite: str, + sub_test: str | None = None, + crypt_shared: bool = False, + suffix: str | None = None, + extra_test_vars: dict[str, str] | None = None, + extra_expansions: dict[str, str] | None = None, + distros: list[str] | None = None, + pr: bool = False, + cov: bool | None = None, +) -> EvgTask: + """One task of a per-suite family: the name carries no distro, so every + distro variant lists the same definition, tagged with its distros + (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: str, + sub_test: str | None = None, + crypt_shared: bool = False, + distros: list[str] | None = None, +) -> list[EvgTask]: + """Encryption tasks for one test type (PYTHON-6167). + + The pr pin rides the max-stable cell on every distro; coverage rides + rhel8-only twins: the max-stable and latest cells exceed the + 60-minute timeout with coverage on macOS/Win64. + """ + all_distros = ALL_DISTROS + distros = distros or all_distros + split_coverage = distros == all_distros + tasks = [] + + def add(version: str, topology: str, python: str, sync: str, **kwargs: Any) -> None: + 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: + # The macos/win64 cell carries the pr pin without coverage: the suites + # exceed the 60-minute timeout with coverage on macOS/Win64. + add( + MAX_VERSION, + "sharded_cluster", + MAX_PYTHON, + "async", + distros=["macos", "win64"], + pr=True, + ) + 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. + 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_cov_pr_twin( + family: str, + sync: str, + sub_test: str | None = None, + extra_test_vars: dict[str, str] | None = None, +) -> EvgTask: + """Rhel8-only max-stable coverage twin carrying the pr pin: the rotated + max-stable cell can land on the min-deps Python, and coverage stays off + macOS/Win64 (PYTHON-6167). + """ + return _create_suite_task( + family, + MAX_VERSION, + "sharded_cluster", + MAX_PYTHON, + sync, + "default", + sub_test=sub_test, + distros=["rhel8"], + pr=True, + cov=True, + extra_test_vars=extra_test_vars, + ) + + +def create_test_encryption_tasks() -> list[EvgTask]: + """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() -> list[EvgTask]: + """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() -> list[EvgTask]: + """Load balancer tasks: one sync and one async task per MongoDB version + 6.0+ on a load-balanced auth SSL sharded cluster, running the full + default suite (PYTHON-6167). The v9.0 pair carries the pr pin and + coverage. + """ + tasks = [] + for sync in SYNCS: + # One CPython per version (6.0→3.11 … latest→3.15t); the trailing 3.15 is unused. + for version, python in zip(get_versions_from("6.0"), CPYTHONS, strict=False): + is_pin = version == MAX_VERSION + tasks.append( + _create_suite_task( + "test-load-balancer", + version, + "sharded_cluster", + python, + sync, + "load_balancer", + pr=is_pin, + cov=True if is_pin else None, + ) + ) + return tasks + + +def create_test_doctest_tasks() -> list[EvgTask]: + """Doctest tasks: one task per MongoDB version on a standalone server.""" + tasks = [] + for version, python in zip_cycle(ALL_VERSIONS, CPYTHONS): + is_pin = version == MAX_VERSION + tasks.append( + _create_suite_task( + "test-doctest", + version, + "standalone", + python, + "", + "doctest", + pr=is_pin, + cov=True if is_pin else None, + ) + ) + return tasks + + +def create_test_compression_tasks() -> list[EvgTask]: + """Compression tasks: one sync task per compressor on the latest replica + set plus async sharded-cluster cells on every other MongoDB version, so + each compressor meets every server version (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. The first compressor's max-stable + # cell carries the pr pin and coverage; the primaries ride "latest", + # which PRs skip. + is_pin = compressor == COMPRESSORS[0] and version == MAX_VERSION + tasks.append( + _create_suite_task( + "test-compression", + version, + "sharded_cluster", + python, + "async", + "default", + suffix=compressor, + pr=is_pin, + cov=True if is_pin else None, + extra_test_vars=dict(COMPRESSORS=compressor), + ) + ) + return tasks + + +def _per_version_cells() -> list[tuple[str, str]]: + """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() -> list[EvgTask]: + """PyOpenSSL tasks: one task per MongoDB version, running the default + suite with the PyOpenSSL extra. Free-threaded CPython is covered by the + encryption-pyopenssl family, and the rhel8 max-stable twin carries the + pr pin and coverage (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 + ) + ] + [ + _create_cov_pr_twin( + "test-pyopenssl", get_suite_mode("sharded_cluster"), sub_test="pyopenssl" + ) + ] + + +def _create_rotation_tasks( + family: str, + extra_test_vars: dict[str, str] | None = None, + extra_expansions: dict[str, str] | None = None, + pythons: list[str] = CPYTHONS, + sync: str | None = None, + pin: str | None = None, +) -> list[EvgTask]: + """One task per MongoDB version, the topology cycling through standalone, + replica set, and sharded cluster (PYTHON-6167). The max-stable cell + carries the pr pin when pin is set, with coverage for "pr+cov". + """ + tasks = [] + for version, topology, python in zip_cycle(ALL_VERSIONS, TOPOLOGIES, pythons): + is_pin = bool(pin) and version == MAX_VERSION + tasks.append( + _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, + pr=is_pin, + cov=True if is_pin and pin == "pr+cov" else None, + ) + ) + return tasks + + +def create_test_gevent_tasks() -> list[EvgTask]: + """Gevent tasks: one task per MongoDB version running the sync default + suite (async tests are excluded under the framework; free-threaded + CPython is unsupported), plus the rhel8 max-stable pr twin with coverage + (PYTHON-6167). + """ + return [ + *_create_rotation_tasks( + "test-gevent", + extra_test_vars=dict(GREEN_FRAMEWORK="gevent"), + pythons=CPYTHONS_NO_FREE_THREADED, + sync="sync", + ), + _create_cov_pr_twin("test-gevent", "sync", extra_test_vars=dict(GREEN_FRAMEWORK="gevent")), + ] + + +def create_test_disable_test_commands_tasks() -> list[EvgTask]: + """Disable-test-commands tasks: one task per MongoDB version, the + topology cycling through all three (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"), + pin="pr+cov", + ) + + +def create_test_no_c_ext_tasks() -> list[EvgTask]: + """No-c-ext tasks: one task per MongoDB version, the topology cycling + through all three, without the C extensions (NO_EXT feeds run_tests.py) + (PYTHON-6167). + """ + return _create_rotation_tasks("test-no-c-ext", extra_test_vars=dict(NO_EXT="1"), pin="pr+cov") + + +def create_test_stable_api_tasks() -> list[EvgTask]: + """Stable API tasks: one require-v1 task per MongoDB version 5.0+ on a + sharded cluster, and one accept-v2 standalone task per version + (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")), + ] + tasks = [] + for version, python in zip_cycle(get_versions_from("5.0"), CPYTHONS): + is_pin = version == MAX_VERSION + for suffix, topology, sync, extra_expansions in cells: + tasks.append( + _create_suite_task( + "test-stable-api", + version, + topology, + python, + sync, + "default", + suffix=suffix, + extra_expansions=extra_expansions, + pr=is_pin, + cov=True if is_pin else None, + ) + ) + return tasks + + +def create_test_storage_inmemory_tasks() -> list[EvgTask]: + """InMemory storage engine tasks: one sync standalone task per MongoDB + version (PYTHON-6167). + """ + tasks = [] + for version, python in zip_cycle(ALL_VERSIONS, CPYTHONS): + is_pin = version == MAX_VERSION + tasks.append( + _create_suite_task( + "test-storage-inmemory", + version, + "standalone", + python, + "sync", + "default", + extra_expansions=dict(STORAGE_ENGINE="inmemory"), + pr=is_pin, + cov=True if is_pin else None, + ) + ) + return tasks + + +def create_standard_tasks() -> list[EvgTask]: + """The standard suite on the non-Linux platforms, one task per MongoDB + version following the encryption corners; 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"], + False, + None, + ), + # Sync, max free-threaded CPython, middle MongoDB, noauth, SSL, replica set. + ( + MIDDLE_VERSION, + "replica_set", + FREE_THREADED_PYTHON, + "sync", + ["macos", "macos-arm64", "win64"], + False, + None, + ), + # Async, max CPython, max stable MongoDB, auth, SSL, sharded cluster; + # carries the pr pin and coverage. + ( + MAX_VERSION, + "sharded_cluster", + MAX_PYTHON, + "async", + all_platforms, + True, + True, + ), + # 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, + False, + None, + ) + for version in ALL_VERSIONS + if version not in (MIN_VERSION, MIDDLE_VERSION, MAX_VERSION) + ], + ] + return [ + _create_suite_task( + "test-standard", + version, + topology, + python, + sync, + "default", + distros=platforms, + pr=pr, + cov=cov, + ) + for version, topology, python, sync, platforms, pr, cov in corners + ] diff --git a/.evergreen/scripts/test_generate_config.py b/.evergreen/scripts/test_generate_config.py index 67f9e8a639..68ec8ba939 100644 --- a/.evergreen/scripts/test_generate_config.py +++ b/.evergreen/scripts/test_generate_config.py @@ -1,4 +1,5 @@ -"""Tests for the Evergreen PR task rules (PYTHON-6112). +"""Sanity checks for the Evergreen config generation, and regression tests +for the .evergreen script fixes in PYTHON-6167. Run: pytest .evergreen/scripts/test_generate_config.py -m "" (-m "" clears the repo-wide marker filter.) @@ -16,6 +17,21 @@ import generate_config import generate_config_utils +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 all_tasks(): tasks = [] @@ -73,236 +89,124 @@ def variant_selects(variant, task): return False -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 - pins are checked by test_pr_tasks_effectively_pin_max_version. - """ - offenders = [ - (task.name, task_vars(task).get("VERSION")) - for task in pr_tasks() - if task_vars(task).get("VERSION") not in (None, generate_config_utils.MAX_VERSION) - and not ( - task_vars(task).get("VERSION") == "4.4" and task_vars(task).get("TEST_MIN_DEPS") == "1" - ) - ] - assert not offenders, f"PR tasks not pinned to MAX_VERSION: {offenders}" +def test_generation_sanity(): + """The generator emits tasks and variants with unique names.""" + tasks = all_tasks() + variants = all_variants() + assert tasks, "the generator emits no tasks" + assert variants, "the generator emits no variants" + names = [task.name for task in tasks] + assert len(names) == len(set(names)), "duplicate task names" + names = [variant.name for variant in variants] + assert len(names) == len(set(names)), "duplicate variant names" -def test_pr_tasks_effectively_pin_max_version(): - """Effective pins: a pr task without its own VERSION var inherits the - selecting variant's version, so every pr task that runs a server must - resolve to MAX_VERSION once variant expansions merge in. The explicit - 4.4 min-deps pin is the exception. +def test_variants_select_tasks(): + """Every variant selects at least one task, and every suite-family task + is selected by at least one variant: a family restructured without + variant wiring would silently never run (PYTHON-6167). """ - tasks = [task for task in all_tasks() if "pr" in (task.tags or [])] - offenders = [] + tasks = all_tasks() for variant in all_variants(): - variant_version = (variant.expansions or {}).get("VERSION") - for task in tasks: - if not variant_selects(variant, task): - continue - task_vars_ = task_vars(task) - if task_vars_.get("VERSION") == "4.4" and task_vars_.get("TEST_MIN_DEPS") == "1": - continue - effective = task_vars_.get("VERSION") or variant_version - if effective is None: - # Helpers that run the stable default server, like kms-fail. - continue - if effective != generate_config_utils.MAX_VERSION: - offenders.append((variant.name, task.name, effective)) - assert not offenders, f"pr tasks not effectively pinned to MAX_VERSION: {offenders}" - - -def test_server_version_pr_tasks_selected_once(): - """A pr server-version task must be selected only by the variant running - the server version it pins. The expected family comes from - create_server_version_variants(), not from the selections: a variant - missing its PR selector would otherwise drop from both sides and the - comparison would pass. Variants outside the family must not select these - tasks (the sanitizer variant pins MAX_VERSION for its own mongod). - """ - sv_tasks = [task for task in pr_tasks() if "server-version" in (task.tags or [])] - sv_variants = generate_config.create_server_version_variants() - offenders = {} - for task in sv_tasks: - own = task_vars(task).get("VERSION") - selecting = [variant.name for variant in all_variants() if variant_selects(variant, task)] - matching = [ - variant.name - for variant in sv_variants - if (variant.expansions or {}).get("VERSION") == own - ] - if selecting != matching: - offenders[task.name] = {"selected by": selecting, "pins": own} - assert not offenders, ( - f"server-version pr tasks not selected by the variant matching their pin: {offenders}" - ) - - -def test_pr_tasks_cover_version_boundaries(): - """PRs test the server version boundaries: the newest numbered server - with every Python boundary, the min server with its min-Python floor. - """ - for version, pythons in ( - ( - generate_config_utils.MAX_VERSION, - (generate_config_utils.MIN_PYTHON, generate_config_utils.MAX_PYTHON), - ), - (generate_config_utils.MIN_VERSION, (generate_config_utils.MIN_PYTHON,)), - ): - tasks = [ - task - for task in pr_tasks() - if "server-version" in (task.tags or []) and task_vars(task).get("VERSION") == version - ] - seen = {task_vars(task).get("UV_PYTHON") for task in tasks} - assert seen == set(pythons), ( - f"{version} pr tasks pin {sorted(seen)}, want {sorted(pythons)}" + assert any(variant_selects(variant, task) for task in tasks), ( + f"{variant.name} selects no tasks" ) - assert len(tasks) >= 2, f"{version} has too few server-version pr tasks" + for family in SUITE_FAMILIES: + for task in [t for t in tasks if family in (t.tags or [])]: + assert any(variant_selects(variant, task) for variant in all_variants()), ( + f"no variant runs {task.name}" + ) -def test_server_version_rotated_tasks_keep_coverage(): - """Per-commit coverage for this family rides the rotated boundary-Python - tasks, not the pr tasks (which run only on MAX_VERSION). +def test_suite_families(): + """Each per-suite family identifies its suite in its name and TEST_NAME, + and no family task mixes min-deps with coverage (PYTHON-6167). """ - family = [task for task in all_tasks() if "server-version" in (task.tags or [])] - cov = [task for task in family if task_vars(task).get("COVERAGE") == "1"] - assert any("pr" not in (task.tags or []) for task in cov), ( - "the server-version family's only COVERAGE tasks are pr tasks" - ) - pr_pythons = { - combo: python - for combos in generate_config.SERVER_VERSION_PR_PYTHONS.values() - for combo, python in combos.items() - } - offenders = [] - for task in family: - if "pr" in (task.tags or []): - continue - vars = task_vars(task) - boundary = pr_pythons.get((vars["TOPOLOGY"], vars["AUTH"], vars["SSL"])) - if vars.get("UV_PYTHON") == boundary and vars.get("COVERAGE") != "1": - offenders.append(task.name) - assert not offenders, f"rotated server-version boundary tasks without COVERAGE: {offenders}" + for family, suite in SUITE_FAMILIES.items(): + for task in [t for t in all_tasks() if family in (t.tags or [])]: + 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" + ) -def test_pr_min_deps_tasks_also_run_coverage(): +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. + """ offenders = [ - task.name + (task.name, task_vars(task).get("VERSION")) for task in pr_tasks() - if task_vars(task).get("TEST_MIN_DEPS") == "1" and task_vars(task).get("COVERAGE") != "1" - ] - assert not offenders, f"min-deps PR tasks without COVERAGE: {offenders}" - - -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). - """ - 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 = [ - task - for task in tasks - if any( - tag in (task.tags or []) - for tag in ("python-3.14", "python-3.14t", "python-3.15", "python-3.15t") + if task_vars(task).get("VERSION") not in (None, generate_config_utils.MAX_VERSION) + and not ( + task_vars(task).get("VERSION") == "4.4" and task_vars(task).get("TEST_MIN_DEPS") == "1" ) ] - assert len(newer) <= 3, f"too many 3.14+ test-standard PR tasks: {[t.name for t in newer]}" + assert not offenders, f"PR tasks not pinned to MAX_VERSION: {offenders}" -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. +def test_suite_families_have_pr_pins(): + """Every suite family runs at least one task on PR patches, with + coverage, so a restructure cannot silently drop a family from the patch + build or the codecov report (PYTHON-6167). """ - 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" - ] - assert not offenders, f"PR tasks without COVERAGE: {offenders}" + for family in SUITE_FAMILIES: + pinned = [ + task + for task in all_tasks() + if family in (task.tags or []) and "pr" in (task.tags or []) + ] + assert pinned, f"no pr task in the {family} family" + covd = [task for task in pinned if task_vars(task).get("COVERAGE") == "1"] + assert covd, f"no pr task with coverage in the {family} family" -def test_rotated_tasks_keep_nightly_coverage(): - """Batch coverage rides the rotation independently of the pr tasks: - rotated "latest" tasks and max-Python auth-aws tasks keep COVERAGE=1 - (min-deps excepted). +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). """ - offenders = [] - for task in all_tasks(): - tags = task.tags or [] - vars = task_vars(task) - if vars.get("TEST_MIN_DEPS") == "1" or "pr" in tags: + 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 - 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 - and "server-latest" in tags - and "sharded_cluster-auth-ssl" in tags - ) - is_aws_max_python = ( - "auth-aws" in tags - and "session-name" not in task.name - and vars.get("UV_PYTHON") == generate_config_utils.MAX_PYTHON - ) - if rotated_latest and is_tested and vars.get("COVERAGE") != "1": - offenders.append(task.name) - if is_aws_max_python and vars.get("COVERAGE") != "1": - offenders.append(task.name) - assert not offenders, f"rotated tasks without nightly COVERAGE: {offenders}" - # The "latest" ECDSA staples task keeps its nightly coverage. - latest_staples = [ - task.name - for task in all_tasks() - if "ocsp-ecdsa" in (task.tags or []) - and "ocsp-staple" in (task.tags or []) - and "latest" in (task.tags or []) - and task_vars(task).get("COVERAGE") == "1" - ] - assert latest_staples, "no ECDSA staples task on the latest nightly with COVERAGE" - # The 9.0 nightly OCSP tasks stay on the min-deps Python. - offenders = [ - task.name - for task in all_tasks() - if "ocsp" in (task.tags or []) - and "9.0" in (task.tags or []) - and "pr" not in (task.tags or []) - and task_vars(task).get("TEST_MIN_DEPS") != "1" - ] - 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. + 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]}" + ) + + +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 + (PYTHON-6167). """ - 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}" + _, 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_load_balancer_marker_selection(monkeypatch): """The load balancer tasks select the load_balancer marker explicitly: pytest_conf.py only grants the implicit default markers to unmarked - tests, so the marker expression must add the full default suite - alongside the load balancer tests (PYTHON-6262). + tests (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", ["-m", "load_balancer"]) + monkeypatch.setattr(run_tests, "TEST_ARGS", ["--ignore=test/asynchronous"]) run_tests.handle_load_balancer_marker() assert run_tests.TEST_ARGS[-2:] == [ "-m", @@ -310,6 +214,227 @@ def test_load_balancer_marker_selection(monkeypatch): ] +def test_ensure_openssl3_escapes_persisted_values(monkeypatch, tmp_path): + """A DRIVERS_TOOLS path carrying command substitution must not execute + at write time or when the persisted env.sh 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_write_env_escapes_backslashes(monkeypatch, tmp_path): + """write_env escapes backslashes first, so substitution payloads and + trailing backslashes round-trip literally when the file is sourced + (PYTHON-6167). + """ + import subprocess + + import utils + + env_file = tmp_path / "test-env.sh" + monkeypatch.setattr(utils, "ENV_FILE", env_file) + + utils.write_env("PAYLOAD", "\\$(touch pwned.txt)") + utils.write_env("TRAILING", "C:\\tools\\") + utils.write_env("TICKS", "a`echo pwned`b") + + result = subprocess.run( # noqa: S603 + [ + "/bin/bash", + "-c", + '. "$1" && printf "%s\\n" "$PAYLOAD" "$TRAILING" "$TICKS"', + "bash", + str(env_file), + ], + capture_output=True, + text=True, + cwd=str(tmp_path), + check=False, # The file must source cleanly; asserted via returncode. + ) + # The file must source cleanly and every value must round-trip literally. + assert result.returncode == 0, result.stderr + assert result.stdout == "\\$(touch pwned.txt)\nC:\\tools\\\na`echo pwned`b\n" + assert not (Path.cwd() / "pwned.txt").exists() + assert not (tmp_path / "pwned.txt").exists() + + +def test_read_env_unescapes_double_quoted_escapes(monkeypatch, tmp_path): + """read_env yields the value bash sourcing would: double-quoted escapes + unescape, single-quoted values stay literal (PYTHON-6167). + """ + import subprocess + + import utils + + source = tmp_path / "secrets-export.sh" + source.write_text( + 'export DB="\\$external"\n' + "export SINGLE='\\$external'\n" + 'export TICK="a\\`echo hi\\`b"\n' + 'export QUOTE="a\\"b"\n' + 'export BS="a\\\\b"\n' + ) + config = utils.read_env(source) + assert config["DB"] == "$external" + assert config["SINGLE"] == "\\$external" + assert config["TICK"] == "a`echo hi`b" + assert config["QUOTE"] == 'a"b' + assert config["BS"] == "a\\b" + + env_file = tmp_path / "test-env.sh" + monkeypatch.setattr(utils, "ENV_FILE", env_file) + utils.write_env("SASL_DB", config["DB"]) + result = subprocess.run( # noqa: S603 + ["/bin/bash", "-c", '. "$1" && printf "%s" "$SASL_DB"', "bash", str(env_file)], + capture_output=True, + text=True, + cwd=str(tmp_path), + check=False, # The file must source cleanly; asserted via returncode. + ) + assert result.returncode == 0, result.stderr + assert result.stdout == "$external", repr(result.stdout) + + +def test_crypt_shared_escapes_backslashes(monkeypatch, tmp_path): + """The crypt_shared lib path persists literally while the trailing + LD_LIBRARY_PATH expansion stays live (PYTHON-6167). + """ + import subprocess + + 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) + # The secrets service writes the path bash-escaped; read_env sees the + # literal, so persist its escaping. + escaped_payload = "\\$(touch cs-pwned.txt)" + literal_payload = "$(touch cs-pwned.txt)" + drivers_tools = tmp_path / "drivers-tools" + mo_expansion = drivers_tools / "mo-expansion.sh" + mo_expansion.parent.mkdir(parents=True) + mo_expansion.write_text(f'CRYPT_SHARED_LIB_PATH="{escaped_payload}/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"]) + # A pre-set LD_LIBRARY_PATH proves the trailing expansion stays live + # regardless of the runner's environment. + monkeypatch.setenv("LD_LIBRARY_PATH", "/preset/lib") + + setup_tests.handle_test_env() + + result = subprocess.run( # noqa: S603 + [ + "/bin/bash", + "-c", + '. "$1" >/dev/null && printf "%s" "$LD_LIBRARY_PATH"', + "bash", + str(env_file), + ], + capture_output=True, + text=True, + cwd=str(tmp_path), + check=False, # The file must source cleanly; asserted via returncode. + ) + assert result.returncode == 0, result.stderr + # The literal prefix round-trips and the trailing expansion stays live. + assert result.stdout == f"{literal_payload}:/preset/lib", repr(result.stdout) + assert not (Path.cwd() / "cs-pwned.txt").exists() + assert not (tmp_path / "cs-pwned.txt").exists() + + +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" + + def test_sanitizer_task_wiring(): """PYTHON-6048: one pr-tagged sanitizer task, selected by exactly one variant that pins MAX_VERSION and runs on a large host for ASan's memory diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index 4126b86998..88fc41b204 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -4,6 +4,7 @@ import dataclasses import logging import os +import re import shlex import subprocess import sys @@ -44,7 +45,8 @@ 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, LB tests included. + "load_balancer": "", "mockupdb": "mockupdb", "ocsp": "ocsp", "perf": "perf", @@ -230,6 +232,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: @@ -291,16 +301,35 @@ def read_env(path: Path | str) -> dict[str, str]: continue name, _, value = line.strip().partition("=") if value.startswith(('"', "'")): - value = value[1:-1] + quote, value = value[0], value[1:-1] + if quote == '"': + # In double quotes bash drops the backslash from these + # escapes; yield the value sourcing would produce. + value = re.sub(r'\\([$`"\\])', r"\1", value) name = name.replace("export ", "") config[name] = value return config -def write_env(name: str, value: Any = "1") -> None: +def shell_escape(value: str) -> str: + """Escape a value for a double-quoted shell context. + + Backslashes are escaped first; otherwise a backslash-prefixed + substitution re-arms when the file is sourced (PYTHON-6167). + """ + return value.replace("\\", "\\\\").replace("$", "\\$").replace("`", "\\`") + + +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 persists literally; pass escape=False to 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: + value = shell_escape(value) fid.write(f'export {name}="{value}"\n') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e0e058c94..ee90aca1d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -250,9 +250,7 @@ for local testing): ```python from pymongo import MongoClient -client = MongoClient( - "mongodb://localhost:27017?tls=true&tlsAllowInvalidCertificates=true" -) +client = MongoClient("mongodb://localhost:27017?tls=true&tlsAllowInvalidCertificates=true") ``` If you want to use the actual certificate file then set `tlsCertificateKeyFile` to the local path @@ -474,7 +472,9 @@ wheels (CPython 3.12-3.14). - The bulk of the logic will typically be in `.evergreen/scripts/setup_tests.py`. This is where you should fetch secrets and make them available using `write_env`, start services, and write other env vars needed using `write_env`. - If there are any special test considerations, including not running `pytest` at all, handle it in `.evergreen/scripts/run_tests.py`. - If there are any services or atlas clusters to teardown, handle them in `.evergreen/scripts/teardown_tests.py`. -- Add functions to generate the test variant(s) and task(s) to the `.evergreen/scripts/generate_config.py`. +- Add functions to generate the test variant(s) and task(s) to the `.evergreen/scripts/generate_config.py`; + the per-suite task families live in `.evergreen/scripts/task_suite_families.py` (re-exported by + `generate_config.py`). - There are some considerations about the Python version used in the test: - To request a specific Python, set `UV_PYTHON` (e.g. `UV_PYTHON=3.10` or `UV_PYTHON=3.14t`). Tasks are host-agnostic, so the interpreter lookup happens on the host: for a plain