Skip to content

Commit

Permalink
Add apache-airflow-providers to filter in selective checks if needed (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
potiuk authored Jun 30, 2023
1 parent ef49e59 commit ba05a1e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,8 @@ def docs_filter_list_as_string(self) -> str | None:
[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]):
Expand Down
14 changes: 14 additions & 0 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",),
{
Expand Down

0 comments on commit ba05a1e

Please sign in to comment.