This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new 5934272377 Prevent provider lowest-dependency tests to run in non-main
branch (#41478) (#41481)
5934272377 is described below
commit 59342723770ef3a4d681221d62e19ae88c759542
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Aug 14 17:01:30 2024 +0200
Prevent provider lowest-dependency tests to run in non-main branch (#41478)
(#41481)
When running tests in v2-10-test branch, lowest depenency tests
are run for providers - because when calculating separate tests,
the "skip_provider_tests" has not been used to filter them out.
This PR fixes it.
(cherry picked from commit 75da5074969ec874040ea094d5afe00b7f02be76)
---
dev/breeze/src/airflow_breeze/utils/selective_checks.py | 4 ++++
dev/breeze/tests/test_selective_checks.py | 5 ++++-
2 files changed, 8 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 62f5a20abc..224e76c251 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -861,6 +861,10 @@ class SelectiveChecks:
if "Providers" in current_test_types:
current_test_types.remove("Providers")
current_test_types.update({f"Providers[{provider}]" for provider
in get_available_packages()})
+ if self.skip_provider_tests:
+ current_test_types = {
+ test_type for test_type in current_test_types if not
test_type.startswith("Providers")
+ }
return " ".join(sorted(current_test_types))
@cached_property
diff --git a/dev/breeze/tests/test_selective_checks.py
b/dev/breeze/tests/test_selective_checks.py
index 7c0ca94094..6bee6bbc7e 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1075,7 +1075,7 @@ def test_full_test_needed_when_scripts_changes(files:
tuple[str, ...], expected_
),
(
pytest.param(
- ("INTHEWILD.md",),
+ ("INTHEWILD.md", "tests/providers/asana.py"),
("full tests needed",),
"v2-7-stable",
{
@@ -1097,6 +1097,9 @@ def test_full_test_needed_when_scripts_changes(files:
tuple[str, ...], expected_
"parallel-test-types-list-as-string": "API Always
BranchExternalPython "
"BranchPythonVenv CLI Core ExternalPython Operators Other
PlainAsserts "
"PythonVenv Serialization WWW",
+ "separate-test-types-list-as-string": "API Always
BranchExternalPython "
+ "BranchPythonVenv CLI Core ExternalPython Operators Other
PlainAsserts "
+ "PythonVenv Serialization WWW",
"needs-mypy": "true",
"mypy-folders": "['airflow', 'docs', 'dev']",
},