potiuk opened a new pull request, #68802:
URL: https://github.com/apache/airflow/pull/68802
`ENVIRONMENT_FILES` forces the **full test matrix** whenever any
`.github/workflows/*` file or any `scripts/ci/prek/*` file changes. Both
over-match work that cannot affect test outcomes:
- **Non-test workflows** — security scans (`codeql-analysis`), doc publishing
(`publish-docs-to-s3`), notifications (`ci-notification`), backporting,
stale/calendar bots, etc. — editing these can't change what tests do.
- **prek hooks** (`scripts/ci/prek/*`) drive *static checks*, not the test
matrix.
Measuring ~2 weeks of `Tests (AMD)` runs, these accidental triggers forced
the
full matrix on **~57 runs (~1,417 compute-hours, ~12% of all FULL-build
compute, ~48% of the env-files FULL tier)** — pure overhead.
This change:
- Excludes non-test workflows from `ENVIRONMENT_FILES` via a
negative-lookahead
allowlist. **Test / CI-config workflows** (`ci-amd`, `ci-arm`,
`run-unit-tests`, `k8s-tests`, `helm-tests`, image builds, …) still force
the
full matrix — the exclusion is conservative (anything not explicitly listed
still forces full).
- Moves `scripts/ci/prek` into a new `PREK_FILES` group that feeds only
`ci_image_build`, **not** `full_tests_needed`. A prek-only change still
builds
the CI image so `mypy-scripts` and image-based static checks run — it just
no
longer runs the whole test matrix.
Static checks run on every PR regardless, so this only removes the
unnecessary
full **test** matrix for changes that cannot affect tests. Doc and tests
(`test_non_test_workflows_do_not_force_full_tests`, updated prek case)
included.
---
##### 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]