shahar1 opened a new pull request, #68042:
URL: https://github.com/apache/airflow/pull/68042

   ### What
   
   Exclude `example_dags/` from `PYTHON_PRODUCTION_FILES` — the "production 
code" definition that drives the large-PR line-count gate 
(`_is_large_enough_pr`). Covers both layouts:
   - airflow-core top-level `airflow/example_dags/`
   - nested `providers/<name>/.../example_dags/`
   
   ### Why
   
   A large diff to **example DAGs** currently trips the line-count heuristic 
(>500 "production" lines) and sets `full-tests-needed = true`, fanning out the 
**entire** matrix — core DB tests (MySQL/Postgres/Sqlite), Kubernetes, Helm, 
PROD image builds + all PROD image e2e tests, all-provider distribution-compat 
and special tests — for what is illustrative, non-shipped code.
   
   Real example: [#68037](https://github.com/apache/airflow/pull/68037) changed 
a single provider example DAG 
(`providers/common/ai/.../example_dags/example_aip_progress_tracker.py`, 
+667/−119) and ran ~130 jobs; the Build info log shows `full-tests-needed=true` 
was the sole reason, triggered by the line gate (`all-versions=false`, so no 
other rule fired). That's a lot of CI capacity spent on a docs-style change.
   
   ### Why it's safe
   
   `PYTHON_PRODUCTION_FILES` only feeds the line-count gate and the (currently 
consumer-less) `run-python-scans` output. Test **selection** uses different 
groups that still match example DAGs:
   - airflow-core example → still selected by `ALL_AIRFLOW_PYTHON_FILES` 
(`^airflow-core/.*\.py$`)
   - provider example → still selected by `ALL_PROVIDERS_PYTHON_FILES` 
(`^providers/.*\.py$`)
   
   So an example-DAG change **still runs its own core/provider tests** (incl. 
the example-import checks) — it just no longer forces the full matrix.
   
   Note: `standard`/`git` providers have their own `full-tests-needed` rule 
(core tests depend on them), so a large example change *there* still runs full 
tests via that separate rule — this change only removes the **line-count** 
over-trigger.
   
   ### Tests
   
   Added to `test_large_pr_by_line_count`:
   - Large provider `example_dags`-only PR (the real `common.ai` path) → 
`full-tests-needed=false`
   - Large airflow-core `example_dags`-only PR → `full-tests-needed=false`
   - Regression guard: large provider **non-example** file (`arangodb`) → 
`full-tests-needed=true`
   
   Full `test_selective_checks.py` suite passes (168), `mypy for dev` + ruff 
clean.
   
   ---
   
   ##### 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]

Reply via email to