Backport #906: Run SQLAlchemy and Spark tests when shared core modules change - #910
Merged
Merged
Conversation
…s change The Test workflow's changes job now also selects the SQLAlchemy and Spark tests when a pull request changes a top-level module of pyathena or pyathena.aio, or a shared test fixture (the tests and tests/pyathena(/aio) package initializers and conftest files, tests/pyathena/tables.py, tests/pyathena/util.py, tests/resources/). Changes limited to other subpackages still skip them. The selection now uses dorny/paths-filter v4.0.3 (SHA-pinned) instead of gh api and grep; other events still run every suite. (cherry picked from commit 9b9421d) The merge commit applies cleanly; the added and removed lines match #906 exactly. 3.x has no tests/pyathena/tables.py, so that pattern matches nothing there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
laughingman7743
commented
Oct 1, 2026
| - id: filter | ||
| - id: paths | ||
| if: github.event_name == 'pull_request' | ||
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 |
Member
Author
There was a problem hiding this comment.
Self-review round one (backport behavior): CLEAN
- Scope: full pass over
git diff ac8b11ee2dd80576f9359efacbe80a3ee344c5d2..056da1af8a856d97746f5119c15b51916e97cc14, one commit cherry-picked with-m 1 -xfrom master's merge 9b9421d. - Fidelity: the added and removed lines are identical to
git diff 9b9421d8^1 9b9421d8, compared line by line. After this change,test.yamldiffers from master only in 3.x's lines: no license header (Add MIT headers to existing files written solely by the maintainer #805 is master-only) andPYTHON_VERSIONSwith 3.10 (Drop Python 3.10 support in 4.0.0 #864 is master-only). Prerequisites: on 3.x,test.yamlcame from the Run AWS test suites only on ready pull requests and related changes #837/Run pull-request AWS tests on the newest Python version only #863/Run the full test matrix in the Release workflow before publishing #862 backports. Master changed it afterwards only with Drop Python 3.10 support in 4.0.0 #864 (master-only) and ci: run SQLAlchemy and Spark tests when shared core modules change #906. So no prerequisite PR is missing. - 3.x consumers:
test-suite.yamlon 3.x differs from master only by the header,max-parallel, and the AWS retry env. The inputstest.yamlpasses (test-type,python-versions,skip-spark,skip-sqla) are the same.- 3.x
release.yamlcallstest.yamlthroughworkflow_callwithpull-requests: read. The caller's event ispush, so both outputs aretrue. The Python version step keeps 3.x's five versions.
- Dependency set on 3.x:
pyathena/(aio/)?(sqlalchemy|spark)/import only top-level modules (pyathena,common,error,formatter,model,util,aio.connection,aio.util), their own packages, and the result-set cursors. The result-set cursors stay excluded, as on master. Their tests importtests,tests.pyathena.conftest, andtests.pyathena.aio.conftest, andtests/pyathena/conftest.pyimportstests.pyathena.util. All are covered. - Selection on 3.x: the ci: run SQLAlchemy and Spark tests when shared core modules change #906 simulation (js-yaml 4 + picomatch 2.3.1,
dot: true) against this branch's workflow passes all 48 cases. Over 3.x's 236 tracked files, every selected path is underpyathena/ortests/, or is a shared file. - Checks:
just lint,actionlint, andpinact run --checkare clean.
| sqla: ${{ steps.filter.outputs.sqla }} | ||
| spark: ${{ steps.filter.outputs.spark }} | ||
| python-versions: ${{ steps.filter.outputs.python-versions }} | ||
| sqla: ${{ github.event_name != 'pull_request' || steps.paths.outputs.sqla == 'true' }} |
Member
Author
There was a problem hiding this comment.
Self-review round two (backport claims and operations): FINDINGS, repaired in the PR body
- Scope: claims in the commit message and PR body of
ac8b11ee2dd80576f9359efacbe80a3ee344c5d2..056da1af8a856d97746f5119c15b51916e97cc14. - Finding (repaired): the PR body said
tests/pyathena/tables.py"came with master's fixture work".git log --diff-filter=Ashows it was added by 12cfd65, merged in Define the shared test tables in Python and generate their data #874; the body now names Define the shared test tables in Python and generate their data #874. The pattern stays to keep the commit identical to master and matches nothing on 3.x. - Claims checked:
- "applies without conflicts, lines match ci: run SQLAlchemy and Spark tests when shared core modules change #906 exactly": the line-by-line comparison above.
- "differs from master's only in the 3.x-specific lines":
git diff origin/master HEAD -- .github/workflows/test.yamlshows only the header and 3.10. - The 3.x import list in WHY: grep over 3.x's
pyathena/(aio/)?(sqlalchemy|spark)/. 3.x does not importpyathena.cursor,converter, oraio.cursorthere, and the body does not claim it. - "CI only, no release-note entry": only
.github/workflows/test.yamlchanges.
- Operations: the action's first run on 3.x is this PR's Ready run. That run selects every suite, because
test.yamlchanges. The AWS cost effect on later 3.x pull requests follows ci: run SQLAlchemy and Spark tests when shared core modules change #906, and 3.x pull requests are few. - Evidence limits: the simulation is local, and AWS results come from the Ready run, which has not run yet.
laughingman7743
commented
Oct 1, 2026
| - id: filter | ||
| - id: paths | ||
| if: github.event_name == 'pull_request' | ||
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 |
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, session01a0f4dd-4ffe-7372-9a8d-3eda092b8d9b. Static review only. - Scope:
ac8b11ee2dd80576f9359efacbe80a3ee344c5d2..056da1af8a856d97746f5119c15b51916e97cc14on a detached snapshot, compared with master's merge commit 9b9421d. The package also contained the pinned paths-filter source (ceb8a2b8, v4.0.3), outside the tree. The prompt omitted the PR number, description, and prior findings. The snapshot's HEAD was unchanged afterwards; the only untracked entry was that reference directory. - Result:
- The added and removed lines match master's change; only the line numbers differ.
- 3.x's Python list still includes 3.10.
- No 3.x-only dependency outside the intentionally excluded subpackages is missed.
- The outputs follow the matched paths for ready same-repository PRs. Schedule, dispatch, and the Release
workflow_callselect both suites. 3.x'stest-suite.yamlinputs remain compatible. - The action is SHA-pinned with pull-request read permission, and a filter or API failure fails
changes.
- Pre-existing note (deferred):
paths-ignorealso applies toconverted_to_draft. A PR reduced to docs-only changes that is converted to Draft starts no replacement run, so an earlier active run is not cancelled. The behavior predates this commit and is documented in the comment aboveon:("paths-ignore applies to both, so a pull request that now changes only docs starts neither").
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 #906 to the
3.xmaintenance branch. It is one-xcommit, cherry-picked from master's merge commit 9b9421d (git cherry-pick -m 1 -x).changesjob also selects the SQLAlchemy tests (the compliance suites andtests/pyathena/(aio/)sqlalchemy/) and the Spark tests when a ready pull request changes:pyathenaorpyathena.aio(pyathena/*.py,pyathena/aio/*.py), ortests/__init__.py,tests/pyathena/__init__.py,tests/pyathena/aio/__init__.py,tests/pyathena/conftest.py,tests/pyathena/aio/conftest.py,tests/pyathena/tables.py,tests/pyathena/util.py, ortests/resources/.pyathena/filesystem/, the result-set packages) and their tests still skip both.ceb8a2b8, instead ofgh apiandgrep -E. The action receives only the job'spull-requests: readtoken.The merge commit applies without conflicts, and its added and removed lines match #906 exactly. After this change, 3.x's
test.yamldiffers from master's only in the 3.x-specific lines: no license header (#805 is master-only), andPYTHON_VERSIONSincludes 3.10 (#864 is master-only). 3.x has notests/pyathena/tables.py(master added it in #874), so that pattern matches nothing here; it is kept to stay identical to master.WHY
#896 asked for this fix on master first, then on
3.x, whose workflow matched master's after #893. #906 closed it on master. On 3.x the gap is the same: the SQLAlchemy and Spark packages import the same top-level modules (pyathena,common,error,formatter,model,util,aio.connection,aio.util), and their tests use the same fixtures (tests,tests.pyathena.conftest,tests.pyathena.aio.conftest,tests.pyathena.util). Yet a pull request that changes only those files skips both suites.Release: CI only, no release-note entry.
TEST
Tested commit: 056da1a.
just lint(license headers, ruff, mypy, cfn-lint): clean.actionlint .github/workflows/test.yamlandpinact run --check: clean. 3.x has nojust scriptsrecipe.filtersblock from this branch's workflow with js-yaml 4 and matches with picomatch 2.3.1,dot: true.pyathena/ortests/, or is one of the shared files.test.yaml, so every suite was selected; it is the first run of the action on3.x.listFiles(pull_number: 910)and received[modified] .github/workflows/test.yaml.shared = true,core = false,sqla = true,spark = true.test,test-sqla, andtest-sqla-asyncpassed.🤖 Generated with Claude Code