From be90bb8f664c4bc1201844557875ffb9f180f2a0 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Fri, 8 Dec 2023 19:08:45 +0100 Subject: [PATCH] Add `scripts\in_container` folder when all other sources are removed. This allows to tests the scripts that require --mount-sources remove but you run some scripts inside the container (for example this was the case when modifying installation of airflow and providers to be run in Python in #36094. In order to debug those, The image needed to be rebuild to run the "in-container" scripts.. More importantly - users will also have to rebuild the image after they rebase to latest main - in order to use the new scripts when runinng `--use-airflow-version`. This change will make the modification coming from main visible in their images even without rebuilding the image. --- scripts/ci/docker-compose/remove-sources.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/ci/docker-compose/remove-sources.yml b/scripts/ci/docker-compose/remove-sources.yml index 65ce4489f771c..f4f49e480ed8f 100644 --- a/scripts/ci/docker-compose/remove-sources.yml +++ b/scripts/ci/docker-compose/remove-sources.yml @@ -17,6 +17,13 @@ --- services: airflow: - # Removes airflow sources from container volumes: - - ./empty:/opt/airflow/airflow:cached + # Removes airflow sources from container + - type: bind + source: ./empty + target: /opt/airflow/airflow:cached + # However we keep in_container scripts in order to be able to debug easily the scripts that + # are run with --mount-sources removed flag - such as installing airflow and providers + - type: bind + source: ../../../scripts/in_container + target: /opt/airflow/scripts/in_container:cached