diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index c42cf444b1..b2b8dc1191 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -9,14 +9,14 @@ tasks: tags: [atlas_connect] # Atlas data lake tests - - name: test-atlas-data-lake-with_ext + - name: test-atlas-data-lake-without_ext commands: - func: run tests vars: TEST_NAME: data_lake NO_EXT: "1" tags: [atlas_data_lake] - - name: test-atlas-data-lake-without_ext + - name: test-atlas-data-lake-with_ext commands: - func: run tests vars: @@ -727,6 +727,95 @@ tasks: working_dir: src type: test + # Compression tests + - name: test-compression-v4.0-python3.9 + commands: + - func: run server + vars: + VERSION: "4.0" + - func: run tests + tags: [compression, "4.0"] + - name: test-compression-v4.2-python3.9 + commands: + - func: run server + vars: + VERSION: "4.2" + - func: run tests + tags: [compression, "4.2"] + - name: test-compression-v4.4-python3.9 + commands: + - func: run server + vars: + VERSION: "4.4" + - func: run tests + tags: [compression, "4.4"] + - name: test-compression-v5.0-python3.9 + commands: + - func: run server + vars: + VERSION: "5.0" + - func: run tests + tags: [compression, "5.0"] + - name: test-compression-v6.0-python3.9 + commands: + - func: run server + vars: + VERSION: "6.0" + - func: run tests + tags: [compression, "6.0"] + - name: test-compression-v7.0-python3.9 + commands: + - func: run server + vars: + VERSION: "7.0" + - func: run tests + tags: [compression, "7.0"] + - name: test-compression-v8.0-python3.9 + commands: + - func: run server + vars: + VERSION: "8.0" + - func: run tests + tags: [compression, "8.0"] + - name: test-compression-rapid-python3.9 + commands: + - func: run server + vars: + VERSION: rapid + - func: run tests + tags: [compression, rapid] + - name: test-compression-latest-python3.9 + commands: + - func: run server + vars: + VERSION: latest + - func: run tests + tags: [compression, latest] + - name: test-compression-latest-python3.13-no-c + commands: + - func: run server + vars: + VERSION: latest + - func: run tests + vars: + NO_EXT: "1" + tags: [compression, latest] + - name: test-compression-latest-python3.13 + commands: + - func: run server + vars: + VERSION: latest + - func: run tests + vars: {} + tags: [compression, latest] + - name: test-compression-latest-pypy3.10 + commands: + - func: run server + vars: + VERSION: latest + - func: run tests + tags: [compression, latest] + # Coverage report tests - name: coverage-report commands: diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 892e50f9da..7082dda44d 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -160,90 +160,30 @@ buildvariants: - rhel87-small # Compression tests - - name: compression-snappy-rhel8-python3.9-no-c + - name: compression-snappy-rhel8 tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression snappy RHEL8 Python3.9 No C - run_on: - - rhel87-small - expansions: - COMPRESSORS: snappy - NO_EXT: "1" - PYTHON_BINARY: /opt/python/3.9/bin/python3 - - name: compression-snappy-rhel8-python3.10 - tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression snappy RHEL8 Python3.10 - run_on: - - rhel87-small - expansions: - COMPRESSORS: snappy - PYTHON_BINARY: /opt/python/3.10/bin/python3 - - name: compression-zlib-rhel8-python3.11-no-c - tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression zlib RHEL8 Python3.11 No C - run_on: - - rhel87-small - expansions: - COMPRESSORS: zlib - NO_EXT: "1" - PYTHON_BINARY: /opt/python/3.11/bin/python3 - - name: compression-zlib-rhel8-python3.12 - tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression zlib RHEL8 Python3.12 + - name: .compression + display_name: Compression snappy RHEL8 run_on: - rhel87-small expansions: - COMPRESSORS: zlib - PYTHON_BINARY: /opt/python/3.12/bin/python3 - - name: compression-zstd-rhel8-python3.13-no-c + COMPRESSOR: snappy + - name: compression-zlib-rhel8 tasks: - - name: .standalone .noauth .nossl .sync_async !.4.0 - display_name: Compression zstd RHEL8 Python3.13 No C + - name: .compression + display_name: Compression zlib RHEL8 run_on: - rhel87-small expansions: - COMPRESSORS: zstd - NO_EXT: "1" - PYTHON_BINARY: /opt/python/3.13/bin/python3 - - name: compression-zstd-rhel8-python3.9 + COMPRESSOR: zlib + - name: compression-zstd-rhel8 tasks: - - name: .standalone .noauth .nossl .sync_async !.4.0 - display_name: Compression zstd RHEL8 Python3.9 + - name: .compression !.4.0 + display_name: Compression zstd RHEL8 run_on: - rhel87-small expansions: - COMPRESSORS: zstd - PYTHON_BINARY: /opt/python/3.9/bin/python3 - - name: compression-snappy-rhel8-pypy3.10 - tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression snappy RHEL8 PyPy3.10 - run_on: - - rhel87-small - expansions: - COMPRESSORS: snappy - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - - name: compression-zlib-rhel8-pypy3.10 - tasks: - - name: .standalone .noauth .nossl .sync_async - display_name: Compression zlib RHEL8 PyPy3.10 - run_on: - - rhel87-small - expansions: - COMPRESSORS: zlib - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 - - name: compression-zstd-rhel8-pypy3.10 - tasks: - - name: .standalone .noauth .nossl .sync_async !.4.0 - display_name: Compression zstd RHEL8 PyPy3.10 - run_on: - - rhel87-small - expansions: - COMPRESSORS: zstd - PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 + COMPRESSOR: zstd # Coverage report tests - name: coverage-report diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 824786ed47..723ef6ba31 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -26,7 +26,7 @@ BATCHTIME_WEEK = 10080 AUTH_SSLS = [("auth", "ssl"), ("noauth", "ssl"), ("noauth", "nossl")] TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"] -C_EXTS = ["with_ext", "without_ext"] +C_EXTS = ["without_ext", "with_ext"] # By default test each of the topologies with a subset of auth/ssl. SUB_TASKS = [ ".sharded_cluster .auth .ssl", @@ -217,7 +217,7 @@ def get_variant_name(base: str, host: Host | None = None, **kwargs) -> str: def get_task_name(base: str, **kwargs): - return get_common_name(base, "-", **kwargs).lower() + return get_common_name(base, "-", **kwargs).replace(" ", "-").lower() def zip_cycle(*iterables, empty_default=None): @@ -430,42 +430,22 @@ def create_load_balancer_variants(): def create_compression_variants(): - # Compression tests - standalone versions of each server, across python versions, with and without c extensions. - # PyPy interpreters are always tested without extensions. + # Compression tests - standalone versions of each server, across python versions. host = DEFAULT_HOST - base_task = ".standalone .noauth .nossl .sync_async" - task_names = dict(snappy=[base_task], zlib=[base_task], zstd=[f"{base_task} !.4.0"]) + base_task = ".compression" variants = [] - for ind, (compressor, c_ext) in enumerate(product(["snappy", "zlib", "zstd"], C_EXTS)): - expansions = dict(COMPRESSORS=compressor) - handle_c_ext(c_ext, expansions) - base_name = f"Compression {compressor}" - python = CPYTHONS[ind % len(CPYTHONS)] - display_name = get_variant_name(base_name, host, python=python, **expansions) - variant = create_variant( - task_names[compressor], - display_name, - python=python, - host=host, - expansions=expansions, - ) - variants.append(variant) - - other_pythons = PYPYS + CPYTHONS[ind:] - for compressor, python in zip_cycle(["snappy", "zlib", "zstd"], other_pythons): - expansions = dict(COMPRESSORS=compressor) - handle_c_ext(c_ext, expansions) - base_name = f"Compression {compressor}" - display_name = get_variant_name(base_name, host, python=python, **expansions) - variant = create_variant( - task_names[compressor], - display_name, - python=python, - host=host, - expansions=expansions, + for compressor in "snappy", "zlib", "zstd": + expansions = dict(COMPRESSOR=compressor) + tasks = [base_task] if compressor != "zstd" else [f"{base_task} !.4.0"] + display_name = get_variant_name(f"Compression {compressor}", host) + variants.append( + create_variant( + tasks, + display_name, + host=host, + expansions=expansions, + ) ) - variants.append(variant) - return variants @@ -866,6 +846,39 @@ def create_load_balancer_tasks(): return tasks +def create_compression_tasks(): + tasks = [] + versions = get_versions_from("4.0") + # Test all server versions with min python. + for version in versions: + python = CPYTHONS[0] + tags = ["compression", version] + name = get_task_name("test-compression", python=python, version=version) + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) + test_func = FunctionCall(func="run tests") + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) + + # Test latest with max python, with and without c exts. + version = "latest" + tags = ["compression", "latest"] + for c_ext in C_EXTS: + python = CPYTHONS[-1] + expansions = dict() + handle_c_ext(c_ext, expansions) + name = get_task_name("test-compression", python=python, version=version, **expansions) + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) + test_func = FunctionCall(func="run tests", vars=expansions) + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) + + # Test on latest with pypy. + python = PYPYS[-1] + name = get_task_name("test-compression", python=python, version=version) + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) + test_func = FunctionCall(func="run tests") + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) + return tasks + + def create_kms_tasks(): tasks = [] for kms_type in ["gcp", "azure"]: