This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new fc4d75d3b3f [v3-2-test] Skip UI E2E tests on derived full tests
needed, canary, and scheduled builds (#64673) (#64675)
fc4d75d3b3f is described below
commit fc4d75d3b3f915bfa93ce561fc48099cd9415097
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Apr 3 16:47:54 2026 +0200
[v3-2-test] Skip UI E2E tests on derived full tests needed, canary, and
scheduled builds (#64673) (#64675)
UI E2E tests are expensive and should only run when UI files actually
changed or the "full tests needed" label is explicitly set. Previously
they ran on every push to main, canary build, scheduled run, and any
PR that triggered derived full_tests_needed (env file changes, large
PRs, etc.).
(cherry picked from commit b15a5c9595d5fa93a6a4a8134d1a3e579262aae0)
Co-authored-by: Jarek Potiuk <[email protected]>
---
.../src/airflow_breeze/utils/selective_checks.py | 21 ++++++++++++++++++++-
dev/breeze/tests/test_selective_checks.py | 2 ++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 1985da6ece1..9c40ee982ee 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -944,7 +944,26 @@ class SelectiveChecks:
@cached_property
def run_ui_e2e_tests(self) -> bool:
- return self._should_be_run(FileGroupForCi.UI_FILES)
+ # E2E tests should not be triggered by derived full_tests_needed (push
events,
+ # env file changes, large PRs, etc.) - only by explicit label or
actual file changes.
+ if FULL_TESTS_NEEDED_LABEL in self._pr_labels:
+ console_print(
+ f"[warning]{FileGroupForCi.UI_FILES} e2e enabled because "
+ f"'{FULL_TESTS_NEEDED_LABEL}' label is set[/]"
+ )
+ return True
+ matched_files = self._matching_files(FileGroupForCi.UI_FILES,
CI_FILE_GROUP_MATCHES)
+ if matched_files:
+ console_print(
+ f"[warning]{FileGroupForCi.UI_FILES} e2e enabled because "
+ f"it matched {len(matched_files)} changed files[/]"
+ )
+ return True
+ console_print(
+ f"[warning]{FileGroupForCi.UI_FILES} e2e disabled because "
+ f"it did not match any changed files and no explicit label[/]"
+ )
+ return False
@cached_property
def run_remote_logging_s3_e2e_tests(self) -> bool:
diff --git a/dev/breeze/tests/test_selective_checks.py
b/dev/breeze/tests/test_selective_checks.py
index bd26d1f6ba5..9d674bd761d 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1581,6 +1581,7 @@ def test_full_test_needed_when_scripts_changes(files:
tuple[str, ...], expected_
"providers-test-types-list-as-strings-in-json":
ALL_PROVIDERS_SELECTIVE_TEST_TYPES_AS_JSON,
"run-mypy": "true",
"mypy-checks": ALL_MYPY_CHECKS,
+ "run-ui-e2e-tests": "true",
},
id="Everything should run including all providers when full
tests are needed "
"but with single python and kubernetes if no version label is
set",
@@ -1922,6 +1923,7 @@ def test_expected_output_pull_request_v2_7(
"core-test-types-list-as-strings-in-json":
ALL_CI_SELECTIVE_TEST_TYPES_AS_JSON,
"run-mypy": "true",
"mypy-checks": ALL_MYPY_CHECKS,
+ "run-ui-e2e-tests": "false",
},
id="All tests run on push if core file changed",
),