Skip to content

Commit

Permalink
When Task SDK sources change, we also run provider tests (apache#45921)
Browse files Browse the repository at this point in the history
When Task SDK sources change, provider code is impacted as they
are using Task SDK - some tests might fail because of changes there.

Example case: apache#45917
  • Loading branch information
potiuk authored Jan 22, 2025
1 parent 995ec1e commit 96d1c81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def _get_core_test_types_to_run(self) -> list[str]:
def _get_providers_test_types_to_run(self, split_to_individual_providers: bool = False) -> list[str]:
if self._default_branch != "main":
return []
if self.full_tests_needed:
if self.full_tests_needed or self.run_task_sdk_tests:
if split_to_individual_providers:
return list(providers_test_type())
else:
Expand Down
12 changes: 6 additions & 6 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,16 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
",mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk"
",ts-compile-format-lint-ui,ts-compile-format-lint-www"
),
"skip-providers-tests": "true",
"skip-providers-tests": "false",
"upgrade-to-newer-dependencies": "false",
"core-test-types-list-as-string": (
"API Always CLI Core Operators Other Serialization WWW"
),
"providers-test-types-list-as-string": "",
"providers-test-types-list-as-string": "Providers[-amazon,google,standard] Providers[amazon] Providers[google] Providers[standard]",
"needs-mypy": "true",
"mypy-checks": "['mypy-task-sdk']",
"mypy-checks": "['mypy-providers', 'mypy-task-sdk']",
},
id="Task SDK source file changed - Task SDK & Core tests should run",
id="Task SDK source file changed - Task SDK, Core and provider tests should run",
)
),
(
Expand Down Expand Up @@ -2474,11 +2474,11 @@ def test_provider_compatibility_checks(labels: tuple[str, ...], expected_outputs
("task_sdk/src/airflow/sdk/a_file.py",),
{
"needs-mypy": "true",
"mypy-checks": "['mypy-task-sdk']",
"mypy-checks": "['mypy-providers', 'mypy-task-sdk']",
},
"main",
(),
id="Airflow mypy checks on Task SDK files",
id="Airflow mypy checks on Task SDK files (implies providers)",
),
pytest.param(
("docs/a_file.py",),
Expand Down

0 comments on commit 96d1c81

Please sign in to comment.