This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 32e4f0e7c042386a9ae71d714e7a62cdfb9711cd Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Dec 5 00:48:37 2023 +0100 Do not skip mounting sources on tagged builds by default (#36060) When we were running tagged builds, we skipped sources mounted from Airflow directory in order to make sure in CI builds the sources are coming from the CI image during tests. This also helps in cases tests are adding/removing code in Airflow sources while testing, when several containers are running tests in parallel. However in case of static checks we still want to mount sources in order to make sure that all the sources (including ci scripts) ar coming from local sources rather than from the image, because those scripts in the iamge can have the main version of scripts from "Build images" workflow. Instead of forcing "skip" when tagged image is used. we are now settings "MOUNT_SOURCES": "skip" for the whole CI workflow, leaving "SKIP" only in case of mypy checks (as added in #36038) (cherry picked from commit 15406d412a1dc73e6f92badbd401378bbb7d2f11) --- .github/workflows/ci.yml | 1 + dev/breeze/src/airflow_breeze/params/shell_params.py | 7 ------- dev/breeze/src/airflow_breeze/utils/common_options.py | 1 + images/breeze/output_shell.txt | 2 +- images/breeze/output_start-airflow.txt | 2 +- images/breeze/output_testing_db-tests.txt | 2 +- images/breeze/output_testing_helm-tests.txt | 2 +- images/breeze/output_testing_integration-tests.txt | 2 +- images/breeze/output_testing_non-db-tests.txt | 2 +- images/breeze/output_testing_tests.txt | 2 +- 10 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 333c1e65db..aafe2da30d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ env: USE_SUDO: "true" INCLUDE_SUCCESS_OUTPUTS: "true" AIRFLOW_ENABLE_AIP_44: "true" + MOUNT_SOURCES: "skip" concurrency: group: ci-${{ github.event.pull_request.number || github.ref }} diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py b/dev/breeze/src/airflow_breeze/params/shell_params.py index 4f2c8baf3f..24ecafd231 100644 --- a/dev/breeze/src/airflow_breeze/params/shell_params.py +++ b/dev/breeze/src/airflow_breeze/params/shell_params.py @@ -41,7 +41,6 @@ from airflow_breeze.global_constants import ( MOUNT_ALL, MOUNT_REMOVE, MOUNT_SELECTED, - MOUNT_SKIP, MSSQL_HOST_PORT, MYSQL_HOST_PORT, POSTGRES_HOST_PORT, @@ -324,12 +323,6 @@ class ShellParams: compose_file_list.extend(backend_files) compose_file_list.append(DOCKER_COMPOSE_DIR / "files.yml") - if self.image_tag is not None and self.image_tag != "latest": - get_console().print( - f"[warning]Running tagged image tag = {self.image_tag}. " - f"Forcing mounted sources to be 'skip'[/]" - ) - self.mount_sources = MOUNT_SKIP if self.use_airflow_version is not None: get_console().print( "[info]Forcing --mount-sources to `remove` since we are not installing airflow " diff --git a/dev/breeze/src/airflow_breeze/utils/common_options.py b/dev/breeze/src/airflow_breeze/utils/common_options.py index fa8ce7f445..d5e0445ee0 100644 --- a/dev/breeze/src/airflow_breeze/utils/common_options.py +++ b/dev/breeze/src/airflow_breeze/utils/common_options.py @@ -206,6 +206,7 @@ option_mount_sources = click.option( type=BetterChoice(ALLOWED_MOUNT_OPTIONS), default=ALLOWED_MOUNT_OPTIONS[0], show_default=True, + envvar="MOUNT_SOURCES", help="Choose scope of local sources that should be mounted, skipped, or removed (default = selected).", ) option_force_build = click.option( diff --git a/images/breeze/output_shell.txt b/images/breeze/output_shell.txt index b86d835665..34019c73f1 100644 --- a/images/breeze/output_shell.txt +++ b/images/breeze/output_shell.txt @@ -1 +1 @@ -e0d13ce35e4d31aebd62c460f5586b3d +c809e8595158921068e88e3a47b79a10 diff --git a/images/breeze/output_start-airflow.txt b/images/breeze/output_start-airflow.txt index df53a69f07..a966a46078 100644 --- a/images/breeze/output_start-airflow.txt +++ b/images/breeze/output_start-airflow.txt @@ -1 +1 @@ -066ba011caa4ad721b9708a874c17e4c +52b3e46b6ecfff92cc390961fad8b298 diff --git a/images/breeze/output_testing_db-tests.txt b/images/breeze/output_testing_db-tests.txt index 9c1af589ad..dcf0bc258c 100644 --- a/images/breeze/output_testing_db-tests.txt +++ b/images/breeze/output_testing_db-tests.txt @@ -1 +1 @@ -c45075080add9d991477e7f0779c9759 +ee79610dadc386d36923b74f952032ff diff --git a/images/breeze/output_testing_helm-tests.txt b/images/breeze/output_testing_helm-tests.txt index d1f87db51f..7a4dac9280 100644 --- a/images/breeze/output_testing_helm-tests.txt +++ b/images/breeze/output_testing_helm-tests.txt @@ -1 +1 @@ -98a9ba6631249762b1633b76a29f4461 +b9936ba904ea7d252806451d3378261c diff --git a/images/breeze/output_testing_integration-tests.txt b/images/breeze/output_testing_integration-tests.txt index a586c9659b..8a44382da9 100644 --- a/images/breeze/output_testing_integration-tests.txt +++ b/images/breeze/output_testing_integration-tests.txt @@ -1 +1 @@ -4a7da2c5a8c42fcc43941a75f0af68e7 +ceccb292875d0d4863d078e847571cff diff --git a/images/breeze/output_testing_non-db-tests.txt b/images/breeze/output_testing_non-db-tests.txt index 36452a650f..5748a97060 100644 --- a/images/breeze/output_testing_non-db-tests.txt +++ b/images/breeze/output_testing_non-db-tests.txt @@ -1 +1 @@ -ed916603036dd9979b1593c4d088eb40 +18003d41b2ceb0dc187081b6376318dc diff --git a/images/breeze/output_testing_tests.txt b/images/breeze/output_testing_tests.txt index 49117f9f21..3440222ea0 100644 --- a/images/breeze/output_testing_tests.txt +++ b/images/breeze/output_testing_tests.txt @@ -1 +1 @@ -1620dc0e96578677e8f6ce48cbcd2daa +10fc61a6c5770ab0dc7a53fa21733257
