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 2022/10/10 08:54:32 UTC

[airflow] branch main updated: Add provider.yaml files to the CI Breeze image check (#26955)

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 d49932375e Add provider.yaml files to the CI Breeze image check (#26955)
d49932375e is described below

commit d49932375e2087c02939eea15bb65b2487cf3d96
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Oct 10 03:54:23 2022 -0500

    Add provider.yaml files to the CI Breeze image check (#26955)
    
    When provider.yaml files change, we are likely to need to rebuild
    the CI image - because of the potential dependency changes. This
    change triggers warning about it.
    
    When image is rebuild, the provider_dependencies.json file
    will be regenerated and new dependencies will be used to build the
    image.
---
 .../src/airflow_breeze/commands/ci_image_commands.py       | 14 ++++++++++++++
 dev/breeze/src/airflow_breeze/global_constants.py          |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
index 19fd65404d..34119ee4de 100644
--- a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
@@ -17,6 +17,7 @@
 from __future__ import annotations
 
 import os
+import subprocess
 import sys
 from pathlib import Path
 
@@ -502,6 +503,19 @@ def run_build_ci_image(
                 output=output,
             )
         else:
+            subprocess.run(
+                [
+                    sys.executable,
+                    os.fspath(
+                        AIRFLOW_SOURCES_ROOT
+                        / "scripts"
+                        / "ci"
+                        / "pre_commit"
+                        / "pre_commit_build_providers_dependencies.py"
+                    ),
+                ],
+                check=False,
+            )
             get_console(output=output).print(
                 f"\n[info]Building CI Image for Python {ci_image_params.python}\n"
             )
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py b/dev/breeze/src/airflow_breeze/global_constants.py
index 077cb60424..bc42b1d3cf 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -17,6 +17,7 @@
 from __future__ import annotations
 
 import json
+from pathlib import Path
 
 """
 Global constants that are used by all other Breeze components.
@@ -204,6 +205,7 @@ AVAILABLE_INTEGRATIONS = [
     'trino',
 ]
 ENABLED_INTEGRATIONS = ""
+ALL_PROVIDER_YAML_FILES = Path(AIRFLOW_SOURCES_ROOT).glob("airflow/providers/**/provider.yaml")
 # Initialize files for rebuild check
 FILES_FOR_REBUILD_CHECK = [
     'setup.py',
@@ -216,6 +218,7 @@ FILES_FOR_REBUILD_CHECK = [
     'scripts/docker/install_airflow_dependencies_from_branch_tip.sh',
     'scripts/docker/install_from_docker_context_files.sh',
     'scripts/docker/install_mysql.sh',
+    *ALL_PROVIDER_YAML_FILES,
 ]
 
 ENABLED_SYSTEMS = ""