Skip to content

[v3-2-test] Don't force the full test matrix for large example_dags-only changes (#68042)#68052

Closed
github-actions[bot] wants to merge 1 commit into
v3-2-testfrom
backport-4adf4e6-v3-2-test
Closed

[v3-2-test] Don't force the full test matrix for large example_dags-only changes (#68042)#68052
github-actions[bot] wants to merge 1 commit into
v3-2-testfrom
backport-4adf4e6-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 5, 2026

A large diff to example DAGs (e.g. a single provider example like
#68037, +667/-119) tripped the _is_large_enough_pr
line-count gate, which set full-tests-needed=true and fanned out the
entire matrix — core DB tests, Kubernetes, Helm, PROD images, all-provider
compat and special tests — for what is illustrative, non-shipped code.

Exclude example_dags/ from PYTHON_PRODUCTION_FILES (the "production
code" definition that feeds the line-count gate) for both the airflow-core
top-level airflow/example_dags/ and the nested
providers/<name>/.../example_dags/ layout. Example DAGs are still selected
for their own tests via the broader ALL_AIRFLOW_PYTHON_FILES /
ALL_PROVIDERS_PYTHON_FILES groups, so they keep running the relevant
core/provider tests — they just no longer force the full matrix.
(cherry picked from commit 4adf4e6)

Co-authored-by: Shahar Epstein 60007259+shahar1@users.noreply.github.com

…nly changes (#68042)

A large diff to example DAGs (e.g. a single provider example like
#68037, +667/-119) tripped the `_is_large_enough_pr`
line-count gate, which set `full-tests-needed=true` and fanned out the
entire matrix — core DB tests, Kubernetes, Helm, PROD images, all-provider
compat and special tests — for what is illustrative, non-shipped code.

Exclude `example_dags/` from `PYTHON_PRODUCTION_FILES` (the "production
code" definition that feeds the line-count gate) for both the airflow-core
top-level `airflow/example_dags/` and the nested
`providers/<name>/.../example_dags/` layout. Example DAGs are still selected
for their own tests via the broader `ALL_AIRFLOW_PYTHON_FILES` /
`ALL_PROVIDERS_PYTHON_FILES` groups, so they keep running the relevant
core/provider tests — they just no longer force the full matrix.
(cherry picked from commit 4adf4e6)

Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
@potiuk potiuk marked this pull request as ready for review June 5, 2026 03:20
shahar1 added a commit to shahar1/airflow that referenced this pull request Jun 5, 2026
On push to release branches like v3-2-test, the full test matrix was
unconditionally running because _should_run_all_tests_and_versions()
didn't distinguish between push events to main vs release branches.

Release branch pushes should only run selective tests (based on changed
files), while canaries (SCHEDULE) and manual triggers (WORKFLOW_DISPATCH)
still get the full matrix.

Added branch-aware gating: push to release branches now returns False
from _should_run_all_tests_and_versions() unless other conditions
(pyproject.toml changes, etc.) require full tests.

Includes test case validating the behavior across different event types
and branches.

Fixes: apache#68052

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@shahar1 shahar1 closed this Jun 5, 2026
@shahar1 shahar1 deleted the backport-4adf4e6-v3-2-test branch June 5, 2026 05:28
shahar1 added a commit that referenced this pull request Jun 5, 2026
… (v3-X-test) (#68056)

On push to release branches like v3-2-test, the full test matrix was
unconditionally running because _should_run_all_tests_and_versions()
didn't distinguish between push events to main vs release branches.

Release branch pushes should only run selective tests (based on changed
files), while canaries (SCHEDULE) and manual triggers (WORKFLOW_DISPATCH)
still get the full matrix.

Added branch-aware gating: push to release branches now returns False
from _should_run_all_tests_and_versions() unless other conditions
(pyproject.toml changes, etc.) require full tests.

Includes test case validating the behavior across different event types
and branches.

Fixes: #68052

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
bugraoz93 pushed a commit that referenced this pull request Jun 5, 2026
…#68057)

On push to release branches like v3-2-test, the full test matrix was
unconditionally running because _should_run_all_tests_and_versions()
didn't distinguish between push events to main vs release branches.

Release branch pushes should only run selective tests (based on changed
files), while canaries (SCHEDULE) and manual triggers (WORKFLOW_DISPATCH)
still get the full matrix.

Added branch-aware gating: push to release branches now returns False
from _should_run_all_tests_and_versions() unless other conditions
(pyproject.toml changes, etc.) require full tests.

Includes test case validating the behavior across different event types
and branches.

Fixes: #68052

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant