shahar1 opened a new pull request, #68060:
URL: https://github.com/apache/airflow/pull/68060
## What
Any change under the API directory (`airflow-core/src/airflow/api_fastapi/`,
the
legacy `api/`, or their test dirs) currently sets `full-tests-needed=true` —
the
whole ~135-job matrix, including every provider's tests. The API tree is
large
and churns constantly, so this is the single largest source of unnecessary
full-matrix runs.
But only the API **contract** changing ripples broadly: the generated OpenAPI
spec, consumed by the UI codegen and the generated clients. Plain API
source/test edits that leave the committed spec untouched do not — and a prek
hook (`Generate the FastAPI API spec`) regenerates and verifies the spec, so
an
unchanged committed spec reliably means an unchanged contract.
This narrows the full-tests trigger from `API_FILES` to `API_CODEGEN_FILES`
(the
generated spec / client generator):
- **API source/test edit, no spec change** → no longer full matrix. Still
runs
the `API` core test type and the `fab` provider (via `run_api_tests`);
just no
longer drags in the entire provider matrix.
- **OpenAPI spec change** → still forces the full matrix (locked by a test).
## Sizing
Measured by replaying the `full_tests_needed` gates over 750 merged PRs to
`main`
(30-day window) from their changed-file lists:
- `full-tests-needed` fires on **31.6%** of PRs.
- API was the **sole** reason on **75 PRs (10%)**; only **12** of those also
changed the OpenAPI spec.
- So this spares **~63 full-matrix runs / month (8.4% of PRs)** while
preserving
full coverage on the 12 contract-changing PRs.
Part of the CI-capacity work to reduce GitHub Actions runner load (fork PRs
run
on public runners and are the constrained resource). Sibling over-trigger fix
for the file-count gate: #68059.
## Tests
Updated the four API selective-check cases to assert the new lean selection
(`API` + `Always` + `Providers[common.compat,fab]`), and locked in that an
OpenAPI spec change still forces the full matrix. Full suite green (172
passed).
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.8)
Generated-by: Claude Code (Opus 4.8) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]