Skip to content

Commit

Permalink
Breeze must create hooks\ and dags\ directories for bind mounts (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
o-nikolas authored Jun 2, 2022
1 parent 572112b commit d0a295c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/path_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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)
Expand Down

0 comments on commit d0a295c

Please sign in to comment.