Backport #913: Run the PyAthena suite only when its files change - #915
Merged
Merged
Conversation
The Test workflow's changes job gains a pyathena output, an allowlist of pyathena/, tests/, setup.cfg, and the shared build and workflow files, and the test job runs only when it is true. It is a superset of the sqla and spark filters. Other events still run every suite, and the trigger keeps paths-ignore, so the lint job still runs for every admitted pull request. docs/testing.md describes the selection, including the shared core paths from #906. (cherry picked from commit 7e8616f) The merge commit applies cleanly; the added and removed lines match #913 exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
laughingman7743
commented
Oct 1, 2026
| # parallel; each is still a separate job for "Re-run failed jobs". | ||
| test: | ||
| needs: changes | ||
| if: needs.changes.outputs.pyathena == 'true' |
Member
Author
There was a problem hiding this comment.
Self-review round one (implementation behavior): CLEAN
- Scope: full pass over
git diff 0397685561081561b4da6b2dcc2c4f8fac3ad175..93247b6fda14ab34bbd3c340e8ad1e1fae402836, two files:.github/workflows/test.yamlanddocs/testing.md. - Faithfulness: the added and removed lines are identical to Run the PyAthena suite only when its files change #913's merge delta (
7e8616fa^1..7e8616fa). The cherry-pick applied without conflicts. - Behavior on 3.x:
test.yamlhere matches master's except for the missing license header andPYTHON_VERSIONSwith 3.10, so the output, the filter, and theif:behave as on master. Non-pull_requestevents producepyathena=true.release.yamlcallstest.yamlfrom av*tag push andreleasehasneeds: test, so a release still runs every suite.test-suite.yamlkeeps the sameskip-sqla/skip-sparkinputs, so a running PyAthena suite still ignores those directories as before.- The 3.x branch protection has no required checks, so a skipped
testblocks nothing.
- What the suite reads on 3.x: tox in
pyproject.tomlrunsuv sync --group devandjust test pyathena(just lint= ruff and mypy, then pytest ontests/pyathena/). 3.x has no uv workspace.benchmarks/is excluded from ruff, mypy, and pytest collection. No test or recipe readsscripts/cloudformation/. Nothing outside the allowlist feeds the suite. - Simulation against this branch's workflow: the 28 cases from Run the PyAthena suite only when its files change #913 all match. The superset invariant holds over the 236 tracked files.
- Simplicity: none to apply; the backport keeps master's text verbatim.
laughingman7743
commented
Oct 1, 2026
| When the SQLAlchemy or Spark tests do not run, the PyAthena suite runs without them. | ||
| For the SQLAlchemy tests, the related files are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. | ||
| When the PyAthena suite runs but the SQLAlchemy or Spark tests do not, it runs without them. | ||
| For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup.cfg`. |
Member
Author
There was a problem hiding this comment.
Self-review round two (claims and operational effects): CLEAN
- Scope: full claim audit of
git diff 0397685561081561b4da6b2dcc2c4f8fac3ad175..93247b6fda14ab34bbd3c340e8ad1e1fae402836as it reads on 3.x: the workflow comments, thedocs/testing.mdGitHub Actions section, the commit message, and the PR body. - Claims checked against 3.x, not master:
just linton 3.x is ruff, ruff format, and mypy (justfile). There is no cfn-lint or license-header check, so the PR body names only ruff and mypy.- Draft cancellation (
docs/testing.md:90) depends onconverted_to_draftin the trigger, which 3.x has (test.yaml:9). - The fixtures the docs name,
tests/pyathena/conftest.pyandtests/resources/, exist on 3.x.tests/pyathena/tables.pyis a no-op pattern here, as in Backport #906: Run SQLAlchemy and Spark tests when shared core modules change #910. - The unselected non-docs files listed in the PR body match the simulator's output for the 236 tracked files.
- Replay:
gh pr list --base 3.x --state mergedreturns exactly Backport CI and SQLAlchemy changes to 3.x for v3.37.0 #893, Backport #839: Resolve the bare awsathena scheme to the REST dialect #903, and Backport #906: Run SQLAlchemy and Spark tests when shared core modules change #910. Compared with 3.x's current filter, none changes selection. - "Applies without conflicts and matches Run the PyAthena suite only when its files change #913 exactly": the delta comparison came out identical.
- Operator: on 3.x only pull requests that touch none of the allowlisted files lose their PyAthena run, for example
benchmarks/orscripts/cloudformation/. Release tag runs and dispatch still run every suite. 3.x has no weekly schedule of its own, because cron runs only on the default branch. A file missing from the allowlist would therefore surface on 3.x at the next release tag run, or through a dispatch. - Evidence limits: the selection is checked by local simulation. The Ready run of this PR will select every suite because it changes
test.yaml.
laughingman7743
commented
Oct 1, 2026
| # parallel; each is still a separate job for "Re-run failed jobs". | ||
| test: | ||
| needs: changes | ||
| if: needs.changes.outputs.pyathena == 'true' |
Member
Author
There was a problem hiding this comment.
Independent review (relayed): CLEAN
- Reviewer: Codex CLI 0.157.1, model
gpt-6-sol, reasoning effort high,--sandbox read-only,--ephemeral, session01a0f833-d953-7963-aa72-417ccea50be3. Static review only: no build or tests run. - Scope: full pass over
0397685561081561b4da6b2dcc2c4f8fac3ad175..93247b6fda14ab34bbd3c340e8ad1e1fae402836on a detached snapshot, compared with master's merge commit7e8616fa. The package also contained the pinned dorny/paths-filter v4.0.3 source (ceb8a2b8) outside the repository tree. The prompt omitted the PR number, description, and prior findings. After the run, the snapshot's HEAD was unchanged; its only untracked entry was that reference directory. - Covered:
test.yaml,test-suite.yaml,release.yaml, the pinned action source, the 3.xjustfile, the tox configuration, the tests and fixtures, and the GitHub Actions section ofdocs/testing.md. - Result: the backport matches the master delta. The filter covers the suite's test, configuration, and fixture paths on 3.x, and
sqla/sparkimplypyathena. Draft and fork PRs skip the AWS jobs. Schedule, dispatch, and the Release call selecttest, andrelease(needs: test) still waits on it. The comments and docs are accurate for 3.x. No introduced or pre-existing findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHAT
Backport #913 to the
3.xmaintenance branch. It is one-xcommit, cherry-picked from master's merge commit 7e8616f (git cherry-pick -m 1 -x).changesjob gains apyathenafilter: the shared files (test.yaml,test-suite.yaml,justfile,pyproject.toml,uv.lock),setup.cfg,pyathena/**, andtests/**. Thetestjob (the PyAthena suite) runs only when it matches.sqlaandspark, so the SQLAlchemy and Spark tests never run without the PyAthena suite.paths-ignore, so thelintjob (just lint, which on 3.x is ruff and mypy) still runs for every pull request the trigger admits.docs/testing.md: the GitHub Actions section describes the new selection and the shared core paths that ci: run SQLAlchemy and Spark tests when shared core modules change #906/Backport #906: Run SQLAlchemy and Spark tests when shared core modules change #910 added.The merge commit applies without conflicts, and its added and removed lines match #913 exactly. The changed lines of the
docs/testing.mdsection are identical to master; the rest of that section keeps its existing 3.x text.WHY
Part of #911, which asked for the same change on
3.xafter master. On 3.x, a ready pull request that changes only files such asbenchmarks/,scripts/, or.github/workflows/release.yamlstill runs the PyAthena suite against AWS.Release: CI only, no release-note entry.
TEST
Tested commit: 93247b6.
just lint(ruff, mypy),actionlint .github/workflows/test.yaml, andjust docs lint: clean.filtersblock, picomatchdot: true) against this branch's workflow:sqlaorsparkis unselected bypyathena. Unselected non-docs files:benchmarks/2018*/2022*,scripts/cloudformation/,scripts/worktree-env.sh,.github/workflows/{docs,docs-lint,docs-trigger,pinact,release}.yaml,.gitignore,.markdownlint-cli2.jsonc,.mise.toml,LICENSE, and Markdown.3.x(Backport CI and SQLAlchemy changes to 3.x for v3.37.0 #893, Backport #839: Resolve the bare awsathena scheme to the REST dialect #903, Backport #906: Run SQLAlchemy and Spark tests when shared core modules change #910): none changes selection.test.yaml, so every suite was selected: thechangeslog showsFilter pyathena = trueandChanges output set to ["shared","sqla","spark","pyathena"].test,test-sqla, andtest-sqla-asyncpassed.🤖 Generated with Claude Code