You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/07/02 07:32:42 UTC
[airflow] 13/19: Add apache-airflow-providers to filter in selective checks if needed (#32284)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-6-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b08f9c9d9368f63810c402a90d4aa00dfdd9cb2f
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Jun 30 14:41:09 2023 +0200
Add apache-airflow-providers to filter in selective checks if needed (#32284)
When provider docs in "docs/apache-airflow-providers" changed, and
selective docs build was used, the "apache-airflow-providers" package
was not added to the filter - thus errors in those docs were not
checked. This caused #32131 to fail the main build (fixed in
the #32282). Added logic to handle this case.
(cherry picked from commit ba05a1e8706abffe057fa83d891b44125d5913e6)
---
dev/breeze/src/airflow_breeze/utils/selective_checks.py | 2 ++
dev/breeze/tests/test_selective_checks.py | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index c6e414472d..7c7d622dab 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -727,6 +727,8 @@ class SelectiveChecks:
[file.startswith("airflow/") or file.startswith("docs/apache-airflow/") for file in self._files]
):
packages.append("apache-airflow")
+ if any([file.startswith("docs/apache-airflow-providers/") for file in self._files]):
+ packages.append("apache-airflow-providers")
if any([file.startswith("chart/") or file.startswith("docs/helm-chart") for file in self._files]):
packages.append("helm-chart")
if any([file.startswith("docs/docker-stack/") for file in self._files]):
diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py
index ba9f015437..1ed513edd4 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1023,6 +1023,20 @@ def test_upgrade_to_newer_dependencies(files: tuple[str, ...], expected_outputs:
},
id="Airbyte provider and airflow core docs changed",
),
+ pytest.param(
+ (
+ "docs/apache-airflow-providers-airbyte/docs.rst",
+ "docs/apache-airflow/docs.rst",
+ "docs/apache-airflow-providers/docs.rst",
+ ),
+ {
+ "docs-filter-list-as-string": "--package-filter apache-airflow "
+ "--package-filter apache-airflow-providers "
+ "--package-filter apache-airflow-providers-airbyte "
+ "--package-filter apache-airflow-providers-http",
+ },
+ id="Airbyte provider and airflow core and common provider docs changed",
+ ),
pytest.param(
("docs/apache-airflow/docs.rst",),
{