Skip to content

Don't force full CI tests for non-test workflow and prek-only changes - #68802

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:exclude-non-test-files-from-full-tests-trigger
Jun 25, 2026
Merged

Don't force full CI tests for non-test workflow and prek-only changes#68802
potiuk merged 1 commit into
apache:mainfrom
potiuk:exclude-non-test-files-from-full-tests-trigger

Conversation

@potiuk

Copy link
Copy Markdown
Member

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, notfull_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?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

ENVIRONMENT_FILES forced the full test matrix on any .github/workflows
change and on any scripts/ci/prek change. Those over-match: non-test
workflows (security scans, doc publishing, notifications, backporting,
stale/calendar bots) cannot affect test outcomes, and prek hooks drive
static checks rather than the test matrix.
Exclude non-test workflows from ENVIRONMENT_FILES (test/CI-config
workflows like ci-amd, run-unit-tests, k8s-tests still force full), and
move scripts/ci/prek to a new PREK_FILES group that triggers only the CI
image build (so mypy-scripts and image-based static checks still run for
a prek-only change) without forcing the full matrix.
Static checks still run on every PR regardless; this only stops the
unnecessary full test matrix for changes that cannot affect tests.
@potiuk
potiuk merged commit a4c269a into apache:mainJun 25, 2026
145 checks passed
@potiuk
potiuk deleted the exclude-non-test-files-from-full-tests-trigger branch June 25, 2026 21:02
@potiukpotiuk added the backport-to-v3-3-test Backport to v3-3-test label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

StatusBranchResult
v3-3-testPR Link

potiuk added a commit that referenced this pull request Jun 26, 2026
…only changes (#68802) (#68999)
ENVIRONMENT_FILES forced the full test matrix on any .github/workflows
change and on any scripts/ci/prek change. Those over-match: non-test
workflows (security scans, doc publishing, notifications, backporting,
stale/calendar bots) cannot affect test outcomes, and prek hooks drive
static checks rather than the test matrix.
Exclude non-test workflows from ENVIRONMENT_FILES (test/CI-config
workflows like ci-amd, run-unit-tests, k8s-tests still force full), and
move scripts/ci/prek to a new PREK_FILES group that triggers only the CI
image build (so mypy-scripts and image-based static checks still run for
a prek-only change) without forcing the full matrix.
Static checks still run on every PR regardless; this only stops the
unnecessary full test matrix for changes that cannot affect tests.
(cherry picked from commit a4c269a)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
karenbraganz pushed a commit to karenbraganz/airflow that referenced this pull request Jun 30, 2026
…apache#68802)
ENVIRONMENT_FILES forced the full test matrix on any .github/workflows
change and on any scripts/ci/prek change. Those over-match: non-test
workflows (security scans, doc publishing, notifications, backporting,
stale/calendar bots) cannot affect test outcomes, and prek hooks drive
static checks rather than the test matrix.
Exclude non-test workflows from ENVIRONMENT_FILES (test/CI-config
workflows like ci-amd, run-unit-tests, k8s-tests still force full), and
move scripts/ci/prek to a new PREK_FILES group that triggers only the CI
image build (so mypy-scripts and image-based static checks still run for
a prek-only change) without forcing the full matrix.
Static checks still run on every PR regardless; this only stops the
unnecessary full test matrix for changes that cannot affect tests.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@potiuk@bugraoz93