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 67453a69ed Add `scripts\in_container` folder when all other sources 
are removed. (#36129)
67453a69ed is described below

commit 67453a69edfd3b7a9826658e3308d5f7cb1eb91a
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Dec 8 19:35:05 2023 +0100

    Add `scripts\in_container` folder when all other sources are removed. 
(#36129)
    
    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 65ce4489f7..f4f49e480e 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

Reply via email to