-
Notifications
You must be signed in to change notification settings - Fork 113
Run pull-request AWS tests on the newest Python version only #863
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
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 |
|---|---|---|
|
|
@@ -56,11 +56,12 @@ jobs: | |
| tool: just | ||
| - run: just lint | ||
|
|
||
| # Selects the AWS suites. 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 | ||
| # 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, or this workflow change. | ||
| # dependencies, or this workflow change. Pull requests test the newest | ||
| # Python version only; the schedule and dispatch test every version. | ||
| changes: | ||
| if: >- | ||
| github.event_name != 'pull_request' || | ||
|
|
@@ -72,19 +73,27 @@ jobs: | |
| outputs: | ||
| sqla: ${{ steps.filter.outputs.sqla }} | ||
| spark: ${{ steps.filter.outputs.spark }} | ||
| python-versions: ${{ steps.filter.outputs.python-versions }} | ||
| steps: | ||
| - id: filter | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| REPO: ${{ github.repository }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| # Every supported version, oldest first; keep in sync with the | ||
| # pyproject.toml classifiers. | ||
| PYTHON_VERSIONS: '["3.10", "3.11", "3.12", "3.13", "3.14"]' | ||
| run: | | ||
| if [[ "$EVENT_NAME" != "pull_request" ]]; then | ||
| echo "sqla=true" >> "$GITHUB_OUTPUT" | ||
| echo "spark=true" >> "$GITHUB_OUTPUT" | ||
| { | ||
| echo "python-versions=$(jq -c '.' <<< "$PYTHON_VERSIONS")" | ||
| echo "sqla=true" | ||
| echo "spark=true" | ||
| } >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| echo "python-versions=$(jq -c '[last]' <<< "$PYTHON_VERSIONS")" >> "$GITHUB_OUTPUT" | ||
|
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): Codex CLI 0.157.0, model
Reviewer result, verbatim:
Author verification:
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 (relayed): Codex CLI 0.157.0, model
Reviewer result, verbatim:
|
||
| files=$(gh api "repos/$REPO/pulls/$PR_NUMBER/files" --paginate --jq '.[].filename') | ||
| printf 'Changed files:\n%s\n' "$files" | ||
| shared='^(\.github/workflows/test(-suite)?\.yaml|justfile|pyproject\.toml|uv\.lock)$' | ||
|
|
@@ -108,6 +117,7 @@ jobs: | |
| uses: ./.github/workflows/test-suite.yaml | ||
| with: | ||
| test-type: pyathena | ||
| python-versions: ${{ needs.changes.outputs.python-versions }} | ||
| skip-spark: ${{ needs.changes.outputs.spark != 'true' }} | ||
| skip-sqla: ${{ needs.changes.outputs.sqla != 'true' }} | ||
|
|
||
|
|
@@ -117,10 +127,12 @@ jobs: | |
| uses: ./.github/workflows/test-suite.yaml | ||
| with: | ||
| test-type: sqla | ||
| python-versions: ${{ needs.changes.outputs.python-versions }} | ||
|
|
||
| test-sqla-async: | ||
| needs: changes | ||
| if: needs.changes.outputs.sqla == 'true' | ||
| uses: ./.github/workflows/test-suite.yaml | ||
| with: | ||
| test-type: sqla_async | ||
| python-versions: ${{ needs.changes.outputs.python-versions }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,11 +151,11 @@ Sanitize logs before sharing them. | |
| The Test workflow runs for pull requests that change files other than `docs/` and Markdown. | ||
| It runs the offline checks (`just lint`) on each of them, including Drafts and external forks, and runs the AWS suites as follows: | ||
|
|
||
| | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | | ||
| | --- | --- | --- | --- | | ||
| | Draft pull request | No | No | No | | ||
| | Ready pull request from a branch of this repository | Yes | When related files change | When related files change | | ||
| | Weekly schedule and manual dispatch | Yes | Yes | Yes | | ||
| | 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 | | ||
|
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 two (claims, callers, operations): FINDINGS, PR description corrected (no code change) Base Findings:
Checked and held:
Not observed: a post-merge dispatch or schedule run with 15 jobs (stated in TEST).
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. Round-two follow-up (
|
||
| | Weekly schedule and manual dispatch | 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/`. | ||
|
|
@@ -164,7 +164,7 @@ For the SQLAlchemy tests, the related files are `pyathena/sqlalchemy/`, `pyathen | |
| 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. | ||
| To run every suite on a branch, dispatch the workflow: | ||
| To run every suite on every supported Python version on a branch, dispatch the workflow: | ||
|
|
||
| ```bash | ||
| gh workflow run test.yaml --ref <branch> | ||
|
|
||
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 one (implementation behavior): CLEAN
Base
531185619465b809331a9a8cf2083884365de193, heada2eb20acf406a0e603ba37b562f1878c562e2c86.Covered:
.github/workflows/test.yaml.github/workflows/test-suite.yamldocs/testing.mdChecked:
pull_request→jq -c '[last]'→["3.14"].sqla=trueandspark=true.fromJSONyields"3.10", not3.1. Job names (run (3.10)) and thesetup-pythoncondition on'3.13'/'3.14'are unchanged.changesjob. For Draft and fork pull requests,changesis skipped. The dependent suite jobs are then skipped as before, so the requiredpython-versionsinput is never evaluated with an empty value.test-suite.yamlhas three callers, all intest.yaml, and all three pass the input. No other workflow calls it (benchmarks.yamlanddatabase-sweep.yamldo not).runscript) passes. SC2129 was fixed before this review.No findings.
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.
Round-one follow-up (
a2eb20acf406a0e603ba37b562f1878c562e2c86→738d64cf0939592ef4f395eb2a15c379689242de, same base531185619465b809331a9a8cf2083884365de193): CLEAN.github/workflows/test.yaml, removing "which the Release workflow checks".PYTHON_VERSIONSvalue, both selection branches, and the outputs are identical.