This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c37d5cf71d0 Evaluate canary-run condition in run-tests SelectiveChecks
(#45387)
c37d5cf71d0 is described below
commit c37d5cf71d0c426371cdf059b5b2bc11a103c5ba
Author: GPK <[email protected]>
AuthorDate: Sat Jan 4 15:11:58 2025 +0000
Evaluate canary-run condition in run-tests SelectiveChecks (#45387)
* evaluate canary run condition in workflow
* Update run tests check to verify canary run
---
.../src/airflow_breeze/utils/selective_checks.py | 2 ++
dev/breeze/tests/test_selective_checks.py | 36 ++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 4229ed68584..05a46475be4 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -746,6 +746,8 @@ class SelectiveChecks:
@cached_property
def run_tests(self) -> bool:
+ if self._is_canary_run():
+ return True
if self.only_new_ui_files:
return False
# we should run all test
diff --git a/dev/breeze/tests/test_selective_checks.py
b/dev/breeze/tests/test_selective_checks.py
index 0311a3c9329..f87875d02b8 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1829,6 +1829,42 @@ def
test_no_commit_provided_trigger_full_build_for_any_event_type(github_event):
)
[email protected](
+ "github_event",
+ [
+ GithubEvents.PUSH,
+ GithubEvents.SCHEDULE,
+ ],
+)
+def test_files_provided_trigger_full_build_for_any_event_type(github_event):
+ stderr = SelectiveChecks(
+ files=("airflow/ui/src/pages/Run/Details.tsx",
"airflow/ui/src/router.tsx"),
+ commit_ref="",
+ github_event=github_event,
+ pr_labels=(),
+ default_branch="main",
+ )
+ assert_outputs_are_printed(
+ {
+ "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
+ "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
+ "ci-image-build": "true",
+ "prod-image-build": "true",
+ "needs-helm-tests": "true",
+ "run-tests": "true",
+ "docs-build": "true",
+ "skip-pre-commits":
"identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
+ "upgrade-to-newer-dependencies": (
+ "true" if github_event in [GithubEvents.PUSH,
GithubEvents.SCHEDULE] else "false"
+ ),
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "needs-mypy": "true",
+ "mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs',
'mypy-dev', 'mypy-task-sdk']",
+ },
+ str(stderr),
+ )
+
+
@pytest.mark.parametrize(
"files, expected_outputs, pr_labels, commit_ref",
[