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 9b47c567ce2 Use mprocs by default with start-airflow (#60844)
9b47c567ce2 is described below
commit 9b47c567ce2738f90ac3441d5f1ca7aadec81584
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Jan 23 00:40:52 2026 +0100
Use mprocs by default with start-airflow (#60844)
This change will:
* use mprocs by default for start-airflow
* allows to switch to tmux by --terminal-multiplexer tmux
* stores last used selection permanently for subsequent runs
* allows to switch multiplexer by `breeze setup config`
* only print mprocs generated config when --verbose flag is used
---
Dockerfile.ci | 2 +-
contributing-docs/03_contributors_quick_start.rst | 31 +++++++++++++++---
contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md | 37 ++++++++++++++++------
dev/breeze/doc/images/output-commands.svg | 2 +-
dev/breeze/doc/images/output_setup_config.svg | 28 +++++++++-------
dev/breeze/doc/images/output_setup_config.txt | 2 +-
dev/breeze/doc/images/output_start-airflow.svg | 6 ++--
dev/breeze/doc/images/output_start-airflow.txt | 2 +-
.../src/airflow_breeze/commands/common_options.py | 14 ++++----
.../airflow_breeze/commands/developer_commands.py | 10 +++---
.../commands/developer_commands_config.py | 2 +-
.../src/airflow_breeze/commands/setup_commands.py | 4 +++
.../commands/setup_commands_config.py | 1 +
dev/breeze/src/airflow_breeze/global_constants.py | 1 +
.../src/airflow_breeze/params/shell_params.py | 5 +--
scripts/docker/entrypoint_ci.sh | 2 +-
scripts/in_container/bin/generate_mprocs_config.py | 30 ++++++++++--------
17 files changed, 117 insertions(+), 62 deletions(-)
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 473031d1803..93ad19afb13 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -1244,7 +1244,7 @@ function environment_initialization() {
fi
export AIRFLOW__CORE__LOAD_EXAMPLES=${LOAD_EXAMPLES}
wait_for_asset_compilation
- if [[ ${USE_MPROCS:="false"} == "true" || ${USE_MPROCS} == "True" ]];
then
+ if [[ ${TERMINAL_MULTIPLEXER:="mprocs"} == "mprocs" ]]; then
# shellcheck source=scripts/in_container/bin/run_mprocs
exec run_mprocs
else
diff --git a/contributing-docs/03_contributors_quick_start.rst
b/contributing-docs/03_contributors_quick_start.rst
index 3069dce29be..2288a4a8a44 100644
--- a/contributing-docs/03_contributors_quick_start.rst
+++ b/contributing-docs/03_contributors_quick_start.rst
@@ -644,15 +644,37 @@ If ``breeze`` was started with ``breeze --python 3.10
--backend postgres`` (or s
.. note::
``stop_airflow`` is available only when ``breeze`` is started with
``breeze start-airflow``.
-Using mprocs Instead of tmux
+Using tmux Instead of mprocs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-By default, ``breeze start-airflow`` uses tmux to manage Airflow components.
You can use mprocs as an
-alternative with the ``--use-mprocs`` flag:
+By default, ``breeze start-airflow`` uses mprocs to manage Airflow components.
You can use ``tmux`` as an
+alternative with the ``--terminal-multiplexer tmux`` argument. The last choice
of yours will be remembered
+for the next run, you can switch back to ``mprocs`` anytime by using
``--terminal-multiplexer mprocs``.
.. code-block:: bash
- breeze start-airflow --use-mprocs
+ breeze start-airflow --terminal-multiplexer tmux
+
+and
+
+.. code-block:: bash
+
+ breeze start-airflow --terminal-multiplexer mprocs
+
+You can also switch terminal multiplexer via breeze config:
+
+.. code-block:: bash
+
+ breeze setup config --terminal_multiplexer tmux
+ breeze setup config --terminal_multiplexer mprocs
+
+** Benefits of using tmux:**
+
+* Familiar terminal multiplexer for many developers
+* More control over panes and windows
+* Customizable key bindings and layouts
+* Wide range of plugins and extensions
+* ability to see more than one log at a time
**Benefits of using mprocs:**
@@ -670,7 +692,6 @@ For more information on mprocs, look at `mprocs
documentation <mprocs/MPROCS_QUI
breeze --help
-
Following are some of important topics of `Breeze documentation
<../dev/breeze/doc/README.rst>`__:
* `Breeze Installation <../dev/breeze/doc/01_installation.rst>`__
diff --git a/contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md
b/contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md
index df2d2d214b5..63e68b9e195 100644
--- a/contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md
+++ b/contributing-docs/mprocs/MPROCS_QUICK_REFERENCE.md
@@ -21,24 +21,41 @@
## Basic Command
+Start airflow uses mprocs by default:
+
+```bash
+breeze start-airflow
+```
+
+You can switch to using `tmux` instead by specifying the option:
+
```bash
-breeze start-airflow --use-mprocs
+breeze start-airflow --terminal-multiplexer tmux
```
-Breeze will start Airflow components using mprocs to manage multiple processes
in a single terminal window.
+Once you select the terminal multiplexer, Breeze will remember your choice for
future runs.
+
+You can also switch terminal multiplexers by running `breeze setup config`:
+
+```bash
+breeze setup config --terminal-multiplexer mprocs
+breeze setup config --terminal-multiplexer tmux
+```
+
+
+When Breeze will start Airflow components using mprocs to manage multiple
processes in a single terminal window.
It will generate dynamically the required configuration based on the selected
executor and options and use it,
the generated configuration file is stored in a `files` folder inside the
container, so that you can also
use it outside of Breeze if needed.
## Common Usage Patterns
-| Command | Description
|
-|---------------------------------------------------------------|---------------------------------|
-| `breeze start-airflow --use-mprocs` | Start
Airflow with mprocs |
-| `breeze start-airflow --use-mprocs --debug scheduler` | Debug
scheduler with mprocs |
-| `breeze start-airflow --use-mprocs --executor CeleryExecutor` | Use mprocs
with Celery |
-| `breeze start-airflow --use-mprocs --dev-mode` | Use mprocs
in dev mode |
-| `breeze start-airflow --use-tmux` | Explicitly
use tmux (default) |
+| Command |
Description |
+|-----------------------------------------------------------------|-----------------------------------------------------|
+| `breeze start-airflow --terminal-multiplexer mprocs` | Start
Airflow with mprocs (and remember the choice) |
+| `breeze start-airflow --terminal-multiplexer tmux` | Start
Airflow with tmux (and remember the choice) |
+| `breeze start-airflow --debug scheduler` | Debug
scheduler with last selected multiplexer |
+| `breeze start-airflow --dev-mode --terminal-multiplexer mprocs` | Use mprocs
in dev mode (and remember the choice) |
## mprocs Keyboard Shortcuts
@@ -67,7 +84,7 @@ use it outside of Breeze if needed.
| Variable | Purpose |
|----------------------------|---------------------------------|
-| `USE_MPROCS` | Enable mprocs mode |
+| `TERMNAL_MULTIPLEXER` | Use mprocs when set to "mprocs" |
| `INTEGRATION_CELERY` | Enable Celery components |
| `CELERY_FLOWER` | Enable Flower UI |
| `STANDALONE_DAG_PROCESSOR` | Enable standalone DAG processor |
diff --git a/dev/breeze/doc/images/output-commands.svg
b/dev/breeze/doc/images/output-commands.svg
index 69d451a3037..e8fdd395be7 100644
--- a/dev/breeze/doc/images/output-commands.svg
+++ b/dev/breeze/doc/images/output-commands.svg
@@ -405,7 +405,7 @@
</text><text class="breeze-help-r5" x="0" y="1484" textLength="12.2"
clip-path="url(#breeze-help-line-60)">│</text><text class="breeze-help-r4"
x="24.4" y="1484" textLength="73.2"
clip-path="url(#breeze-help-line-60)">--help</text><text class="breeze-help-r6"
x="158.6" y="1484" textLength="24.4"
clip-path="url(#breeze-help-line-60)">-h</text><text class="breeze-help-r1"
x="207.4" y="1484" textLength="329.4"
clip-path="url(#breeze-help-line-60)">Show this message and e
[...]
</text><text class="breeze-help-r5" x="0" y="1508.4" textLength="1464"
clip-path="url(#breeze-help-line-61)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-help-r1" x="1464" y="1508.4" textLength="12.2"
clip-path="url(#breeze-help-line-61)">
</text><text class="breeze-help-r5" x="0" y="1532.8" textLength="24.4"
clip-path="url(#breeze-help-line-62)">╭─</text><text class="breeze-help-r5"
x="24.4" y="1532.8" textLength="244"
clip-path="url(#breeze-help-line-62)"> Developer commands </text><text
class="breeze-help-r5" x="268.4" y="1532.8" textLength="1171.2"
clip-path="url(#breeze-help-line-62)">────────────────────────────────────────────────────────────────────────────────────────────────</text><text
class="bree [...]
-</text><text class="breeze-help-r5" x="0" y="1557.2" textLength="12.2"
clip-path="url(#breeze-help-line-63)">│</text><text class="breeze-help-r4"
x="24.4" y="1557.2" textLength="280.6"
clip-path="url(#breeze-help-line-63)">start-airflow          </text><text
class="breeze-help-r1" x="329.4" y="1557.2" textLength="1110.2"
clip-path="url(#breeze-help-line-63)">Enter breeze environment and starts all Airflow
[...]
+</text><text class="breeze-help-r5" x="0" y="1557.2" textLength="12.2"
clip-path="url(#breeze-help-line-63)">│</text><text class="breeze-help-r4"
x="24.4" y="1557.2" textLength="280.6"
clip-path="url(#breeze-help-line-63)">start-airflow          </text><text
class="breeze-help-r1" x="329.4" y="1557.2" textLength="1110.2"
clip-path="url(#breeze-help-line-63)">Enter breeze environment and starts all Airflow
[...]
</text><text class="breeze-help-r5" x="0" y="1581.6" textLength="12.2"
clip-path="url(#breeze-help-line-64)">│</text><text class="breeze-help-r1"
x="329.4" y="1581.6" textLength="1110.2"
clip-path="url(#breeze-help-line-64)">Compile assets if contents of www directory changed.                              
[...]
</text><text class="breeze-help-r5" x="0" y="1606" textLength="12.2"
clip-path="url(#breeze-help-line-65)">│</text><text class="breeze-help-r4"
x="24.4" y="1606" textLength="280.6"
clip-path="url(#breeze-help-line-65)">build-docs             </text><text
class="breeze-help-r1" x="329.4" y="1606" textLength="1110.2"
clip-path="url(#breeze-help-line-65)">Build documents.        
[...]
</text><text class="breeze-help-r5" x="0" y="1630.4" textLength="12.2"
clip-path="url(#breeze-help-line-66)">│</text><text class="breeze-help-r4"
x="24.4" y="1630.4" textLength="280.6"
clip-path="url(#breeze-help-line-66)">down                   </text><text
class="breeze-help-r1" x="329.4" y="1630.4" textLength="1110.2"
clip-path="url(#breeze-help-line-66)">Stop running breeze e [...]
diff --git a/dev/breeze/doc/images/output_setup_config.svg
b/dev/breeze/doc/images/output_setup_config.svg
index b5e44dff29f..8b814cf670c 100644
--- a/dev/breeze/doc/images/output_setup_config.svg
+++ b/dev/breeze/doc/images/output_setup_config.svg
@@ -1,4 +1,4 @@
-<svg class="rich-terminal" viewBox="0 0 1482 684.4"
xmlns="http://www.w3.org/2000/svg">
+<svg class="rich-terminal" viewBox="0 0 1482 708.8"
xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io -->
<style>
@@ -43,7 +43,7 @@
<defs>
<clipPath id="breeze-setup-config-clip-terminal">
- <rect x="0" y="0" width="1463.0" height="633.4" />
+ <rect x="0" y="0" width="1463.0" height="657.8" />
</clipPath>
<clipPath id="breeze-setup-config-line-0">
<rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -120,9 +120,12 @@
<clipPath id="breeze-setup-config-line-24">
<rect x="0" y="587.1" width="1464" height="24.65"/>
</clipPath>
+<clipPath id="breeze-setup-config-line-25">
+ <rect x="0" y="611.5" width="1464" height="24.65"/>
+ </clipPath>
</defs>
- <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="682.4" rx="8"/><text
class="breeze-setup-config-title" fill="#c5c8c6" text-anchor="middle" x="740"
y="27">Command: setup config</text>
+ <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="706.8" rx="8"/><text
class="breeze-setup-config-title" fill="#c5c8c6" text-anchor="middle" x="740"
y="27">Command: setup config</text>
<g transform="translate(26,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -149,15 +152,16 @@
</text><text class="breeze-setup-config-r5" x="0" y="361.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-14)">│</text><text
class="breeze-setup-config-r5" x="475.8" y="361.6" textLength="963.8"
clip-path="url(#breeze-setup-config-line-14)">[default: sqlite]                                    
[...]
</text><text class="breeze-setup-config-r5" x="0" y="386" textLength="12.2"
clip-path="url(#breeze-setup-config-line-15)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="386" textLength="219.6"
clip-path="url(#breeze-setup-config-line-15)">--postgres-version</text><text
class="breeze-setup-config-r6" x="390.4" y="386" textLength="24.4"
clip-path="url(#breeze-setup-config-line-15)">-P</text><text
class="breeze-setup-config-r1" x="475.8" y="386" textLength="305"
clip-path="url(#br [...]
</text><text class="breeze-setup-config-r5" x="0" y="410.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-16)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="410.4" textLength="183"
clip-path="url(#breeze-setup-config-line-16)">--mysql-version</text><text
class="breeze-setup-config-r6" x="390.4" y="410.4" textLength="24.4"
clip-path="url(#breeze-setup-config-line-16)">-M</text><text
class="breeze-setup-config-r1" x="475.8" y="410.4" textLength="268.4"
clip-path="ur [...]
-</text><text class="breeze-setup-config-r5" x="0" y="434.8" textLength="12.2"
clip-path="url(#breeze-setup-config-line-17)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="434.8" textLength="170.8"
clip-path="url(#breeze-setup-config-line-17)">--auth-manager</text><text
class="breeze-setup-config-r1" x="475.8" y="434.8" textLength="378.2"
clip-path="url(#breeze-setup-config-line-17)">Specify the auth manager to set</text><text
class="breeze-setup-config- [...]
-</text><text class="breeze-setup-config-r5" x="0" y="459.2" textLength="12.2"
clip-path="url(#breeze-setup-config-line-18)">│</text><text
class="breeze-setup-config-r5" x="475.8" y="459.2" textLength="378.2"
clip-path="url(#breeze-setup-config-line-18)">[default: SimpleAuthManager]   </text><text
class="breeze-setup-config-r5" x="1451.8" y="459.2" textLength="12.2"
clip-path="url(#breeze-setup-config-line-18)">│</text><text
class="breeze-setup-config-r1" x="1464" y="4 [...]
-</text><text class="breeze-setup-config-r5" x="0" y="483.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-19)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="483.6" textLength="146.4"
clip-path="url(#breeze-setup-config-line-19)">--cheatsheet</text><text
class="breeze-setup-config-r1" x="170.8" y="483.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-19)">/</text><text
class="breeze-setup-config-r4" x="183" y="483.6" textLength="183"
clip-path="url(#bre [...]
-</text><text class="breeze-setup-config-r5" x="0" y="508" textLength="12.2"
clip-path="url(#breeze-setup-config-line-20)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="508" textLength="122"
clip-path="url(#breeze-setup-config-line-20)">--asciiart</text><text
class="breeze-setup-config-r1" x="146.4" y="508" textLength="12.2"
clip-path="url(#breeze-setup-config-line-20)">/</text><text
class="breeze-setup-config-r4" x="158.6" y="508" textLength="158.6"
clip-path="url(#breeze-setu [...]
-</text><text class="breeze-setup-config-r5" x="0" y="532.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-21)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="532.4" textLength="97.6"
clip-path="url(#breeze-setup-config-line-21)">--colour</text><text
class="breeze-setup-config-r1" x="122" y="532.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-21)">/</text><text
class="breeze-setup-config-r4" x="134.2" y="532.4" textLength="134.2"
clip-path="url(#breeze [...]
-</text><text class="breeze-setup-config-r5" x="0" y="556.8" textLength="1464"
clip-path="url(#breeze-setup-config-line-22)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-setup-config-r1" x="1464" y="556.8" textLength="12.2"
clip-path="url(#breeze-setup-config-line-22)">
-</text><text class="breeze-setup-config-r5" x="0" y="581.2" textLength="24.4"
clip-path="url(#breeze-setup-config-line-23)">╭─</text><text
class="breeze-setup-config-r5" x="24.4" y="581.2" textLength="195.2"
clip-path="url(#breeze-setup-config-line-23)"> Common options </text><text
class="breeze-setup-config-r5" x="219.6" y="581.2" textLength="1220"
clip-path="url(#breeze-setup-config-line-23)">───────────────────────────────────────────────────────────────────────────────
[...]
-</text><text class="breeze-setup-config-r5" x="0" y="605.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-24)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="605.6" textLength="73.2"
clip-path="url(#breeze-setup-config-line-24)">--help</text><text
class="breeze-setup-config-r6" x="122" y="605.6" textLength="24.4"
clip-path="url(#breeze-setup-config-line-24)">-h</text><text
class="breeze-setup-config-r1" x="170.8" y="605.6" textLength="329.4"
clip-path="url(#breeze- [...]
-</text><text class="breeze-setup-config-r5" x="0" y="630" textLength="1464"
clip-path="url(#breeze-setup-config-line-25)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-setup-config-r1" x="1464" y="630" textLength="12.2"
clip-path="url(#breeze-setup-config-line-25)">
+</text><text class="breeze-setup-config-r5" x="0" y="434.8" textLength="12.2"
clip-path="url(#breeze-setup-config-line-17)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="434.8" textLength="268.4"
clip-path="url(#breeze-setup-config-line-17)">--terminal-multiplexer</text><text
class="breeze-setup-config-r6" x="390.4" y="434.8" textLength="24.4"
clip-path="url(#breeze-setup-config-line-17)">-t</text><text
class="breeze-setup-config-r1" x="475.8" y="434.8" textLength="414.8" clip [...]
+</text><text class="breeze-setup-config-r5" x="0" y="459.2" textLength="12.2"
clip-path="url(#breeze-setup-config-line-18)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="459.2" textLength="170.8"
clip-path="url(#breeze-setup-config-line-18)">--auth-manager</text><text
class="breeze-setup-config-r1" x="475.8" y="459.2" textLength="378.2"
clip-path="url(#breeze-setup-config-line-18)">Specify the auth manager to set</text><text
class="breeze-setup-config- [...]
+</text><text class="breeze-setup-config-r5" x="0" y="483.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-19)">│</text><text
class="breeze-setup-config-r5" x="475.8" y="483.6" textLength="378.2"
clip-path="url(#breeze-setup-config-line-19)">[default: SimpleAuthManager]   </text><text
class="breeze-setup-config-r5" x="1451.8" y="483.6" textLength="12.2"
clip-path="url(#breeze-setup-config-line-19)">│</text><text
class="breeze-setup-config-r1" x="1464" y="4 [...]
+</text><text class="breeze-setup-config-r5" x="0" y="508" textLength="12.2"
clip-path="url(#breeze-setup-config-line-20)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="508" textLength="146.4"
clip-path="url(#breeze-setup-config-line-20)">--cheatsheet</text><text
class="breeze-setup-config-r1" x="170.8" y="508" textLength="12.2"
clip-path="url(#breeze-setup-config-line-20)">/</text><text
class="breeze-setup-config-r4" x="183" y="508" textLength="183"
clip-path="url(#breeze-setu [...]
+</text><text class="breeze-setup-config-r5" x="0" y="532.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-21)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="532.4" textLength="122"
clip-path="url(#breeze-setup-config-line-21)">--asciiart</text><text
class="breeze-setup-config-r1" x="146.4" y="532.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-21)">/</text><text
class="breeze-setup-config-r4" x="158.6" y="532.4" textLength="158.6"
clip-path="url(#bre [...]
+</text><text class="breeze-setup-config-r5" x="0" y="556.8" textLength="12.2"
clip-path="url(#breeze-setup-config-line-22)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="556.8" textLength="97.6"
clip-path="url(#breeze-setup-config-line-22)">--colour</text><text
class="breeze-setup-config-r1" x="122" y="556.8" textLength="12.2"
clip-path="url(#breeze-setup-config-line-22)">/</text><text
class="breeze-setup-config-r4" x="134.2" y="556.8" textLength="134.2"
clip-path="url(#breeze [...]
+</text><text class="breeze-setup-config-r5" x="0" y="581.2" textLength="1464"
clip-path="url(#breeze-setup-config-line-23)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-setup-config-r1" x="1464" y="581.2" textLength="12.2"
clip-path="url(#breeze-setup-config-line-23)">
+</text><text class="breeze-setup-config-r5" x="0" y="605.6" textLength="24.4"
clip-path="url(#breeze-setup-config-line-24)">╭─</text><text
class="breeze-setup-config-r5" x="24.4" y="605.6" textLength="195.2"
clip-path="url(#breeze-setup-config-line-24)"> Common options </text><text
class="breeze-setup-config-r5" x="219.6" y="605.6" textLength="1220"
clip-path="url(#breeze-setup-config-line-24)">───────────────────────────────────────────────────────────────────────────────
[...]
+</text><text class="breeze-setup-config-r5" x="0" y="630" textLength="12.2"
clip-path="url(#breeze-setup-config-line-25)">│</text><text
class="breeze-setup-config-r4" x="24.4" y="630" textLength="73.2"
clip-path="url(#breeze-setup-config-line-25)">--help</text><text
class="breeze-setup-config-r6" x="122" y="630" textLength="24.4"
clip-path="url(#breeze-setup-config-line-25)">-h</text><text
class="breeze-setup-config-r1" x="170.8" y="630" textLength="329.4"
clip-path="url(#breeze-setup-co [...]
+</text><text class="breeze-setup-config-r5" x="0" y="654.4" textLength="1464"
clip-path="url(#breeze-setup-config-line-26)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-setup-config-r1" x="1464" y="654.4" textLength="12.2"
clip-path="url(#breeze-setup-config-line-26)">
</text>
</g>
</g>
diff --git a/dev/breeze/doc/images/output_setup_config.txt
b/dev/breeze/doc/images/output_setup_config.txt
index 8b4e790ed1f..82e368c88f2 100644
--- a/dev/breeze/doc/images/output_setup_config.txt
+++ b/dev/breeze/doc/images/output_setup_config.txt
@@ -1 +1 @@
-8426489bf7a3566876626ff0ee6ff7cc
+74d359990f4d1c6c0a5e10aa82f07073
diff --git a/dev/breeze/doc/images/output_start-airflow.svg
b/dev/breeze/doc/images/output_start-airflow.svg
index 5798865acac..ed17652d064 100644
--- a/dev/breeze/doc/images/output_start-airflow.svg
+++ b/dev/breeze/doc/images/output_start-airflow.svg
@@ -528,7 +528,7 @@
<text class="breeze-start-airflow-r1" x="1464" y="20" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-0)">
</text><text class="breeze-start-airflow-r2" x="12.2" y="44.4"
textLength="73.2"
clip-path="url(#breeze-start-airflow-line-1)">Usage:</text><text
class="breeze-start-airflow-r3" x="97.6" y="44.4" textLength="244"
clip-path="url(#breeze-start-airflow-line-1)">breeze start-airflow</text><text
class="breeze-start-airflow-r1" x="353.8" y="44.4" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-1)">[</text><text
class="breeze-start-airflow-r4" x="366" y="44.4" textLength="85.4" [...]
</text><text class="breeze-start-airflow-r1" x="1464" y="68.8"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-2)">
-</text><text class="breeze-start-airflow-r1" x="12.2" y="93.2"
textLength="1427.4"
clip-path="url(#breeze-start-airflow-line-3)">Enter breeze environment and starts all Airflow components in the tmux or mprocs session. Compile assets if contents </text><text
class="breeze-start-airflow-r1" x="1464" y="93.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-3)">
+</text><text class="breeze-start-airflow-r1" x="12.2" y="93.2"
textLength="1439.6"
clip-path="url(#breeze-start-airflow-line-3)">Enter breeze environment and starts all Airflow components in terminal multiplexer session. Compile assets if contents</text><text
class="breeze-start-airflow-r1" x="1464" y="93.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-3)">
</text><text class="breeze-start-airflow-r1" x="12.2" y="117.6"
textLength="305"
clip-path="url(#breeze-start-airflow-line-4)">of www directory changed.</text><text
class="breeze-start-airflow-r1" x="1464" y="117.6" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-4)">
</text><text class="breeze-start-airflow-r1" x="1464" y="142"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-5)">
</text><text class="breeze-start-airflow-r5" x="0" y="166.4" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-6)">╭─</text><text
class="breeze-start-airflow-r5" x="24.4" y="166.4" textLength="195.2"
clip-path="url(#breeze-start-airflow-line-6)"> Execution mode </text><text
class="breeze-start-airflow-r5" x="219.6" y="166.4" textLength="1220"
clip-path="url(#breeze-start-airflow-line-6)">────────────────────────────────────────────────────────────────────────────
[...]
@@ -549,8 +549,8 @@
</text><text class="breeze-start-airflow-r5" x="0" y="532.4" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-21)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="532.4" textLength="317.2"
clip-path="url(#breeze-start-airflow-line-21)">--standalone-dag-processor</text><text
class="breeze-start-airflow-r1" x="341.6" y="532.4" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-21)">/</text><text
class="breeze-start-airflow-r4" x="353.8" y="532.4" textLength="3 [...]
</text><text class="breeze-start-airflow-r5" x="0" y="556.8" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-22)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="556.8" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-22)">r</text><text
class="breeze-start-airflow-r1" x="768.6" y="556.8" textLength="671"
clip-path="url(#breeze-start-airflow-line-22)">(required for Airflow 3).           
[...]
</text><text class="breeze-start-airflow-r5" x="0" y="581.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-23)">│</text><text
class="breeze-start-airflow-r5" x="768.6" y="581.2" textLength="671"
clip-path="url(#breeze-start-airflow-line-23)">[default: standalone-dag-processor]                    </text><text
class="breeze-start-airflow-r5" x="1451.8" y="581.2" textLength [...]
-</text><text class="breeze-start-airflow-r5" x="0" y="605.6" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-24)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="605.6" textLength="146.4"
clip-path="url(#breeze-start-airflow-line-24)">--use-mprocs</text><text
class="breeze-start-airflow-r1" x="170.8" y="605.6" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-24)">/</text><text
class="breeze-start-airflow-r4" x="183" y="605.6" textLength="122" clip-path="u
[...]
-</text><text class="breeze-start-airflow-r5" x="0" y="630" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-25)">│</text><text
class="breeze-start-airflow-r5" x="768.6" y="630" textLength="549"
clip-path="url(#breeze-start-airflow-line-25)">[default: use-tmux]                          </text><text
class="breeze-start-airflow-r5" x="1451.8" y="6 [...]
+</text><text class="breeze-start-airflow-r5" x="0" y="605.6" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-24)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="605.6" textLength="268.4"
clip-path="url(#breeze-start-airflow-line-24)">--terminal-multiplexer</text><text
class="breeze-start-airflow-r6" x="719.8" y="605.6" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-24)">-t</text><text
class="breeze-start-airflow-r1" x="768.6" y="605.6" textLength="414. [...]
+</text><text class="breeze-start-airflow-r5" x="0" y="630" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-25)">│</text><text
class="breeze-start-airflow-r5" x="768.6" y="630" textLength="414.8"
clip-path="url(#breeze-start-airflow-line-25)">[default: mprocs]                 </text><text
class="breeze-start-airflow-r5" x="1451.8" y="630" textLength="12.2"
clip-path="url(#breeze-start-air [...]
</text><text class="breeze-start-airflow-r5" x="0" y="654.4" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-26)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="654.4" textLength="170.8"
clip-path="url(#breeze-start-airflow-line-26)">--auth-manager</text><text
class="breeze-start-airflow-r1" x="768.6" y="654.4" textLength="463.6"
clip-path="url(#breeze-start-airflow-line-26)">Specify the auth manager to set     
[...]
</text><text class="breeze-start-airflow-r5" x="0" y="678.8" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-27)">│</text><text
class="breeze-start-airflow-r7" x="768.6" y="678.8" textLength="463.6"
clip-path="url(#breeze-start-airflow-line-27)">(>SimpleAuthManager< | FabAuthManager)</text><text
class="breeze-start-airflow-r5" x="1451.8" y="678.8" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-27)">│</text><text
class="breeze-start-airflow-r1" x=" [...]
</text><text class="breeze-start-airflow-r5" x="0" y="703.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-28)">│</text><text
class="breeze-start-airflow-r5" x="768.6" y="703.2" textLength="463.6"
clip-path="url(#breeze-start-airflow-line-28)">[default: SimpleAuthManager]          </text><text
class="breeze-start-airflow-r5" x="1451.8" y="703.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-28)">│</text><t [...]
diff --git a/dev/breeze/doc/images/output_start-airflow.txt
b/dev/breeze/doc/images/output_start-airflow.txt
index 942b916d6db..7fe59e444f1 100644
--- a/dev/breeze/doc/images/output_start-airflow.txt
+++ b/dev/breeze/doc/images/output_start-airflow.txt
@@ -1 +1 @@
-e59a9e6c7c9ce7b0a0bfdd8aad9e161b
+b40aa6672a59264cc7cc7effa7fec31e
diff --git a/dev/breeze/src/airflow_breeze/commands/common_options.py
b/dev/breeze/src/airflow_breeze/commands/common_options.py
index a9f8c484314..d76feb7129c 100644
--- a/dev/breeze/src/airflow_breeze/commands/common_options.py
+++ b/dev/breeze/src/airflow_breeze/commands/common_options.py
@@ -31,6 +31,7 @@ from airflow_breeze.global_constants import (
ALLOWED_MYSQL_VERSIONS,
ALLOWED_POSTGRES_VERSIONS,
ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
+ ALLOWED_TERMINAL_MULTIPLEXERS,
ALLOWED_TTY,
ALLOWED_USE_AIRFLOW_VERSIONS,
APACHE_AIRFLOW_GITHUB_REPOSITORY,
@@ -392,13 +393,14 @@ option_standalone_dag_processor = click.option(
help="Run standalone dag processor for start-airflow (required for Airflow
3).",
envvar="STANDALONE_DAG_PROCESSOR",
)
-option_use_mprocs = click.option(
- "--use-mprocs/--use-tmux",
- is_flag=True,
- default=False,
+option_terminal_multiplexer = click.option(
+ "-t",
+ "--terminal-multiplexer",
+ help="Which terminal multiplexer to use.",
+ type=CacheableChoice(ALLOWED_TERMINAL_MULTIPLEXERS),
+ default=CacheableDefault(ALLOWED_TERMINAL_MULTIPLEXERS[0]),
show_default=True,
- help="Use mprocs instead of tmux for start-airflow.",
- envvar="USE_MPROCS",
+ envvar="TERMINAL_MULTIPLEXER",
)
option_tty = click.option(
"--tty",
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index 4ee7c3f0de5..c6da3fd755f 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -69,11 +69,11 @@ from airflow_breeze.commands.common_options import (
option_run_db_tests_only,
option_skip_db_tests,
option_standalone_dag_processor,
+ option_terminal_multiplexer,
option_tty,
option_upgrade_boto,
option_upgrade_sqlalchemy,
option_use_airflow_version,
- option_use_mprocs,
option_use_uv,
option_uv_http_timeout,
option_verbose,
@@ -568,7 +568,7 @@ option_executor_start_airflow = click.option(
@option_python
@option_restart
@option_standalone_dag_processor
-@option_use_mprocs
+@option_terminal_multiplexer
@option_use_uv
@option_uv_http_timeout
@option_use_airflow_version
@@ -618,14 +618,14 @@ def start_airflow(
restart: bool,
skip_assets_compilation: bool,
standalone_dag_processor: bool,
- use_mprocs: bool,
+ terminal_multiplexer: str,
use_airflow_version: str | None,
use_distributions_from_dist: bool,
use_uv: bool,
uv_http_timeout: int,
):
"""
- Enter breeze environment and starts all Airflow components in the tmux or
mprocs session.
+ Enter breeze environment and starts all Airflow components in terminal
multiplexer session.
Compile assets if contents of www directory changed.
"""
if dev_mode and skip_assets_compilation:
@@ -712,9 +712,9 @@ def start_airflow(
restart=restart,
standalone_dag_processor=standalone_dag_processor,
start_airflow=True,
+ terminal_multiplexer=terminal_multiplexer,
use_airflow_version=use_airflow_version,
use_distributions_from_dist=use_distributions_from_dist,
- use_mprocs=use_mprocs,
use_uv=use_uv,
uv_http_timeout=uv_http_timeout,
)
diff --git
a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
index 10b6d7d3587..84422305cce 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
@@ -201,7 +201,7 @@ DEVELOPER_PARAMETERS: dict[str, list[dict[str, str |
list[str]]]] = {
"--platform",
"--integration",
"--standalone-dag-processor",
- "--use-mprocs",
+ "--terminal-multiplexer",
"--auth-manager",
"--load-example-dags",
"--load-default-connections",
diff --git a/dev/breeze/src/airflow_breeze/commands/setup_commands.py
b/dev/breeze/src/airflow_breeze/commands/setup_commands.py
index 37b08dd44ec..60d274d3d4b 100644
--- a/dev/breeze/src/airflow_breeze/commands/setup_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/setup_commands.py
@@ -39,6 +39,7 @@ from airflow_breeze.commands.common_options import (
option_mysql_version,
option_postgres_version,
option_python,
+ option_terminal_multiplexer,
option_verbose,
)
from airflow_breeze.commands.developer_commands import option_auth_manager
@@ -186,6 +187,7 @@ def version():
@option_python
@option_backend
@option_postgres_version
+@option_terminal_multiplexer
@option_mysql_version
@option_auth_manager
@click.option("-C/-c", "--cheatsheet/--no-cheatsheet", help="Enable/disable
cheatsheet.", default=None)
@@ -198,6 +200,7 @@ def version():
def change_config(
python: str,
backend: str,
+ terminal_multiplexer: str,
postgres_version: str,
mysql_version: str,
auth_manager: str,
@@ -243,6 +246,7 @@ def change_config(
get_console().print(f"[info]* Backend: {backend}[/]")
get_console().print(f"[info]* Postgres version: {postgres_version}[/]")
get_console().print(f"[info]* MySQL version: {mysql_version}[/]")
+ get_console().print(f"[info]* Terminal multiplexer:
{terminal_multiplexer}[/]")
get_console().print(f"[info]* Auth Manager: {auth_manager}[/]")
get_console().print()
get_console().print(f"[info]* ASCIIART:
{get_suppress_status(asciiart_file)}[/]")
diff --git a/dev/breeze/src/airflow_breeze/commands/setup_commands_config.py
b/dev/breeze/src/airflow_breeze/commands/setup_commands_config.py
index 685cd692409..9b913c1c9ec 100644
--- a/dev/breeze/src/airflow_breeze/commands/setup_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/setup_commands_config.py
@@ -63,6 +63,7 @@ SETUP_PARAMETERS: dict[str, list[dict[str, str | list[str]]]]
= {
"--backend",
"--postgres-version",
"--mysql-version",
+ "--terminal-multiplexer",
"--auth-manager",
"--cheatsheet",
"--asciiart",
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py
b/dev/breeze/src/airflow_breeze/global_constants.py
index f29153d0018..c364d4d660d 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -141,6 +141,7 @@ AUTOCOMPLETE_ALL_INTEGRATIONS = sorted(
]
)
ALLOWED_TTY = ["auto", "enabled", "disabled"]
+ALLOWED_TERMINAL_MULTIPLEXERS = ["mprocs", "tmux"]
ALLOWED_DOCKER_COMPOSE_PROJECTS = ["breeze", "prek", "docker-compose"]
ALLOWED_LOG_LEVELS = ["INFO", "DEBUG", "WARNING", "ERROR", "CRITICAL"]
DEFAULT_LOG_LEVEL = ALLOWED_LOG_LEVELS[0]
diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py
b/dev/breeze/src/airflow_breeze/params/shell_params.py
index a3e3c207049..ba0c4b85123 100644
--- a/dev/breeze/src/airflow_breeze/params/shell_params.py
+++ b/dev/breeze/src/airflow_breeze/params/shell_params.py
@@ -35,6 +35,7 @@ from airflow_breeze.global_constants import (
ALLOWED_INSTALLATION_DISTRIBUTION_FORMATS,
ALLOWED_MYSQL_VERSIONS,
ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
+ ALLOWED_TERMINAL_MULTIPLEXERS,
APACHE_AIRFLOW_GITHUB_REPOSITORY,
BREEZE_DEBUG_APISERVER_PORT,
BREEZE_DEBUG_CELERY_WORKER_PORT,
@@ -241,7 +242,7 @@ class ShellParams:
upgrade_sqlalchemy: bool = False
use_airflow_version: str | None = None
use_distributions_from_dist: bool = False
- use_mprocs: bool = False
+ terminal_multiplexer: str = ALLOWED_TERMINAL_MULTIPLEXERS[0]
use_uv: bool = False
use_xdist: bool = False
uv_http_timeout: int = DEFAULT_UV_HTTP_TIMEOUT
@@ -672,7 +673,7 @@ class ShellParams:
_set_var(_env, "SSH_PORT", None, SSH_PORT)
_set_var(_env, "STANDALONE_DAG_PROCESSOR",
self.standalone_dag_processor)
_set_var(_env, "START_AIRFLOW", self.start_airflow)
- _set_var(_env, "USE_MPROCS", self.use_mprocs)
+ _set_var(_env, "TERMINAL_MULTIPLEXER", self.terminal_multiplexer)
_set_var(_env, "SUSPENDED_PROVIDERS_FOLDERS",
self.suspended_providers_folders)
_set_var(
_env,
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 6d11039959b..7e291f40adb 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -219,7 +219,7 @@ function environment_initialization() {
fi
export AIRFLOW__CORE__LOAD_EXAMPLES=${LOAD_EXAMPLES}
wait_for_asset_compilation
- if [[ ${USE_MPROCS:="false"} == "true" || ${USE_MPROCS} == "True" ]];
then
+ if [[ ${TERMINAL_MULTIPLEXER:="mprocs"} == "mprocs" ]]; then
# shellcheck source=scripts/in_container/bin/run_mprocs
exec run_mprocs
else
diff --git a/scripts/in_container/bin/generate_mprocs_config.py
b/scripts/in_container/bin/generate_mprocs_config.py
index f793d5461ae..5d6bbf7ffe5 100755
--- a/scripts/in_container/bin/generate_mprocs_config.py
+++ b/scripts/in_container/bin/generate_mprocs_config.py
@@ -202,19 +202,23 @@ def main():
with open(output_path, "w") as f:
f.write(config)
- # Use rich console for pretty output
- console = Console()
-
- console.print(
- f"\n[bold green]✓[/bold green] Generated mprocs configuration at:
[cyan]{output_path}[/cyan]"
- )
-
- # Display configuration with syntax highlighting
- syntax = Syntax(config, "yaml", theme="monokai", line_numbers=False)
- panel = Panel(
- syntax, title="[bold yellow]Configuration Preview[/bold yellow]",
border_style="blue", expand=False
- )
- console.print(panel)
+ if os.environ.get("VERBOSE", "false") == "true":
+ # Use rich console for pretty output
+ console = Console()
+
+ console.print(
+ f"\n[bold green]✓[/bold green] Generated mprocs configuration at:
[cyan]{output_path}[/cyan]"
+ )
+
+ # Display configuration with syntax highlighting
+ syntax = Syntax(config, "yaml", theme="monokai", line_numbers=False)
+ panel = Panel(
+ syntax,
+ title="[bold yellow]Configuration Preview[/bold yellow]",
+ border_style="blue",
+ expand=False,
+ )
+ console.print(panel)
if __name__ == "__main__":