Skip to content

Commit

Permalink
Prevent provider lowest-dependency tests to run in non-main branch (#…
Browse files Browse the repository at this point in the history
…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 75da507)
  • Loading branch information
potiuk authored Aug 14, 2024
1 parent b211936 commit 5934272
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@ def separate_test_types_list_as_string(self) -> str | None:
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
Expand Down
5 changes: 4 additions & 1 deletion dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
{
Expand All @@ -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']",
},
Expand Down

0 comments on commit 5934272

Please sign in to comment.