Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
mysql-exclude: ${{ steps.selective-checks.outputs.mysql-exclude }}
mssql-exclude: ${{ steps.selective-checks.outputs.mssql-exclude }}
sqlite-exclude: ${{ steps.selective-checks.outputs.sqlite-exclude }}
skip-provider-tests: ${{ steps.source-run-info.outputs.skip-provider-tests }}
skip-provider-tests: ${{ steps.selective-checks.outputs.skip-provider-tests }}
run-tests: ${{ steps.selective-checks.outputs.run-tests }}
run-amazon-tests: ${{ steps.selective-checks.outputs.run-amazon-tests }}
run-www-tests: ${{ steps.selective-checks.outputs.run-www-tests }}
Expand Down
25 changes: 17 additions & 8 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ def _fail_if_suspended_providers_affected(self):
return "allow suspended provider changes" not in self._pr_labels

def _get_test_types_to_run(self) -> list[str]:
if self.full_tests_needed:
return list(all_selective_test_types())

candidate_test_types: set[str] = {"Always"}
matched_files: set[str] = set()
matched_files.update(
Expand Down Expand Up @@ -656,10 +659,7 @@ def _extract_long_provider_tests(current_test_types: set[str]):
def parallel_test_types_list_as_string(self) -> str | None:
if not self.run_tests:
return None
if self.full_tests_needed:
current_test_types = set(all_selective_test_types())
else:
current_test_types = set(self._get_test_types_to_run())
current_test_types = set(self._get_test_types_to_run())
if self._default_branch != "main":
test_types_to_remove: set[str] = set()
for test_type in current_test_types:
Expand Down Expand Up @@ -735,13 +735,22 @@ def docs_filter_list_as_string(self) -> str | None:

@cached_property
def skip_pre_commits(self) -> str:
return "identity" if self._default_branch == "main" else "identity,check-airflow-2-2-compatibility"
return (
"identity"
if self._default_branch == "main"
else "identity,check-airflow-provider-compatibility,"
"check-extra-packages-references,check-provider-yaml-valid"
)

@cached_property
def skip_provider_tests(self) -> bool:
return self._default_branch != "main" or not any(
test_type.startswith("Providers") for test_type in self._get_test_types_to_run()
)
if self._default_branch != "main":
return True
if self.full_tests_needed:
return False
if any(test_type.startswith("Providers") for test_type in self._get_test_types_to_run()):
return False
return True

@cached_property
def cache_directive(self) -> str:
Expand Down
1 change: 1 addition & 0 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def test_expected_output_pull_request_main(
"docs-filter-list-as-string": "--package-filter apache-airflow "
"--package-filter docker-stack",
"full-tests-needed": "true",
"skip-provider-tests": "true",
"upgrade-to-newer-dependencies": "false",
"parallel-test-types-list-as-string": "Core Other WWW API Always CLI",
},
Expand Down