-
Notifications
You must be signed in to change notification settings - Fork 115
Run the PyAthena suite only when its files change #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2c369bf
dfc14e2
e737245
692d623
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,11 +65,12 @@ jobs: | |
| - run: just lint | ||
|
|
||
| # Selects the AWS suites and Python versions. Draft and external-fork pull | ||
| # requests run none. A ready pull request always runs the PyAthena suite; it | ||
| # runs the SQLAlchemy tests (the compliance suites and the PyAthena suite's | ||
| # SQLAlchemy tests) and the Spark tests only when their code, tests, | ||
| # dependencies, this workflow, the top-level modules of pyathena and | ||
| # pyathena.aio, or the shared test fixtures change. Pull requests and the | ||
| # requests run none. A ready pull request runs the PyAthena suite only when | ||
| # the package, the tests, setup.cfg, the dependencies, or this workflow | ||
| # change; it runs the SQLAlchemy tests (the compliance suites and the | ||
| # PyAthena suite's SQLAlchemy tests) and the Spark tests only when their | ||
| # code, tests, dependencies, this workflow, the top-level modules of pyathena | ||
| # and pyathena.aio, or the shared test fixtures change. Pull requests and the | ||
| # schedule test the newest Python version; a dispatch tests the requested | ||
| # versions or every version, and the Release workflow every version. | ||
| changes: | ||
|
|
@@ -81,6 +82,7 @@ jobs: | |
| permissions: | ||
| pull-requests: read | ||
| outputs: | ||
| pyathena: ${{ github.event_name != 'pull_request' || steps.paths.outputs.pyathena == 'true' }} | ||
| sqla: ${{ github.event_name != 'pull_request' || steps.paths.outputs.sqla == 'true' }} | ||
| spark: ${{ github.event_name != 'pull_request' || steps.paths.outputs.spark == 'true' }} | ||
| python-versions: ${{ steps.versions.outputs.python-versions }} | ||
|
|
@@ -125,6 +127,13 @@ jobs: | |
| - pyathena/aio/spark/** | ||
| - tests/pyathena/spark/** | ||
| - tests/pyathena/aio/spark/** | ||
| # A superset of sqla and spark, so their tests never run without | ||
| # the PyAthena suite. | ||
| pyathena: | ||
| - *shared | ||
| - setup.cfg | ||
| - pyathena/** | ||
| - tests/** | ||
| - id: versions | ||
| env: | ||
| EVENT_NAME: ${{ github.event_name }} | ||
|
|
@@ -156,6 +165,7 @@ jobs: | |
| # 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Self-review round one (implementation behavior): FINDINGS, repaired
|
||
| uses: ./.github/workflows/test-suite.yaml | ||
| with: | ||
| test-type: pyathena | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,18 +155,19 @@ It runs the offline checks (`just lint`) on each of them, including Drafts and e | |
| | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | | ||
| | --- | --- | --- | --- | --- | | ||
| | Draft pull request | No | No | No | None | | ||
| | Ready pull request from a branch of this repository | Yes | When related files change | When related files change | Newest supported | | ||
| | Ready pull request from a branch of this repository | When related files change | When related files change | When related files change | Newest supported | | ||
| | Weekly schedule | Yes | Yes | Yes | Newest supported | | ||
| | Manual dispatch | Yes | Yes | Yes | Requested, or all supported | | ||
| | Release tag (Release workflow) | Yes | Yes | Yes | All supported | | ||
|
|
||
| The SQLAlchemy tests are the compliance suites and the PyAthena suite's `tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`. | ||
| The Spark tests are the PyAthena suite's `tests/pyathena/spark/` and `tests/pyathena/aio/spark/`. | ||
| 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. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Independent review (relayed): FINDINGS, repaired in e737245
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repair self-review (both perspectives): CLEAN
|
||
| For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup.cfg`. | ||
| For the SQLAlchemy tests, they are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. | ||
| For the Spark tests, they are `pyathena/spark/`, `pyathena/aio/spark/`, and their PyAthena suite test directories. | ||
| Changes to `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run both. | ||
| For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts the AWS jobs, and converting it back to Draft cancels AWS jobs still running. | ||
| Changes to the modules directly under `pyathena/` and `pyathena/aio/`, the shared test fixtures such as `tests/pyathena/conftest.py` and `tests/resources/`, `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run all three. | ||
| For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts any AWS jobs its changed files select, and converting it back to Draft cancels AWS jobs still running. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Independent follow-up 1 (relayed): FINDINGS, repaired in 692d623
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repair self-review (both perspectives) and independent follow-up 2 (relayed): CLEAN
|
||
| To run every suite on a branch, dispatch the workflow; it tests every supported Python version unless `python-versions` lists some of them: | ||
|
|
||
| ```bash | ||
|
|
||
There was a problem hiding this comment.
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 and operational effects): FINDINGS, repaired in the PR description
git diff 468affc6417840912fd58b37712214c3a493edc3..dfc14e24ae3003a4418aa90b3bed2c607ea0027c(workflow comments,docs/testing.md, both commit messages, the PR body) and the issue premises it repeats.lintstill runs for PRs that change onlybenchmarks/,scripts/, orcloudformation/: the trigger'spaths-ignoreis unchanged (docs/**,**.md) andlinthas noif.scripts.yamltriggers onscripts/**and.github/workflows/**and runsjust scripts, which runspytest scripts/tests/.gh pr list --search merged:>=2026-06-01returns 104 PRs. The six docs/Markdown-only ones (Add a security policy #748, Add shared instructions for Codex and Claude Code #749, Pin the CI test badge to the master branch #766, Add shared development and review skills for Codex and Claude Code #778, Define contribution, AWS validation, and attribution requirements #788, Fix PandasCursor performance tuning examples #902) start no run. Of the other 98, exactly Update gh-action-pypi-publish to v1.14.2 for metadata 2.5 support #765, Add NOTICE acknowledging PyHive's influence #802, Run benchmark jobs on a fleet of identical hosts #823, Count initialization row validation as API-heavy fleet work #824, Allow Graviton benchmark hosts with an architecture parameter #827, and Sweep leaked test databases daily with a one-day cutoff #907 change selection, each from the PyAthena suite alone to no AWS suite.sqla/sparktrue impliespyathenatrue for every tracked file (simulation invariant), and for a PR's file set because each filter is an any-match.corepaths that ci: run SQLAlchemy and Spark tests when shared core modules change #906 added. The comment's short list ("the dependencies, or this workflow") follows the existing SQLAlchemy/Spark sentence; the exact list is thefiltersblock below it and the docs. Deferred as wording, not behavior..github/workflows/test.yaml, which is inshared.pyathenaoutput is alwaystrue.pyathena=falserun exists until a later PR that changes only unlisted files.