From 67031a1878ae50b196f1ede55c74477103031d27 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 13 Dec 2023 20:40:51 +0100 Subject: [PATCH] Add support for sharing plugins folder from host in Breeze (#36210) (cherry picked from commit a9a369f718005eeb68d01a4987b2c635cf357daf) --- dev/breeze/src/airflow_breeze/utils/visuals.py | 8 ++++++-- scripts/ci/docker-compose/local-all-sources.yml | 2 ++ scripts/ci/docker-compose/local.yml | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/utils/visuals.py b/dev/breeze/src/airflow_breeze/utils/visuals.py index 2bc062c1cecb5..8f7e209ed7a0f 100644 --- a/dev/breeze/src/airflow_breeze/utils/visuals.py +++ b/dev/breeze/src/airflow_breeze/utils/visuals.py @@ -105,14 +105,18 @@ which is mounted from folder in Airflow sources: * `{AIRFLOW_SOURCES_ROOT}/files/dags` + * Your plugins are read from `/files/plugins` directory + which is mounted from folder in Airflow sources: + * `{AIRFLOW_SOURCES_ROOT}/files/plugins` + * You can add `airflow-breeze-config` directory. Place it in `{AIRFLOW_SOURCES_ROOT}/files/airflow-breeze-config` and: * Add `variables.env` - to make breeze source the variables automatically for you * Add `.tmux.conf` - to add extra initial configuration to `tmux` * Add `init.sh` - this file will be sourced when you enter container, so you can add any custom code there. - - * You can put any other files. You can add them in + * Add `requirements. + * You can put share other files. Just add them in `{AIRFLOW_SOURCES_ROOT}/files` folder and they will be visible in `/files/` folder inside the container diff --git a/scripts/ci/docker-compose/local-all-sources.yml b/scripts/ci/docker-compose/local-all-sources.yml index eeafc04314b99..49aae366a7268 100644 --- a/scripts/ci/docker-compose/local-all-sources.yml +++ b/scripts/ci/docker-compose/local-all-sources.yml @@ -19,6 +19,8 @@ services: airflow: stdin_open: true # docker run -i tty: true # docker run -t + environment: + - AIRFLOW__CORE__PLUGINS_FOLDER=/files/plugins # We need to mount files and directories individually because some files # such apache_airflow.egg-info should not be mounted from host # we only mount those files, so that it makes sense to edit while developing diff --git a/scripts/ci/docker-compose/local.yml b/scripts/ci/docker-compose/local.yml index df1f39d559615..1ee86fc7739ec 100644 --- a/scripts/ci/docker-compose/local.yml +++ b/scripts/ci/docker-compose/local.yml @@ -19,6 +19,8 @@ services: airflow: stdin_open: true # docker run -i tty: true # docker run -t + environment: + - AIRFLOW__CORE__PLUGINS_FOLDER=/files/plugins # We need to mount files and directories individually because some files # such apache_airflow.egg-info should not be mounted from host # we only mount those files, so that it makes sense to edit while developing