Skip to content

Commit

Permalink
Add scripts\in_container folder when all other sources are removed. (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
potiuk authored Dec 8, 2023
1 parent 2c251a0 commit 67453a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/ci/docker-compose/remove-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 67453a6

Please sign in to comment.