Repository navigation
ci(python): run PR static, unit and Airflow API checks in one job - #38691
Conversation
Convert reusable-py-unit.yml and reusable-py-airflow-apis.yml into the python-unit and python-airflow-apis composite actions. ci-pr.yml runs static checks, unit tests and Airflow API tests as conditional steps of a single python job; merge-queue and nightly call the actions from their own jobs.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
| if: ${{ needs.plan.outputs.static == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| timeout-minutes: 120 |
There was a problem hiding this comment.
💡 Quality: New 120-minute PR job timeout is not stated in the ADR
ci-pr.yml now gives the merged python job timeout-minutes: 120. Before, there were separate budgets: 60 minutes for py-static-checks plus each reusable workflow's own timeout. The v4 revision of docs/decisions/2026-11-11-python-ci-selects-workloads-by-event.md covers the single-job layout and the !cancelled() behaviour, but it says nothing about this timeout or how it was picked. One wall-clock limit now covers static checks, model preparation, the unit suite and the Docker/Maven stack startup for Airflow APIs (which can take up to 60 minutes on its own). If the limit is too low, a PR that selects every suite gets cancelled, and the later suites lose their results.
The record would state: "The single python PR job has a 120-minute timeout, sized to cover static checks plus unit tests plus Airflow API stack startup and tests running one after another." Add that sentence to the v4 paragraph, or change the budget to match whatever the real rule is.
Record the timeout rationale in the v4 ADR paragraph:
`python` job, and later suites still run after an earlier step fails. That job's 120-minute
timeout covers static checks, unit tests and Airflow API stack startup and tests run in sequence.
Merge-queue and nightly keep separate jobs.
Was this helpful? React with 👍 / 👎
Drop the py-tests-status aggregate job from ci-pr.yml. The python job now always runs for non-draft PRs, verifies the selected step results in a final step, and publishes py-checkstyle, py-tests-status and (when the Airflow API step ran) airflow-apis through LouisBrunner/checks-action.
Fork PRs get a read-only token and cannot create check runs. The py-tests-status job verifies the python job and its gate output on every non-draft PR. It is never skipped, because a skipped job reports success and would override a failing check of the same name. The python job publishes py-checkstyle and airflow-apis only when its token can write checks.
Code Review 👍 Approved with suggestions 🟡 Medium risk 2 closed / 3 findingsConsolidating Python PR suites and replacing their status checks changes CI gating; a reporting error could misstate validation and block or permit a merge. Merges the PR static checks, unit tests and Airflow API checks into one 💡 Quality: New 120-minute PR job timeout is not stated in the ADR📄 .github/workflows/ci-pr.yml:67 📄 docs/decisions/2026-11-11-python-ci-selects-workloads-by-event.md:52-57
The record would state: "The single Record the timeout rationale in the v4 ADR paragraph✅ 2 closed✅ Bug: Required py-tests-status never appears on fork PRs
✅ Quality: ADR leaves out the branch-protection and fork rules for py-tests-status
🤖 Prompt for agentsVerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* Refactor Python CI into event-owned workflows * Simplify Python CI actions and workflow policy * Align composite action metadata and names * Separate Python setup and normalize CI workflows * Remove redundant connector status and fixture cache input * Keep test reporting independent of execution * Share pinned uv setup across local and CI commands * Simplify Python type checks and nightly helper tests * Reuse loaded Python environment profiles * Match nightly coverage producers to main * Simplify host Python environment preparation * Simplify Python CI orchestration and preserve pytest exit codes * Remove redundant Python CI generation and outputs * Consolidate coverage reporting and remove unused Python CI interfaces * Simplify reusable CI jobs and clarify workflow responsibilities * Simplify Python CI and tooling regression tests * Reduce Python CI runners and repeated setup * Fix Python CI routing and coverage selection * Unify Python static check preparation * Share connector builds and reduce Python CI setup * Restore Ubuntu 24.04 for Playwright workflows * Trim Python failure diagnostics * Run Python lint before type preparation * Skip redundant Python coverage reports * Skip successful Python log processing * Separate test stack startup from Python preparation * Enable Corepack for Search and SSO browser tests * Reuse shared Python setup across workflows * Separate Docker startup from Playwright restoration * Revert "Separate Docker startup from Playwright restoration" This reverts commit 8519a30. * Remove UI coverage configuration tests * Keep behavioral Playwright cache tests and repair their assertions * Simplify Playwright planning tests and share summary setup * Keep merge-queue gate behavior tests and combine retry reporting * Make performance tests independent and check command status * Test summary outcomes across supported events * Verify retained runner diagnostics when Docker fails * Run Airflow API tests through shared CI entry workflows * Correct Python CI path selection * Narrow Python CI path selection * Simplify CI helper tests * Rename Python static check jobs * Share backend image across Python CI runners * Use generic names for the shared backend image * Run Python tooling checks only in nightly CI * Optimize nightly reporting and coverage * Extract Python Sonar composite action * Rename classification preparation jobs * Reduce unnecessary Python PR work * Remove draft conversion trigger * Share CLI E2E execution through Nox * Use configured Python version for operator validation * Move operator image validation to nightly * Record shared Java version follow-up * Remove deferred Java setup note from workflow * Avoid test compilation in backend image builds * Remove ingestion image producer disk cleanup * Reduce Airflow API backend preparation work * Always reuse the shared CLI ingestion image * Use configured highest Python for dependency reports * Move validation workflow follow-up out of source * Simplify CLI workflow checks and follow caller inputs * Trim redundant CLI contract inventory tests * Move release version checks into tooling tests * Remove unused Python source Makefile variables * Narrow Nox tool environments and simplify coverage * Simplify Python test dependencies and fix Airflow arguments * Derive Sonar Python versions from shared project configuration * Fix release stamping and CI review regressions * Allow free-text release base branches * Narrow Python PR selection and pass nightly tooling explicitly * Guard the default Python unit worker count * ci(python): run PR static, unit and Airflow API checks in one job (#38691) * ci(python): run PR static, unit and Airflow API checks in one job Convert reusable-py-unit.yml and reusable-py-airflow-apis.yml into the python-unit and python-airflow-apis composite actions. ci-pr.yml runs static checks, unit tests and Airflow API tests as conditional steps of a single python job; merge-queue and nightly call the actions from their own jobs. * ci(python): report PR Python results as checks from the python job Drop the py-tests-status aggregate job from ci-pr.yml. The python job now always runs for non-draft PRs, verifies the selected step results in a final step, and publishes py-checkstyle, py-tests-status and (when the Airflow API step ran) airflow-apis through LouisBrunner/checks-action. * ci(python): keep py-tests-status as a job so fork PRs report it Fork PRs get a read-only token and cannot create check runs. The py-tests-status job verifies the python job and its gate output on every non-draft PR. It is never skipped, because a skipped job reports success and would override a failing check of the same name. The python job publishes py-checkstyle and airflow-apis only when its token can write checks. --------- Co-authored-by: Matias Puerta <matias@getcollate.io>
Summary
ci-pr.yml:py-static-checks,python-unitandairflow-apisare merged into onepythonjob. It runs for every non-draft PR. Each suite is a step gated by the plan outputs and uses!cancelled(), so a failure in one suite doesn't skip the others. A final step checks the step results and exposes the outcome as a job output. On same-repo PRs,LouisBrunner/checks-action(v3.1.0, pinned SHA) publishespy-checkstyleand, only when that step ran,airflow-apis. The requiredpy-tests-statusis a smallubuntu-slimjob that checks the plan result, thepythonjob result and its check output.reusable-py-unit.ymlandreusable-py-airflow-apis.ymlare now the composite actions.github/actions/python-unitand.github/actions/python-airflow-apis. Each caller does the checkout. Inputs are unchanged exceptref, which moved to the caller's checkout.ci-merge-queue.ymlandci-nightly.ymlkeep their separate jobs and matrices, but each job now runs checkout and then the composite action..github/python-ci/paths.ymlfilters the new action directories in place of the deleted workflows.test_python_ci.pychecks artifact-name uniqueness against the unit action's steps.2026-11-11-python-ci-selects-workloads-by-eventgets a v4 revision describing this layout.Notes
setup-pythonagain, so the interpreter on PATH matches each suite.GITHUB_TOKEN, so they skip publishingpy-checkstyleandairflow-apis;py-tests-statusstill gates them as a job.py-tests-statusruns on every non-draft PR, not only on forks. A job skipped byifreports success, and because it finishes later it would override a failing check of the same name.Testing
pytest .github/scripts/tests/test_python_ci.py(49 passed; the gate fixture covers thepythonjob's check step and bothpy-tests-statusjobs, and a new test asserts the check step covers every suite step) andingestion/tests/cli_e2e_v2/meta/test_ci_workflow.py(9 passed)🤖 Generated with Claude Code