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/06/02 20:26:21 UTC

[airflow] branch main updated: Breeze must create `hooks\` and `dags\` directories for bind mounts (#24122)

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 d0a295c5f4 Breeze must create `hooks\` and `dags\` directories for bind mounts (#24122)
d0a295c5f4 is described below

commit d0a295c5f49f0a2bc2ef7c47dcbaa1bee40c61bd
Author: Niko <on...@amazon.com>
AuthorDate: Thu Jun 2 13:25:59 2022 -0700

    Breeze must create `hooks\` and `dags\` directories for bind mounts (#24122)
    
      Now that breeze uses --mount instead of --volume (the former of which
      does not create missing mount dirs like the latter does see docs here:
      https://docs.docker.com/storage/bind-mounts/#differences-between--v-and---mount-behavior)
      we need to create these directories explicitly.
---
 dev/breeze/src/airflow_breeze/utils/path_utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev/breeze/src/airflow_breeze/utils/path_utils.py b/dev/breeze/src/airflow_breeze/utils/path_utils.py
index 759c3e09a7..bd84553731 100644
--- a/dev/breeze/src/airflow_breeze/utils/path_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/path_utils.py
@@ -237,7 +237,9 @@ def find_airflow_sources_root_to_operate_on() -> Path:
 
 AIRFLOW_SOURCES_ROOT = find_airflow_sources_root_to_operate_on().resolve()
 BUILD_CACHE_DIR = AIRFLOW_SOURCES_ROOT / '.build'
+DAGS_DIR = AIRFLOW_SOURCES_ROOT / 'dags'
 FILES_DIR = AIRFLOW_SOURCES_ROOT / 'files'
+HOOKS_DIR = AIRFLOW_SOURCES_ROOT / 'hooks'
 MSSQL_DATA_VOLUME = AIRFLOW_SOURCES_ROOT / 'tmp_mssql_volume'
 KUBE_DIR = AIRFLOW_SOURCES_ROOT / ".kube"
 LOGS_DIR = AIRFLOW_SOURCES_ROOT / 'logs'
@@ -255,7 +257,9 @@ def create_directories_and_files() -> None:
     Checks if setup has been updates since last time and proposes to upgrade if so.
     """
     BUILD_CACHE_DIR.mkdir(parents=True, exist_ok=True)
+    DAGS_DIR.mkdir(parents=True, exist_ok=True)
     FILES_DIR.mkdir(parents=True, exist_ok=True)
+    HOOKS_DIR.mkdir(parents=True, exist_ok=True)
     MSSQL_DATA_VOLUME.mkdir(parents=True, exist_ok=True)
     KUBE_DIR.mkdir(parents=True, exist_ok=True)
     LOGS_DIR.mkdir(parents=True, exist_ok=True)