Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ The `polars1` and `polars2` dependency groups select Polars 1.x or 2.x, which Po
The environments above have `polars1`; a second environment beside each, `benchmarks/.venv-polars2` or `/opt/pyathena/.venv-polars2`, has `polars2`.
The `s3fs` dependency group installs [s3fs](https://github.com/fsspec/s3fs) for the filesystem suite's `s3fs` API in a third environment, `benchmarks/.venv-s3fs` or `/opt/pyathena/.venv-s3fs`, whose Polars version is not pinned.
s3fs depends on aiobotocore, which pins botocore to a few patch releases, so the group is resolved apart from the other environments.
The root `pyproject.toml` declares the three groups and the root `dev` group as conflicting, so `uv.lock` resolves each of them separately.
The `filesystem` dependency group has only PyAthena, s3fs, and psutil, for interpreters that lack wheels of the DataFrame backends, such as free-threaded builds (#1324).
It is synced alone, with `--only-group filesystem`, which leaves out the benchmark's own dependencies, into `benchmarks/.venv-fs315` or `/opt/pyathena/.venv-fs315` with Python 3.15, and into `.venv-fs315t` with its free-threaded build, 3.15t.
These environments run only the filesystem and objects suites, every API of them, s3fs included, and the harness imports none of the DataFrame backends there.
Python 3.15t has no wheel of psutil on Linux, so its sync builds psutil from source with a C compiler.
The root `pyproject.toml` declares the four groups and the root `dev` group as conflicting, so `uv.lock` resolves each of them separately.
The benchmark's default dependency groups include `polars1`; a sync with `--no-default-groups` needs `--group polars1` or `--group polars2`, or it installs whichever Polars version the lock resolves without them.
The root `uv build -v` still builds only PyAthena, including a wheel built from its sdist.
Benchmark dependencies do not become PyAthena runtime dependencies, and `uv sync --group dev` at the root does not install them.
Expand Down Expand Up @@ -130,7 +134,7 @@ As the results location, it removes leftovers by itself, but reports must be rec

The deployment identity needs permission to create these resources and pass the instance role.
Use an immutable, remotely accessible commit that contains this directory and the root `uv.lock`.
Bootstrap checks out that commit, installs pinned uv and Python versions, and syncs the benchmark with `uv sync --locked`: with the `polars1` group into `/opt/pyathena/.venv`, and with the `polars2` group into `/opt/pyathena/.venv-polars2`.
Bootstrap checks out that commit, installs pinned uv and Python versions, and syncs the benchmark with `uv sync --locked`: with the `polars1` group into `/opt/pyathena/.venv`, with the `polars2` group into `/opt/pyathena/.venv-polars2`, with the `s3fs` group into `/opt/pyathena/.venv-s3fs`, and with the `filesystem` group alone into `/opt/pyathena/.venv-fs315` and `/opt/pyathena/.venv-fs315t`, with the template's `FilesystemPythonVersion`, 3.15.2 by default, and its free-threaded build; it installs gcc for the latter.
It signals setup completion to CloudFormation but does not prepare data or start measurements.
The EC2 commands use `--no-sync` to reuse this verified environment; they do not revalidate the lockfile on every invocation.

Expand Down Expand Up @@ -312,7 +316,7 @@ uv run --no-sync python -m pyathena_bench jobs \
## Measurement semantics

Each warmup and measured trial runs in a fresh child process, with imports outside the measurement baseline.
All DataFrame backends are imported before the baseline, including for row cursors.
All DataFrame backends are imported before the baseline, including for row cursors, except in the `fs315` and `fs315t` environments, which have none; compare the RSS of their trials with each other, not with those of the other environments.
Absolute RSS therefore includes the harness's common imports; inspect the baseline and increase when interpreting memory overhead.
A concurrent batch shares one child process, so its RSS belongs to the batch rather than an individual query.
Defaults are one discarded warmup and five measured trials per case, executed serially by the parent.
Expand Down Expand Up @@ -418,6 +422,8 @@ With `--split-pages`, a job whose single trial needs at least that many pages be
`jobs` accepts `--warmups` and `--repetitions` too; with either option, every job that is not split carries both values as arguments, so one queue can combine jobs with different trial counts under one stored configuration.
`queue --jobs` accepts several job files, rejects duplicate job IDs, and orders the combined jobs as `jobs` orders one selection.
`jobs --environment polars2` runs the selected jobs with Polars 2.x: each job names the environment, and its ID ends with `-polars2`, so one queue can hold the same cases for both Polars versions.
`jobs --environment fs315` and `--environment fs315t` run jobs of the filesystem and objects suites with Python 3.15 and 3.15t in the same way, s3fs jobs included, which end with the environment's name too; `jobs` rejects the other suites for them.
Each trial records `gil_enabled`, whether the GIL was enabled after the measurement, so that a run in `fs315t` shows whether an import re-enabled it; the run's environment records it as well.
A worker runs such a job with the interpreter of `.venv-polars2` beside its own environment, and refuses to start if a job's environment is missing on its host; start the worker from the default environment, whose interpreter runs the other jobs.
Select the families that use Polars, `polars` and `sqla_polars`, for this environment.

Expand Down
16 changes: 13 additions & 3 deletions benchmarks/cloudformation/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,19 @@ Parameters:
Description: Image for arm64 hosts.
UvVersion:
Type: String
Default: '0.12.5'
# A release that knows the Python versions below; 0.12.5 knows no 3.15 release.
Default: '0.13.7'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (relayed): Codex CLI codex exec -s read-only (model gpt-6-astra, session 01a1d5de-dc04-7b93-87bc-248698869787), static review only, base 13031a5daf4d2afd66eba33c50089024ec48314e, head 9a9935063f3a08ff318a9555025f2f67a0b08d26, detached snapshot unchanged. Prompt: the diff without uv.lock, the intended behavior, conventions and docs/testing.md; no PR text or prior findings.

Covered: the filesystem and objects imports through the CLI, report, fleet worker, prepare/cleanup, and trial execution; workspace dependencies, the lockfile and conflicts; the AL2023/aarch64 bootstrap; environment routing and the existing environments; GIL records; README; the added tests against docs/testing.md. Result: FINDINGS (2).

1. P1 — Bootstrap retains a uv version too old for Python 3.15.2 (reviewed at benchmark.yaml:370, the uv python install line). UvVersion defaulted to 0.12.5 (released August 14), before Python 3.15.2 (October 25), and uv's interpreter catalog is fixed per release, so on a fresh host the unconditional uv python install fails before any environment sync, the existing environments included.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified and fixed in 91c8bfa: uv python list --all-platforms --all-arches --only-downloads with uv 0.12.5 lists only cpython-3.15.0rc1 for Linux aarch64, while 0.13.7 lists 3.15.2 and cpython-3.15.2+freethreaded-linux-aarch64-gnu. The default is now 0.13.7, the uv version that produced this uv.lock and the local 3.15t smoke test. A comment on the parameter states the requirement. No offline test can check the catalog of a uv release, so this is not tested.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent follow-up review (relayed): Codex CLI codex exec -s read-only (model gpt-6-astra, session 01a1d5ec-08b4-7d73-aa1c-1dae211ba0a0), static review only, repair 9a9935063f3a08ff318a9555025f2f67a0b08d26..91c8bfa7058942aa59fcc1e1741cdccc971c2f99 (same base 13031a5daf4d2afd66eba33c50089024ec48314e), snapshot unchanged.

Covered: the repair diff; interpreter installation; all five bootstrap environments; workspace groups and the lockfile; --no-sync execution and the fleet's interpreter selection; the worker's and environment's GIL records; test distinctness, regression sensitivity, and determinism. uv 0.13.7 addresses the interpreter catalog and matches the lockfile producer; the existing environments keep Python 3.12 and their groups; --no-sync still preserves the environment. The new tests run both worker branches, assert the environment and post-measurement GIL values independently, and check the Athena suites' rejection; the omitted runtime-import test is not required under the repository rules.

Result: CLEAN.

AllowedPattern: '[0-9]+\.[0-9]+\.[0-9]+'
PythonVersion:
Type: String
Default: '3.12.14'
AllowedPattern: '3\.12\.[0-9]+'
# The filesystem environments, .venv-fs315 and .venv-fs315t, of this version and its
# free-threaded build.
FilesystemPythonVersion:
Type: String
Default: '3.15.2'
AllowedPattern: '3\.15\.[0-9]+'
WorkGroup:
Type: String
Default: pyathena
Expand Down Expand Up @@ -353,17 +360,20 @@ Resources:
- |
#!/bin/bash
set -euo pipefail
dnf install -y git aws-cfn-bootstrap
# gcc builds the wheels that the free-threaded interpreter lacks, such as psutil's.
dnf install -y git aws-cfn-bootstrap gcc
trap '/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource Fleet --region ${AWS::Region}' EXIT
curl --proto '=https' --tlsv1.2 -LsSf https://astral.sh/uv/${UvVersion}/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh
git clone https://github.com/pyathena-dev/PyAthena.git /opt/pyathena
git -C /opt/pyathena fetch origin ${GitCommit}
git -C /opt/pyathena checkout --detach ${GitCommit}
export UV_PYTHON_INSTALL_DIR=/opt/uv-python
uv python install ${PythonVersion}
uv python install ${PythonVersion} ${FilesystemPythonVersion} ${FilesystemPythonVersion}t

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review round two (claims, compatibility, operations): base 13031a5daf4d2afd66eba33c50089024ec48314e, head 9a9935063f3a08ff318a9555025f2f67a0b08d26.

Claims checked:

  • "psutil 7.2.2 has cp313t and cp314t wheels for Linux aarch64 but no cp315t one": PyPI file list of psutil 7.2.2; the lock entry has the abi3 wheel and the sdist only.
  • "The 3.15t sync builds it from source": locally, the installed psutil's WHEEL reads Generator: setuptools, Tag: cp315-cp315t-linux_x86_64.
  • "imported no DataFrame backend / without the GIL": the smoke test in the synced 3.15t environment (sys._is_gil_enabled() False after importing s3fs, aiohttp, psutil, and the suites), and the new subprocess test in the default environment.
  • "The relock re-resolved beautifulsoup4/soupsieve, dependencies of furo": the lock diff; furo is the docs theme, not in any benchmark environment.

Existing callers: the default, polars2, and s3fs environments still import the adapters before the baseline, so their measurements are unchanged; jobs without --environment is unchanged.

Operator: the bootstrap installs gcc and two more interpreters and environments, which lengthens host setup; the psutil build needs gcc. The fs315 and fs315t trials have a smaller RSS baseline (no DataFrame backend), which the README says to compare only among themselves.

FINDINGS: none.

uv sync --directory /opt/pyathena/benchmarks --locked --no-default-groups --group polars1 --python ${PythonVersion}
UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-polars2 uv sync --directory /opt/pyathena/benchmarks --locked --no-default-groups --group polars2 --python ${PythonVersion}
UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-s3fs uv sync --directory /opt/pyathena/benchmarks --locked --no-default-groups --group s3fs --python ${PythonVersion}
UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-fs315 uv sync --directory /opt/pyathena/benchmarks --locked --only-group filesystem --python ${FilesystemPythonVersion}
UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-fs315t uv sync --directory /opt/pyathena/benchmarks --locked --only-group filesystem --python ${FilesystemPythonVersion}t
chmod -R a+rX /opt/uv-python
chown -R ec2-user:ec2-user /opt/pyathena
printf '%s\n' '${AWS::StackId}' > /opt/pyathena/benchmarks/stack-id.txt
Expand Down
8 changes: 1 addition & 7 deletions benchmarks/pyathena_bench/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from pyathena.s3fs.result_set import AthenaS3FSResultSet
from pyathena_bench.cases import SQLALCHEMY_FAMILIES, Case
from pyathena_bench.config import Settings
from pyathena_bench.sampling import heartbeat

BACKEND_VERSIONS = {
"pandas": pd.__version__,
Expand Down Expand Up @@ -360,13 +361,6 @@ async def measure_query(adapter: Adapter, cursor: Any, sql: str, expected: int)
result.close()


async def heartbeat(interval: float, stop: asyncio.Event, samples: list[float]) -> None:
while not stop.is_set():
start = time.perf_counter()
await asyncio.sleep(interval)
samples.append(max(0.0, time.perf_counter() - start - interval))


async def run_adapter(
adapter: Adapter, sql: str, expected: int, fixture: dict[str, Any] | None = None
) -> dict[str, Any]:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pyathena_bench/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
from pyathena.filesystem.s3 import S3FileSystem
from pyathena.filesystem.s3_async import AioS3FileSystem
from pyathena.util import parse_output_location
from pyathena_bench.adapters import heartbeat
from pyathena_bench.cases import Case
from pyathena_bench.config import Settings
from pyathena_bench.sampling import heartbeat

try:
import s3fs
Expand Down
27 changes: 22 additions & 5 deletions benchmarks/pyathena_bench/fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@
QUIESCE_ROUNDS = 3
# Virtual environments that a job can name, each synced with the dependency group of
# the same name beside the default environment, which has the polars1 group.
ENVIRONMENTS = ("polars2", "s3fs")
ENVIRONMENTS = ("polars2", "s3fs", "fs315", "fs315t")
# APIs whose cases run only in a named environment, which their jobs get without a
# suffix to their IDs, as the API already names it.
API_ENVIRONMENTS = {"s3fs": "s3fs"}
# Environments of the filesystem group, synced alone with Python 3.15 and its
# free-threaded build: they run only the filesystem and objects suites, the s3fs API
# included, since they have no DataFrame backend but have s3fs.
FILESYSTEM_ENVIRONMENTS = ("fs315", "fs315t")
FILESYSTEM_SUITES = ("filesystem", "objects")


@dataclass(frozen=True)
Expand Down Expand Up @@ -185,16 +190,24 @@ def expand_jobs(
counts under one stored configuration.
environment: One of ``ENVIRONMENTS`` that runs the jobs, which their IDs
name, or None for the default environment. Jobs of an API in
``API_ENVIRONMENTS`` run in that API's environment instead.
``API_ENVIRONMENTS`` run in that API's environment instead, except
in one of ``FILESYSTEM_ENVIRONMENTS``, which has every API of the
filesystem and objects suites.

Returns:
Job dictionaries ordered with API-heavy jobs first and longer jobs earlier.

Raises:
ValueError: If no case matches the selection, or ``environment`` differs
from the environment of a selected API.
ValueError: If no case matches the selection, ``environment`` differs
from the environment of a selected API, or one of
``FILESYSTEM_ENVIRONMENTS`` is given a suite other than the
filesystem and objects suites.
"""
jobs: list[dict[str, Any]] = []
if environment in FILESYSTEM_ENVIRONMENTS and set(suites) - set(FILESYSTEM_SUITES):
raise ValueError(
f"The {environment} environment runs only the filesystem and objects suites"
)
for suite in suites:
for scale in scales:
rows = settings.suite_scales(suite)[scale]
Expand Down Expand Up @@ -224,7 +237,11 @@ def expand_jobs(
chunks = [str(c) for c in sorted({c.chunksize or 0 for c in cases})]
base += "-c" + "_".join(chunks)
args += ["--chunksize", *chunks]
api_environment = API_ENVIRONMENTS.get(api)
api_environment = (
None
if environment in FILESYSTEM_ENVIRONMENTS
else API_ENVIRONMENTS.get(api)
)
if api_environment and environment not in (None, api_environment):
raise ValueError(
f"The {api} API runs in the {api_environment} environment, "
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pyathena_bench/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

from pyathena import connect
from pyathena.util import parse_output_location
from pyathena_bench.adapters import heartbeat
from pyathena_bench.cases import Case
from pyathena_bench.config import Settings
from pyathena_bench.filesystem import filesystem
from pyathena_bench.sampling import heartbeat

# The copies name both directives, so that S3 neither reads the tags nor the
# annotations of the sources, which the generated objects do not have.
Expand Down
33 changes: 29 additions & 4 deletions benchmarks/pyathena_bench/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import psutil

from pyathena.util import parse_output_location
from pyathena_bench.adapters import BACKEND_VERSIONS, Adapter, run_adapter
from pyathena_bench.aws import (
cancel_queries,
client,
Expand All @@ -52,6 +51,25 @@
from pyathena_bench.objects import run_objects
from pyathena_bench.report import CHECKPOINT, read_trials, trial_key

# The Athena suites' adapters import every DataFrame backend; the filesystem
# environment, for interpreters that lack their wheels, has none of them and runs
# only the filesystem and objects suites.
try:
from pyathena_bench import adapters

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review round one (implementation behavior): base 13031a5daf4d2afd66eba33c50089024ec48314e, head 9a9935063f3a08ff318a9555025f2f67a0b08d26.

Covered: the import chain of every harness module (only runner -> adapters imports the DataFrame backends; cases imports pyathena.filesystem.s3_core, aws boto3, config the standard library); the optional import of adapters (ModuleNotFoundError only, so another import error of the default environment still fails) and the Athena suites' guard in the trial; heartbeat() in sampling; environment() and the trial result's gil_enabled; the fleet's environment selection (suite restriction, s3fs routing, suffixes, interpreter(), the worker's check of the queued environments); the filesystem group with --only-group (PyAthena from the workspace source, no project dependencies); the lock entries of the 3.15t dependencies for Linux aarch64 (aiohttp, multidict, yarl, propcache, and wrapt have cp315t wheels; frozenlist a pure wheel; psutil only an abi3 wheel, so 3.15t builds it from the sdist, 3.15 uses the abi3 wheel); the template (gcc, the interpreters, the syncs); README.

Result: CLEAN for the implementation. Limits: the trial-level gil_enabled is not covered by a unit test (the environment record is); the template is not deployed here.

except ModuleNotFoundError:
adapters = None # type: ignore[assignment]


def gil_enabled() -> bool:
"""Return whether the GIL is enabled, also after an import re-enabled it.

Returns:
False only on a free-threaded interpreter that still runs without the GIL.
"""
is_gil_enabled = getattr(sys, "_is_gil_enabled", None)
return True if is_gil_enabled is None else bool(is_gil_enabled())


_logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -140,21 +158,27 @@ def worker(pipe: Connection, payload: dict[str, Any]) -> None:
Path(payload["temp_dir"]),
)
else:
adapter = Adapter(
if adapters is None:
raise RuntimeError(
"The Athena suites need the DataFrame backends of the default environment"
)
adapter = adapters.Adapter(
settings,
case,
session_,
payload["database"],
payload["output"],
payload["temp_table"],
)
measurement = run_adapter(
measurement = adapters.run_adapter(
adapter, payload["sql"], payload["expected_rows"], payload.get("fixture")
)
observer.send({"event": "ready"})
pipe.recv()
result = asyncio.run(measurement)
result["athena"] = list(observer.completed.values())
# Read after the measurement, which imports the filesystem's libraries.
result["gil_enabled"] = gil_enabled()
for query in result["queries"]:
if query.get("query_id") is None and len(observer.completed) == 1:
query["query_id"] = next(iter(observer.completed))
Expand Down Expand Up @@ -404,7 +428,8 @@ def environment(settings: Settings) -> dict[str, Any]:
"python": sys.version,
"platform": platform.platform(),
"machine": platform.machine(),
"backends_imported_before_baseline": BACKEND_VERSIONS,
"backends_imported_before_baseline": adapters.BACKEND_VERSIONS if adapters else {},
"gil_enabled": gil_enabled(),
"cpu_count": psutil.cpu_count(),
"memory_bytes": psutil.virtual_memory().total,
"dependencies": {d.metadata["Name"]: d.version for d in importlib.metadata.distributions()},
Expand Down
27 changes: 27 additions & 0 deletions benchmarks/pyathena_bench/sampling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2026 The PyAthena authors
#
# Licensed under the MIT License.
# See LICENSE or https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT

"""Event-loop lag sampling, shared by every suite without importing a DataFrame backend."""

from __future__ import annotations

import asyncio
import time


async def heartbeat(interval: float, stop: asyncio.Event, samples: list[float]) -> None:
"""Record how late the event loop wakes a sleeping task, until stopped.

Args:
interval: The sleep of each sample, in seconds.
stop: Event that ends the sampling.
samples: List to append the lag of each wake-up to, in seconds.
"""
while not stop.is_set():
start = time.perf_counter()
await asyncio.sleep(interval)
samples.append(max(0.0, time.perf_counter() - start - interval))
4 changes: 4 additions & 0 deletions benchmarks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ polars1 = ["polars>=1.39.0,<2"]
polars2 = ["polars>=2,<3"]
# The filesystem suite's s3fs API; aiobotocore pins botocore, so the group resolves apart.
s3fs = ["s3fs>=2026.9.0"]
# The filesystem and objects suites alone, without the DataFrame backends, for the
# interpreters that lack their wheels, such as free-threaded builds; synced with
# --only-group, which leaves out the project's dependencies.
filesystem = ["PyAthena", "psutil>=7,<8", "s3fs>=2026.9.0"]

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down
13 changes: 13 additions & 0 deletions benchmarks/tests/test_cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,17 @@ def test_hosts_start_the_queue_worker_and_expose_their_tags():
"UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-polars2 uv sync --directory "
"/opt/pyathena/benchmarks --locked --no-default-groups --group polars2"
) in user_data
# GH-1324: the filesystem environments have the filesystem group alone, with Python
# 3.15 and its free-threaded build, for which gcc builds psutil.
assert "dnf install -y git aws-cfn-bootstrap gcc" in user_data
assert (
"uv python install ${PythonVersion} ${FilesystemPythonVersion} ${FilesystemPythonVersion}t"
) in user_data
for name, version in (("fs315", ""), ("fs315t", "t")):
assert (
f"UV_PROJECT_ENVIRONMENT=/opt/pyathena/.venv-{name} uv sync --directory "
"/opt/pyathena/benchmarks --locked --only-group filesystem "
f"--python ${{FilesystemPythonVersion}}{version}"
) in user_data
assert template["Parameters"]["FilesystemPythonVersion"]["Default"].startswith("3.15.")
assert template["Parameters"]["QueueName"]["Default"] == ""
20 changes: 20 additions & 0 deletions benchmarks/tests/test_fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,26 @@ def test_s3fs_jobs_reject_another_environment(self):
assert {j.get("environment") for j in jobs} == {"s3fs"}
assert any(j["id"] == "filesystem-large-flat-s3-sync-read-bytes-s3fs" for j in jobs)

@pytest.mark.parametrize("environment", ["fs315", "fs315t"])
def test_filesystem_environments_run_every_api_of_their_suites(self, environment):
# GH-1324: the filesystem environments have s3fs, so its jobs run there and
# carry the suffix of the environment, as the jobs of the other APIs do.
settings = replace(SETTINGS, filesystem_sizes={"large": 2**30})
jobs = expand_jobs(
settings, ["filesystem"], ["large"], ["flat"], Filters(), environment=environment
)
assert {j["environment"] for j in jobs} == {environment}
assert {
f"filesystem-large-flat-s3-sync-read-bytes-{environment}",
f"filesystem-large-flat-s3-s3fs-read-bytes-{environment}",
} <= {j["id"] for j in jobs}

@pytest.mark.parametrize("suite", ["single", "concurrent", "init"])
def test_filesystem_environments_reject_the_athena_suites(self, suite):
# GH-1324: they have no DataFrame backend.
with pytest.raises(ValueError, match="runs only the filesystem and objects suites"):
expand_jobs(SETTINGS, [suite], ["small"], ["flat"], Filters(), environment="fs315t")


class TestExpandJobsArraysize:
def test_row_output_jobs_keep_one_arraysize_for_every_family(self):
Expand Down
Loading
Loading