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/06/30 12:41:16 UTC

[airflow] branch main updated: 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 main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ba05a1e870 Add apache-airflow-providers to filter in selective checks if needed (#32284)
ba05a1e870 is described below

commit ba05a1e8706abffe057fa83d891b44125d5913e6
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.
---
 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 0dc12501b1..61e35ce20f 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1024,6 +1024,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",),
             {