This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4b3af9d32cc79f51bab83283f2c9351709a968e2 Author: Jarek Potiuk <[email protected]> AuthorDate: Sat Jun 24 11:04:16 2023 +0200 Exit asset compilation fork in start-airflow after it completed (#32114) The `start-airflow` command uses fork to start parallell asset compilation in the background so that it can happen while docker compose initializes. Unfortunately this fork child did not have sys.exit() so it returned from the function and continued to run second docker-compose in the background. In case asset compilation was not needed this could happen in parallel and both processes attempted to start two docker-compose commands in parallel. This was not visible in "dev" mode - because asset compilation never completed there also - when asset compilation was needed, it took some time before it completed, and the effect of it were not visible, because the forked process did not get terminal output (it has been taken over by tmux by the time it started to use it) and could not grab forwarded ports, so it was running but largely invisible. However when asset compilation was not needed, the two processes started to do the same things at the same time - so a lot of the output has been duplicated and for example the line output has been broken because the same messages were overwriting over each other and canceling the effect of EOL printed to terminal. With this change, the forked process exits as soon as the asset compilation is completed and does not repeat the same steps that the parent process is doiing. (cherry picked from commit 5dddf579907d0eaec28a17cf62e32da9a8d627ca) --- dev/breeze/src/airflow_breeze/utils/run_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/breeze/src/airflow_breeze/utils/run_utils.py b/dev/breeze/src/airflow_breeze/utils/run_utils.py index f29ca43006..cee1a555bc 100644 --- a/dev/breeze/src/airflow_breeze/utils/run_utils.py +++ b/dev/breeze/src/airflow_breeze/utils/run_utils.py @@ -481,5 +481,6 @@ def run_compile_www_assets( # and create a new process group where we are the leader os.setpgid(0, 0) _run_compile_internally(command_to_execute, dev) + sys.exit(0) else: return _run_compile_internally(command_to_execute, dev)
