From 50b16ef7e0469ec427d3ee5fb0b3771008743213 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Mon, 30 Nov 2026 22:28:49 +0900 Subject: [PATCH 1/9] Test SQLAlchemy offline on the declared minimum and the latest release (GH-1543) CI ran the SQLAlchemy tests only on the locked version, so defects at the declared minimum and on new releases (#1542, #1563, #1569) went unnoticed. Add `just test offline-sqla `: uv resolves the lowest and the highest release that the extras allow, and the recipe runs the dialect tests that need no AWS on it and collects the compliance suites (synchronous and async), which imports them without connecting. The offline environment moves to a shared _offline recipe, used by `just test offline` too. A new offline-sqla job runs the minimum on Python 3.11 and the latest on Python 3.15 for every event. The AWS suites do not wait for it, so a new SQLAlchemy release that breaks it does not stop unrelated pull requests. On SQLAlchemy 2.1, NameDenormalizeTest reads column names from the result; Athena returns them in lowercase, including quoted names. Skip those statements and keep the core select, which maps by position. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 39 ++++++++++++++++++++++ AGENTS.md | 1 + docs/contributing.md | 1 + docs/testing.md | 12 +++++++ justfile | 60 ++++++++++++++++++++++++++-------- tests/sqlalchemy/test_suite.py | 14 ++++++++ 6 files changed, 114 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 881def25f..e45c3c612 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -90,6 +90,45 @@ jobs: tool: just - run: just test offline + # The SQLAlchemy tests that need no AWS, and the collection of the compliance + # suites, on the lowest and the highest SQLAlchemy release that the extras + # allow; the offline job above runs them on the locked version. The AWS suites + # do not wait for this job, so a new SQLAlchemy release that breaks it does + # not stop the AWS suites of unrelated pull requests. + offline-sqla: + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + # The minimum on the oldest supported Python version, whose wheels + # the oldest SQLAlchemy release provides. + - sqlalchemy: min + python-version: '3.11' + - sqlalchemy: latest + python-version: '3.15' + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + # As in the offline job, uv's Python 3.13+ cannot compile Python.h. + - if: matrix.python-version == '3.15' + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: ${{ matrix.python-version }} + - uses: taiki-e/install-action@7a79fe8c3a13344501c80d99cae481c1c9085912 # v2.81.10 + with: + tool: just + - run: just test offline-sqla ${{ matrix.sqlalchemy }} + # Selects the AWS suites and Python versions. Draft and external-fork pull # requests run none. A ready pull request runs the PyAthena suite only when # the package, the tests, setup.cfg, the dependencies, or this workflow diff --git a/AGENTS.md b/AGENTS.md index 651140662..eb6aea49e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,6 +55,7 @@ just lint # Python lint, format check, mypy, CloudFormation validation, and li ```bash # ALWAYS run `just lint` first — tests will fail if lint doesn't pass just test offline # PyAthena tests that need no AWS, with no AWS credentials or .env +just test offline-sqla min # SQLAlchemy tests that need no AWS on the lowest allowed SQLAlchemy (also latest, or a version) just test pyathena # PyAthena tests, including AWS integration (runs lint first) just test sqla # SQLAlchemy compliance suite just test sqla-async # SQLAlchemy async compliance suite diff --git a/docs/contributing.md b/docs/contributing.md index 0516c05d3..aad2d864e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -63,6 +63,7 @@ Choose coverage based on the affected behavior, including synchronous and asynch SQLAlchemy dialect changes require the relevant PyAthena dialect tests under `tests/pyathena/sqlalchemy/` as well as the SQLAlchemy compliance suite (`just test sqla`). Changes affecting async dialects also require the relevant tests under `tests/pyathena/aio/sqlalchemy/` and `just test sqla-async`. The PyAthena dialect tests are included in `just test pyathena`; they are not run by the two compliance-suite commands. +`just test offline-sqla min` and `just test offline-sqla latest` run those dialect tests on the lowest and the highest SQLAlchemy release that PyAthena allows, without AWS. Exercise the regression on the version before the fix where practical, and record the before/after result. Documentation-only changes need documentation checks; changes limited to logic independent of AWS need appropriate tests for that logic. `just test offline` runs the tests that need no AWS without AWS credentials; the testing guide describes when a change also needs the AWS tests. diff --git a/docs/testing.md b/docs/testing.md index 315f185ff..b8f103629 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -154,6 +154,17 @@ It then unsets every `AWS_*` and `FSSPEC_*` variable, including those of a loade The recipe also runs without the rerun plugin, whose reruns cover only service-side errors of Athena and S3. A test that reaches AWS in `just test offline` gets a connection error or a rejected request; make it request `aws_test_schema`, as described above, which also gives it the `aws` mark. +`just test offline` runs the SQLAlchemy tests on the locked SQLAlchemy. +`just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without connecting: + +```bash +just test offline-sqla min # the lowest release that the sqlalchemy extras allow +just test offline-sqla latest # the highest release that they allow +just test offline-sqla 2.1.9 # a given release +``` + +uv resolves `min` and `latest` from `pyproject.toml`, and the recipe prints the SQLAlchemy version that it runs. + The offline target covers a change whose behavior these tests exercise without AWS, such as parameter formatting, SQL compilation, the conversion of result files, or filesystem logic checked with stubbed responses. When a change affects a request to AWS, or how PyAthena reads what AWS returns, also run the affected `aws` tests against your AWS environment, for example: @@ -271,6 +282,7 @@ Retain dtype and schema checks, option contexts, and resource cleanup where appl The Test workflow runs for pull requests that change files other than `docs/` and Markdown. It runs the offline checks (`just lint`, and `just test offline` on the newest supported Python version) on each of them, including Drafts and external forks. +It also runs `just test offline-sqla min` on the oldest supported Python version and `just test offline-sqla latest` on the newest, which the AWS suites do not wait for. The AWS suites start only after the offline checks pass, and run as follows: | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | diff --git a/justfile b/justfile index aafe7d0e5..cd0cb5b7e 100644 --- a/justfile +++ b/justfile @@ -35,9 +35,9 @@ lint: license-headers license-headers: uv run python scripts/check_license_headers.py -# Run tests: just test (pyathena|offline|sqla|sqla-async) -test target="help": - @just _test-{{ if target =~ "^-" { "help" } else { target } }} +# Run tests: just test (pyathena|offline|offline-sqla |sqla|sqla-async) +test target="help" *args: + @just _test-{{ if target =~ "^-" { "help" } else { target } }} {{args}} _test-help: @echo "Usage: just test " @@ -45,21 +45,26 @@ _test-help: @echo "Targets:" @echo " pyathena Run the PyAthena tests, including AWS integration tests (runs lint first)" @echo " offline Run the PyAthena tests that need no AWS, with no AWS credentials" + @echo " offline-sqla " + @echo " Run the SQLAlchemy tests that need no AWS and collect the compliance" + @echo " suites on the declared minimum, the latest release, or a version" @echo " sqla Run SQLAlchemy dialect tests" @echo " sqla-async Run SQLAlchemy async dialect tests" _test-pyathena: lint uv run pytest -n 8 {{PYTEST_RERUN}} --cov pyathena --cov-report html --cov-report term tests/pyathena/ -# Sync the environment first, as uv run does, with the developer's settings. -# Then unset every AWS and fsspec setting and HTTP_PROXY, HTTPS_PROXY, and -# ALL_PROXY in either case, set NO_PROXY and no_proxy to '*', and give the four -# settings that tests/__init__.py requires placeholder values. A request -# made by accident carries credentials that no account accepts, and the clients -# that read AWS_ENDPOINT_URL send it to a reserved name that does not resolve -# (RFC 6761), with AWS_MAX_ATTEMPTS=1 and POLARS_CLOUD_MAX_RETRIES=0. uv must not -# load a .env file back. -_test-offline: +# Run a command with no AWS settings, for the tests that need no AWS. Sync the +# environment first, as uv run does, with the developer's settings. Then unset +# every AWS and fsspec setting and HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY in +# either case, set NO_PROXY and no_proxy to '*', and give the four settings that +# tests/__init__.py requires placeholder values. A request made by accident +# carries credentials that no account accepts, and the clients that read +# AWS_ENDPOINT_URL send it to a reserved name that does not resolve (RFC 6761), +# with AWS_MAX_ATTEMPTS=1 and POLARS_CLOUD_MAX_RETRIES=0. uv must not load a +# .env file back. +[positional-arguments] +_offline *command: #!/usr/bin/env bash set -euo pipefail uv run --no-env-file true @@ -73,7 +78,36 @@ _test-offline: export AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/null BOTO_CONFIG=/dev/null export AWS_EC2_METADATA_DISABLED=true FSSPEC_CONFIG_DIR=/dev/null export AWS_ENDPOINT_URL=https://offline.invalid AWS_MAX_ATTEMPTS=1 POLARS_CLOUD_MAX_RETRIES=0 - uv run --no-sync --no-env-file pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/ + "$@" + +_test-offline: + @just _offline uv run --no-sync --no-env-file pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/ + +# The SQLAlchemy tests that need no AWS, and the collection of the compliance +# suites (which imports them without connecting), on another SQLAlchemy: +# "min" and "latest" are the lowest and the highest release that the extras +# allow, resolved by uv; any other value is a version. The packages are +# resolved before _offline removes the proxy settings. +_test-offline-sqla version: + #!/usr/bin/env bash + set -euo pipefail + case "{{version}}" in + min) resolution=lowest-direct ;; + latest) resolution=highest ;; + *) resolution= ;; + esac + version="{{version}}" + if [ -n "$resolution" ]; then + version=$(uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ + --resolution "$resolution" --no-deps --no-header --no-annotate --quiet \ + | sed -n 's/^sqlalchemy==//p') + fi + with="sqlalchemy[asyncio]==$version" + uv run --no-env-file --with "$with" python -c 'import sqlalchemy; print("SQLAlchemy", sqlalchemy.__version__)' + run="uv run --no-sync --no-env-file --with $with" + just _offline $run pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/sqlalchemy/ tests/pyathena/aio/sqlalchemy/ + just _offline $run pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ + just _offline $run pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ --dburi async _test-sqla: uv run pytest -n 8 {{PYTEST_RERUN}} --cov pyathena --cov-report html --cov-report term tests/sqlalchemy/ diff --git a/tests/sqlalchemy/test_suite.py b/tests/sqlalchemy/test_suite.py index dd63e5a66..2736fe96c 100644 --- a/tests/sqlalchemy/test_suite.py +++ b/tests/sqlalchemy/test_suite.py @@ -1276,6 +1276,20 @@ class CompoundSelectTest(_InsertFixtureRowsOnce, _CompoundSelectTest): pass +if hasattr(sa_suite, "NameDenormalizeTest"): # SQLAlchemy 2.1 and later + + class NameDenormalizeTest(_InsertFixtureRowsOnce, sa_suite.NameDenormalizeTest): + @functools.wraps(sa_suite.NameDenormalizeTest.test_cols_driver_cols) + def test_cols_driver_cols(self, **kwargs): + # SQLAlchemy's variations also pass exclusion arguments. A core + # select maps the columns by position; the other statements read + # the names from the result, which Athena returns in lowercase, + # including quoted names. + if not kwargs["stmt_type"].core_select: + pytest.skip("Athena returns column names in lowercase.") + super().test_cols_driver_cols(**kwargs) + + if hasattr(sa_suite, "DeprecatedCompoundSelectTest"): # SQLAlchemy 2.1 removed this test class. From 09f7b84e9ad0a946db12abb5ece29019044d9f4f Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Mon, 30 Nov 2026 22:38:57 +0900 Subject: [PATCH 2/9] Quote the uv command, run offline from the cache, and default to the minimum (GH-1543) From self-review: build the inner uv command as a bash array, so the requirement is not word-split or globbed; let the runs inside _offline use only uv's cache (--offline), since they start after the proxy settings are removed; default `just test offline-sqla` to `min`; note that the Release workflow requires the job, and add its matrix to the Python-version sync comment; place the new docs after the offline target's scope paragraph and describe the contribution-guide scope as the dialect tests that need no AWS plus collection. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 6 ++++-- docs/contributing.md | 2 +- docs/testing.md | 18 +++++++++--------- justfile | 17 +++++++++-------- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e45c3c612..d1feda5ec 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -94,7 +94,8 @@ jobs: # suites, on the lowest and the highest SQLAlchemy release that the extras # allow; the offline job above runs them on the locked version. The AWS suites # do not wait for this job, so a new SQLAlchemy release that breaks it does - # not stop the AWS suites of unrelated pull requests. + # not stop the AWS suites of unrelated pull requests. The Release workflow + # requires it, as it requires every job of this workflow. offline-sqla: runs-on: ubuntu-latest timeout-minutes: 20 @@ -207,7 +208,8 @@ jobs: EVENT_NAME: ${{ github.event_name }} REQUESTED_VERSIONS: ${{ inputs.python-versions }} # Every supported version, oldest first; keep in sync with the - # pyproject.toml classifiers and the offline job's version. + # pyproject.toml classifiers, the offline job's version, and the + # offline-sqla job's matrix and its setup-python condition. PYTHON_VERSIONS: '["3.11", "3.12", "3.13", "3.14", "3.15"]' run: | case "$EVENT_NAME" in diff --git a/docs/contributing.md b/docs/contributing.md index aad2d864e..c4ade168d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -63,7 +63,7 @@ Choose coverage based on the affected behavior, including synchronous and asynch SQLAlchemy dialect changes require the relevant PyAthena dialect tests under `tests/pyathena/sqlalchemy/` as well as the SQLAlchemy compliance suite (`just test sqla`). Changes affecting async dialects also require the relevant tests under `tests/pyathena/aio/sqlalchemy/` and `just test sqla-async`. The PyAthena dialect tests are included in `just test pyathena`; they are not run by the two compliance-suite commands. -`just test offline-sqla min` and `just test offline-sqla latest` run those dialect tests on the lowest and the highest SQLAlchemy release that PyAthena allows, without AWS. +`just test offline-sqla min` and `just test offline-sqla latest` run the dialect tests that need no AWS, and collect the compliance suites, on the lowest and the highest SQLAlchemy release that PyAthena allows. Exercise the regression on the version before the fix where practical, and record the before/after result. Documentation-only changes need documentation checks; changes limited to logic independent of AWS need appropriate tests for that logic. `just test offline` runs the tests that need no AWS without AWS credentials; the testing guide describes when a change also needs the AWS tests. diff --git a/docs/testing.md b/docs/testing.md index b8f103629..6de0a3246 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -154,6 +154,13 @@ It then unsets every `AWS_*` and `FSSPEC_*` variable, including those of a loade The recipe also runs without the rerun plugin, whose reruns cover only service-side errors of Athena and S3. A test that reaches AWS in `just test offline` gets a connection error or a rejected request; make it request `aws_test_schema`, as described above, which also gives it the `aws` mark. +The offline target covers a change whose behavior these tests exercise without AWS, such as parameter formatting, SQL compilation, the conversion of result files, or filesystem logic checked with stubbed responses. +When a change affects a request to AWS, or how PyAthena reads what AWS returns, also run the affected `aws` tests against your AWS environment, for example: + +```bash +uv run --env-file .env pytest -n 1 -m aws tests/pyathena/test_cursor.py +``` + `just test offline` runs the SQLAlchemy tests on the locked SQLAlchemy. `just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without connecting: @@ -163,14 +170,7 @@ just test offline-sqla latest # the highest release that they allow just test offline-sqla 2.1.9 # a given release ``` -uv resolves `min` and `latest` from `pyproject.toml`, and the recipe prints the SQLAlchemy version that it runs. - -The offline target covers a change whose behavior these tests exercise without AWS, such as parameter formatting, SQL compilation, the conversion of result files, or filesystem logic checked with stubbed responses. -When a change affects a request to AWS, or how PyAthena reads what AWS returns, also run the affected `aws` tests against your AWS environment, for example: - -```bash -uv run --env-file .env pytest -n 1 -m aws tests/pyathena/test_cursor.py -``` +uv resolves `min`, the default, and `latest` from `pyproject.toml`, and the recipe prints the SQLAlchemy version that it runs. ### S3 null-version moves @@ -282,7 +282,7 @@ Retain dtype and schema checks, option contexts, and resource cleanup where appl The Test workflow runs for pull requests that change files other than `docs/` and Markdown. It runs the offline checks (`just lint`, and `just test offline` on the newest supported Python version) on each of them, including Drafts and external forks. -It also runs `just test offline-sqla min` on the oldest supported Python version and `just test offline-sqla latest` on the newest, which the AWS suites do not wait for. +It also runs `just test offline-sqla min` on the oldest supported Python version and `just test offline-sqla latest` on the newest; the AWS suites do not wait for these, and the Release workflow requires them. The AWS suites start only after the offline checks pass, and run as follows: | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | diff --git a/justfile b/justfile index cd0cb5b7e..ff2252c5e 100644 --- a/justfile +++ b/justfile @@ -35,7 +35,7 @@ lint: license-headers license-headers: uv run python scripts/check_license_headers.py -# Run tests: just test (pyathena|offline|offline-sqla |sqla|sqla-async) +# Run tests: just test (pyathena|offline|offline-sqla [min|latest|VERSION]|sqla|sqla-async) test target="help" *args: @just _test-{{ if target =~ "^-" { "help" } else { target } }} {{args}} @@ -45,7 +45,7 @@ _test-help: @echo "Targets:" @echo " pyathena Run the PyAthena tests, including AWS integration tests (runs lint first)" @echo " offline Run the PyAthena tests that need no AWS, with no AWS credentials" - @echo " offline-sqla " + @echo " offline-sqla [min|latest|VERSION]" @echo " Run the SQLAlchemy tests that need no AWS and collect the compliance" @echo " suites on the declared minimum, the latest release, or a version" @echo " sqla Run SQLAlchemy dialect tests" @@ -87,8 +87,9 @@ _test-offline: # suites (which imports them without connecting), on another SQLAlchemy: # "min" and "latest" are the lowest and the highest release that the extras # allow, resolved by uv; any other value is a version. The packages are -# resolved before _offline removes the proxy settings. -_test-offline-sqla version: +# resolved and cached before _offline removes the proxy settings, and the runs +# inside it use that cache only (--offline). +_test-offline-sqla version="min": #!/usr/bin/env bash set -euo pipefail case "{{version}}" in @@ -104,10 +105,10 @@ _test-offline-sqla version: fi with="sqlalchemy[asyncio]==$version" uv run --no-env-file --with "$with" python -c 'import sqlalchemy; print("SQLAlchemy", sqlalchemy.__version__)' - run="uv run --no-sync --no-env-file --with $with" - just _offline $run pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/sqlalchemy/ tests/pyathena/aio/sqlalchemy/ - just _offline $run pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ - just _offline $run pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ --dburi async + run=(uv run --offline --no-sync --no-env-file --with "$with") + just _offline "${run[@]}" pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/sqlalchemy/ tests/pyathena/aio/sqlalchemy/ + just _offline "${run[@]}" pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ + just _offline "${run[@]}" pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ --dburi async _test-sqla: uv run pytest -n 8 {{PYTEST_RERUN}} --cov pyathena --cov-report html --cov-report term tests/sqlalchemy/ From 522df7f1030135dd619141265afd7e56de595b07 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Mon, 30 Nov 2026 22:40:44 +0900 Subject: [PATCH 3/9] Resolve the SQLAlchemy version in one case statement (GH-1543) Co-Authored-By: Claude Opus 5.5 --- justfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/justfile b/justfile index ff2252c5e..3d96455a3 100644 --- a/justfile +++ b/justfile @@ -92,19 +92,19 @@ _test-offline: _test-offline-sqla version="min": #!/usr/bin/env bash set -euo pipefail + resolve() { + uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ + --resolution "$1" --no-deps --no-header --no-annotate --quiet \ + | sed -n 's/^sqlalchemy==//p' + } case "{{version}}" in - min) resolution=lowest-direct ;; - latest) resolution=highest ;; - *) resolution= ;; + min) version=$(resolve lowest-direct) ;; + latest) version=$(resolve highest) ;; + *) version="{{version}}" ;; esac - version="{{version}}" - if [ -n "$resolution" ]; then - version=$(uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ - --resolution "$resolution" --no-deps --no-header --no-annotate --quiet \ - | sed -n 's/^sqlalchemy==//p') - fi with="sqlalchemy[asyncio]==$version" - uv run --no-env-file --with "$with" python -c 'import sqlalchemy; print("SQLAlchemy", sqlalchemy.__version__)' + echo "SQLAlchemy $version" + uv run --no-env-file --with "$with" true run=(uv run --offline --no-sync --no-env-file --with "$with") just _offline "${run[@]}" pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/sqlalchemy/ tests/pyathena/aio/sqlalchemy/ just _offline "${run[@]}" pytest -n 0 -p no:rerunfailures --collect-only -qq tests/sqlalchemy/ From 85f66fcfb54ae5bed66809a04aedfe2d4f45bc63 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 01:00:36 +0900 Subject: [PATCH 4/9] Pass the version as an argument, keep uv's cache, and describe collection precisely (GH-1543) From the independent review: the recipe takes the version as a positional argument instead of interpolating it into the script; it unsets UV_NO_CACHE, since the runs inside _offline read the packages from uv's cache; collecting the compliance suites opens a DB-API connection without contacting AWS, so the docs say so; the workflow comment says the offline job covers the dialect tests on the locked version and the AWS suites the compliance suites; and the NameDenormalizeTest comment says Athena returns a core select's names as written and the names of SELECT * in lowercase. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 3 ++- docs/testing.md | 2 +- justfile | 9 ++++++--- tests/sqlalchemy/test_suite.py | 8 ++++---- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d1feda5ec..6deb6689d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -92,7 +92,8 @@ jobs: # The SQLAlchemy tests that need no AWS, and the collection of the compliance # suites, on the lowest and the highest SQLAlchemy release that the extras - # allow; the offline job above runs them on the locked version. The AWS suites + # allow; the offline job above runs the dialect tests on the locked version, + # and the AWS suites run the compliance suites on it. The AWS suites # do not wait for this job, so a new SQLAlchemy release that breaks it does # not stop the AWS suites of unrelated pull requests. The Release workflow # requires it, as it requires every job of this workflow. diff --git a/docs/testing.md b/docs/testing.md index 6de0a3246..56baf6908 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -162,7 +162,7 @@ uv run --env-file .env pytest -n 1 -m aws tests/pyathena/test_cursor.py ``` `just test offline` runs the SQLAlchemy tests on the locked SQLAlchemy. -`just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without connecting: +`just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without contacting AWS: ```bash just test offline-sqla min # the lowest release that the sqlalchemy extras allow diff --git a/justfile b/justfile index 3d96455a3..38ac4e724 100644 --- a/justfile +++ b/justfile @@ -84,23 +84,26 @@ _test-offline: @just _offline uv run --no-sync --no-env-file pytest -n auto -p no:rerunfailures -m "not aws" tests/pyathena/ # The SQLAlchemy tests that need no AWS, and the collection of the compliance -# suites (which imports them without connecting), on another SQLAlchemy: +# suites (which imports them without contacting AWS), on another SQLAlchemy: # "min" and "latest" are the lowest and the highest release that the extras # allow, resolved by uv; any other value is a version. The packages are # resolved and cached before _offline removes the proxy settings, and the runs # inside it use that cache only (--offline). +[positional-arguments] _test-offline-sqla version="min": #!/usr/bin/env bash set -euo pipefail + # The runs inside _offline read the packages from uv's cache. + unset UV_NO_CACHE resolve() { uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ --resolution "$1" --no-deps --no-header --no-annotate --quiet \ | sed -n 's/^sqlalchemy==//p' } - case "{{version}}" in + case "$1" in min) version=$(resolve lowest-direct) ;; latest) version=$(resolve highest) ;; - *) version="{{version}}" ;; + *) version="$1" ;; esac with="sqlalchemy[asyncio]==$version" echo "SQLAlchemy $version" diff --git a/tests/sqlalchemy/test_suite.py b/tests/sqlalchemy/test_suite.py index 2736fe96c..19fbe0aaa 100644 --- a/tests/sqlalchemy/test_suite.py +++ b/tests/sqlalchemy/test_suite.py @@ -1281,10 +1281,10 @@ class CompoundSelectTest(_InsertFixtureRowsOnce, _CompoundSelectTest): class NameDenormalizeTest(_InsertFixtureRowsOnce, sa_suite.NameDenormalizeTest): @functools.wraps(sa_suite.NameDenormalizeTest.test_cols_driver_cols) def test_cols_driver_cols(self, **kwargs): - # SQLAlchemy's variations also pass exclusion arguments. A core - # select maps the columns by position; the other statements read - # the names from the result, which Athena returns in lowercase, - # including quoted names. + # SQLAlchemy's variations also pass exclusion arguments. Athena + # returns the column names of a core select as its column list + # writes them, but the names of `SELECT *` in lowercase, including + # quoted names, which the driver SQL and textual statements read. if not kwargs["stmt_type"].core_select: pytest.skip("Athena returns column names in lowercase.") super().test_cols_driver_cols(**kwargs) From adda5d989fea09c65bcf748c0341e4af98b5ad14 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 01:13:09 +0900 Subject: [PATCH 5/9] Forward test arguments positionally and keep a disabled cache temporary (GH-1543) From the independent follow-up: `just test` passes its arguments to the target recipe as positional arguments, so a version reaches uv as one value; and when the caller disables uv's cache (UV_NO_CACHE), the offline-sqla recipe uses a temporary cache shared by its uv runs instead of the persistent one. Co-Authored-By: Claude Opus 5.5 --- justfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 38ac4e724..3a62b49c2 100644 --- a/justfile +++ b/justfile @@ -36,8 +36,9 @@ license-headers: uv run python scripts/check_license_headers.py # Run tests: just test (pyathena|offline|offline-sqla [min|latest|VERSION]|sqla|sqla-async) +[positional-arguments] test target="help" *args: - @just _test-{{ if target =~ "^-" { "help" } else { target } }} {{args}} + @shift && just _test-{{ if target =~ "^-" { "help" } else { target } }} "$@" _test-help: @echo "Usage: just test " @@ -93,8 +94,14 @@ _test-offline: _test-offline-sqla version="min": #!/usr/bin/env bash set -euo pipefail - # The runs inside _offline read the packages from uv's cache. - unset UV_NO_CACHE + # The runs inside _offline read the packages from uv's cache, so a caller + # that disables the cache gets a temporary one for this recipe. + if [ -n "${UV_NO_CACHE:-}" ]; then + UV_CACHE_DIR=$(mktemp -d) + export UV_CACHE_DIR + trap 'rm -rf "$UV_CACHE_DIR"' EXIT + unset UV_NO_CACHE + fi resolve() { uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ --resolution "$1" --no-deps --no-header --no-annotate --quiet \ From 48fd2b7bc42b52e63d3d96afcffc9b7bba114a3f Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 01:30:44 +0900 Subject: [PATCH 6/9] Leave uv's cache settings to the caller (GH-1543) Replacing a disabled cache with a temporary one broke other configurations (UV_NO_CACHE=false, a symlinked environment). The recipe needs uv's cache, as its comment now says; with the cache disabled, uv reports that the package is not cached. Co-Authored-By: Claude Opus 5.5 --- justfile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/justfile b/justfile index 3a62b49c2..3e93a62bf 100644 --- a/justfile +++ b/justfile @@ -89,19 +89,11 @@ _test-offline: # "min" and "latest" are the lowest and the highest release that the extras # allow, resolved by uv; any other value is a version. The packages are # resolved and cached before _offline removes the proxy settings, and the runs -# inside it use that cache only (--offline). +# inside it use that cache only (--offline), so the recipe needs uv's cache. [positional-arguments] _test-offline-sqla version="min": #!/usr/bin/env bash set -euo pipefail - # The runs inside _offline read the packages from uv's cache, so a caller - # that disables the cache gets a temporary one for this recipe. - if [ -n "${UV_NO_CACHE:-}" ]; then - UV_CACHE_DIR=$(mktemp -d) - export UV_CACHE_DIR - trap 'rm -rf "$UV_CACHE_DIR"' EXIT - unset UV_NO_CACHE - fi resolve() { uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ --resolution "$1" --no-deps --no-header --no-annotate --quiet \ From 26a9e278a8237b216b337ccbc2bdccb73be53bc2 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 08:41:33 +0900 Subject: [PATCH 7/9] Run the offline SQLAlchemy job per SQLAlchemy series (GH-1543) The job's purpose is to test each supported SQLAlchemy series, 2.0 and 2.1. "min" and "latest" tested the declared minimum and the newest release instead: once the lock moves to 2.1, the latest 2.0 release would go untested, and lowest-direct resolution also lowered boto3, fsspec, and the other direct dependencies. `just test offline-sqla SERIES` now runs the latest release of a series that the extras allow, and a full version still runs that version. Each series runs on the newest Python version for which its releases publish wheels (2.0 on 3.14, 2.1 on 3.15), and the matrix comment says why the versions differ. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 16 +++++++++------- AGENTS.md | 2 +- docs/contributing.md | 2 +- docs/testing.md | 8 ++++---- justfile | 34 ++++++++++++++++------------------ 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6deb6689d..697f2774a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -91,8 +91,8 @@ jobs: - run: just test offline # The SQLAlchemy tests that need no AWS, and the collection of the compliance - # suites, on the lowest and the highest SQLAlchemy release that the extras - # allow; the offline job above runs the dialect tests on the locked version, + # suites, on the latest release of each supported SQLAlchemy series; the + # offline job above runs the dialect tests on the locked version, # and the AWS suites run the compliance suites on it. The AWS suites # do not wait for this job, so a new SQLAlchemy release that breaks it does # not stop the AWS suites of unrelated pull requests. The Release workflow @@ -105,12 +105,14 @@ jobs: strategy: fail-fast: false matrix: + # Each series runs on the newest Python version for which its releases + # publish wheels, so the versions differ: SQLAlchemy 2.0 publishes none + # for Python 3.15, where uv would build it from source. Move a series to + # a newer Python version once its releases publish wheels for it. include: - # The minimum on the oldest supported Python version, whose wheels - # the oldest SQLAlchemy release provides. - - sqlalchemy: min - python-version: '3.11' - - sqlalchemy: latest + - sqlalchemy: '2.0' + python-version: '3.14' + - sqlalchemy: '2.1' python-version: '3.15' steps: - name: Checkout diff --git a/AGENTS.md b/AGENTS.md index eb6aea49e..46ad94cfe 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,7 @@ just lint # Python lint, format check, mypy, CloudFormation validation, and li ```bash # ALWAYS run `just lint` first — tests will fail if lint doesn't pass just test offline # PyAthena tests that need no AWS, with no AWS credentials or .env -just test offline-sqla min # SQLAlchemy tests that need no AWS on the lowest allowed SQLAlchemy (also latest, or a version) +just test offline-sqla 2.0 # SQLAlchemy tests that need no AWS on the latest 2.0 release (also 2.1, or a version) just test pyathena # PyAthena tests, including AWS integration (runs lint first) just test sqla # SQLAlchemy compliance suite just test sqla-async # SQLAlchemy async compliance suite diff --git a/docs/contributing.md b/docs/contributing.md index c4ade168d..17617359d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -63,7 +63,7 @@ Choose coverage based on the affected behavior, including synchronous and asynch SQLAlchemy dialect changes require the relevant PyAthena dialect tests under `tests/pyathena/sqlalchemy/` as well as the SQLAlchemy compliance suite (`just test sqla`). Changes affecting async dialects also require the relevant tests under `tests/pyathena/aio/sqlalchemy/` and `just test sqla-async`. The PyAthena dialect tests are included in `just test pyathena`; they are not run by the two compliance-suite commands. -`just test offline-sqla min` and `just test offline-sqla latest` run the dialect tests that need no AWS, and collect the compliance suites, on the lowest and the highest SQLAlchemy release that PyAthena allows. +`just test offline-sqla 2.0` and `just test offline-sqla 2.1` run the dialect tests that need no AWS, and collect the compliance suites, on the latest release of each supported SQLAlchemy series. Exercise the regression on the version before the fix where practical, and record the before/after result. Documentation-only changes need documentation checks; changes limited to logic independent of AWS need appropriate tests for that logic. `just test offline` runs the tests that need no AWS without AWS credentials; the testing guide describes when a change also needs the AWS tests. diff --git a/docs/testing.md b/docs/testing.md index 56baf6908..be7a08d82 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -165,12 +165,12 @@ uv run --env-file .env pytest -n 1 -m aws tests/pyathena/test_cursor.py `just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without contacting AWS: ```bash -just test offline-sqla min # the lowest release that the sqlalchemy extras allow -just test offline-sqla latest # the highest release that they allow +just test offline-sqla 2.0 # the latest 2.0 release that the sqlalchemy extras allow +just test offline-sqla 2.1 # the latest 2.1 release just test offline-sqla 2.1.9 # a given release ``` -uv resolves `min`, the default, and `latest` from `pyproject.toml`, and the recipe prints the SQLAlchemy version that it runs. +uv resolves a series from `pyproject.toml`, and the recipe prints the SQLAlchemy version that it runs. ### S3 null-version moves @@ -282,7 +282,7 @@ Retain dtype and schema checks, option contexts, and resource cleanup where appl The Test workflow runs for pull requests that change files other than `docs/` and Markdown. It runs the offline checks (`just lint`, and `just test offline` on the newest supported Python version) on each of them, including Drafts and external forks. -It also runs `just test offline-sqla min` on the oldest supported Python version and `just test offline-sqla latest` on the newest; the AWS suites do not wait for these, and the Release workflow requires them. +It also runs `just test offline-sqla` for each supported SQLAlchemy series (2.0 and 2.1), each on the newest Python version for which that series publishes wheels; the AWS suites do not wait for these, and the Release workflow requires them. The AWS suites start only after the offline checks pass, and run as follows: | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | diff --git a/justfile b/justfile index 3e93a62bf..db2423842 100644 --- a/justfile +++ b/justfile @@ -35,7 +35,7 @@ lint: license-headers license-headers: uv run python scripts/check_license_headers.py -# Run tests: just test (pyathena|offline|offline-sqla [min|latest|VERSION]|sqla|sqla-async) +# Run tests: just test (pyathena|offline|offline-sqla SERIES|VERSION|sqla|sqla-async) [positional-arguments] test target="help" *args: @shift && just _test-{{ if target =~ "^-" { "help" } else { target } }} "$@" @@ -46,9 +46,9 @@ _test-help: @echo "Targets:" @echo " pyathena Run the PyAthena tests, including AWS integration tests (runs lint first)" @echo " offline Run the PyAthena tests that need no AWS, with no AWS credentials" - @echo " offline-sqla [min|latest|VERSION]" + @echo " offline-sqla SERIES|VERSION" @echo " Run the SQLAlchemy tests that need no AWS and collect the compliance" - @echo " suites on the declared minimum, the latest release, or a version" + @echo " suites on the latest release of a series, such as 2.0, or a version" @echo " sqla Run SQLAlchemy dialect tests" @echo " sqla-async Run SQLAlchemy async dialect tests" @@ -86,24 +86,22 @@ _test-offline: # The SQLAlchemy tests that need no AWS, and the collection of the compliance # suites (which imports them without contacting AWS), on another SQLAlchemy: -# "min" and "latest" are the lowest and the highest release that the extras -# allow, resolved by uv; any other value is a version. The packages are -# resolved and cached before _offline removes the proxy settings, and the runs -# inside it use that cache only (--offline), so the recipe needs uv's cache. +# a series such as 2.0 runs its latest release that the extras allow, resolved +# by uv, and any other value is a version. The packages are resolved and cached +# before _offline removes the proxy settings, and the runs inside it use that +# cache only (--offline), so the recipe needs uv's cache. [positional-arguments] -_test-offline-sqla version="min": +_test-offline-sqla version: #!/usr/bin/env bash set -euo pipefail - resolve() { - uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ - --resolution "$1" --no-deps --no-header --no-annotate --quiet \ - | sed -n 's/^sqlalchemy==//p' - } - case "$1" in - min) version=$(resolve lowest-direct) ;; - latest) version=$(resolve highest) ;; - *) version="$1" ;; - esac + if [[ "$1" =~ ^([0-9]+)\.([0-9]+)$ ]]; then + series="sqlalchemy>=$1,<${BASH_REMATCH[1]}.$((BASH_REMATCH[2] + 1))" + version=$(uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ + --constraint <(echo "$series") --no-deps --no-header --no-annotate --quiet \ + | sed -n 's/^sqlalchemy==//p') + else + version="$1" + fi with="sqlalchemy[asyncio]==$version" echo "SQLAlchemy $version" uv run --no-env-file --with "$with" true From 397f4fa22000f82c55ad8c403faf6150712b2487 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 08:54:17 +0900 Subject: [PATCH 8/9] Resolve series at the highest release and set up Python on both rows (GH-1543) From the independent follow-up review: - `uv pip compile` gets `--resolution highest`, so a UV_RESOLUTION setting cannot resolve a series to an older release. - Both rows use setup-python: uv's Python 3.13+ cannot compile Python.h, which the 3.14 row may need too. - The matrix comment and the testing guide say "compiled wheels": SQLAlchemy 2.0 also publishes a pure-Python wheel, which Python 3.15 would install without the C extensions. - The testing guide shows the recipe's required argument. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 12 ++++++------ docs/testing.md | 4 ++-- justfile | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 697f2774a..3e7469cb8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -106,9 +106,10 @@ jobs: fail-fast: false matrix: # Each series runs on the newest Python version for which its releases - # publish wheels, so the versions differ: SQLAlchemy 2.0 publishes none - # for Python 3.15, where uv would build it from source. Move a series to - # a newer Python version once its releases publish wheels for it. + # publish compiled wheels, so the versions differ: SQLAlchemy 2.0 has + # none for Python 3.15, where only its pure-Python wheel, without the + # C extensions, would install. Move a series to a newer Python version + # once its releases publish compiled wheels for it. include: - sqlalchemy: '2.0' python-version: '3.14' @@ -124,8 +125,7 @@ jobs: python-version: ${{ matrix.python-version }} enable-cache: true # As in the offline job, uv's Python 3.13+ cannot compile Python.h. - - if: matrix.python-version == '3.15' - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - uses: taiki-e/install-action@7a79fe8c3a13344501c80d99cae481c1c9085912 # v2.81.10 @@ -212,7 +212,7 @@ jobs: REQUESTED_VERSIONS: ${{ inputs.python-versions }} # Every supported version, oldest first; keep in sync with the # pyproject.toml classifiers, the offline job's version, and the - # offline-sqla job's matrix and its setup-python condition. + # offline-sqla job's matrix. PYTHON_VERSIONS: '["3.11", "3.12", "3.13", "3.14", "3.15"]' run: | case "$EVENT_NAME" in diff --git a/docs/testing.md b/docs/testing.md index be7a08d82..888bb0f86 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -162,7 +162,7 @@ uv run --env-file .env pytest -n 1 -m aws tests/pyathena/test_cursor.py ``` `just test offline` runs the SQLAlchemy tests on the locked SQLAlchemy. -`just test offline-sqla` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without contacting AWS: +`just test offline-sqla ` runs the SQLAlchemy tests that need no AWS (`tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`) on another release, in the same environment, and collects the compliance suites (`tests/sqlalchemy/`, synchronous and `--dburi async`), which imports them without contacting AWS: ```bash just test offline-sqla 2.0 # the latest 2.0 release that the sqlalchemy extras allow @@ -282,7 +282,7 @@ Retain dtype and schema checks, option contexts, and resource cleanup where appl The Test workflow runs for pull requests that change files other than `docs/` and Markdown. It runs the offline checks (`just lint`, and `just test offline` on the newest supported Python version) on each of them, including Drafts and external forks. -It also runs `just test offline-sqla` for each supported SQLAlchemy series (2.0 and 2.1), each on the newest Python version for which that series publishes wheels; the AWS suites do not wait for these, and the Release workflow requires them. +It also runs `just test offline-sqla` for each supported SQLAlchemy series (2.0 and 2.1), each on the newest Python version for which that series publishes compiled wheels; the AWS suites do not wait for these, and the Release workflow requires them. The AWS suites start only after the offline checks pass, and run as follows: | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | diff --git a/justfile b/justfile index db2423842..d3c3d4b6a 100644 --- a/justfile +++ b/justfile @@ -97,7 +97,8 @@ _test-offline-sqla version: if [[ "$1" =~ ^([0-9]+)\.([0-9]+)$ ]]; then series="sqlalchemy>=$1,<${BASH_REMATCH[1]}.$((BASH_REMATCH[2] + 1))" version=$(uv pip compile pyproject.toml --extra sqlalchemy --extra aiosqlalchemy \ - --constraint <(echo "$series") --no-deps --no-header --no-annotate --quiet \ + --constraint <(echo "$series") --resolution highest \ + --no-deps --no-header --no-annotate --quiet \ | sed -n 's/^sqlalchemy==//p') else version="$1" From 8d3093890556e72622d4407e816b010ea6020091 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Tue, 1 Dec 2026 09:10:14 +0900 Subject: [PATCH 9/9] Show the CI invocations of offline-sqla in the testing guide (GH-1543) From the independent follow-up review: the GitHub Actions section showed the recipe without its required argument. Co-Authored-By: Claude Opus 5.5 --- docs/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/testing.md b/docs/testing.md index 888bb0f86..773371fc0 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -282,7 +282,7 @@ Retain dtype and schema checks, option contexts, and resource cleanup where appl The Test workflow runs for pull requests that change files other than `docs/` and Markdown. It runs the offline checks (`just lint`, and `just test offline` on the newest supported Python version) on each of them, including Drafts and external forks. -It also runs `just test offline-sqla` for each supported SQLAlchemy series (2.0 and 2.1), each on the newest Python version for which that series publishes compiled wheels; the AWS suites do not wait for these, and the Release workflow requires them. +It also runs `just test offline-sqla 2.0` and `just test offline-sqla 2.1`, for each supported SQLAlchemy series, each on the newest Python version for which that series publishes compiled wheels; the AWS suites do not wait for these, and the Release workflow requires them. The AWS suites start only after the offline checks pass, and run as follows: | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions |