Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions dev/breeze/doc/03_developer_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,56 @@ Those are all available flags of ``shell`` command:
:width: 100%
:alt: Breeze shell

Running commands without interactive shell
------------------------------------------

For automated testing, and one-off command execution, you can use the ``breeze run`` command
to execute commands in the Breeze environment without entering the interactive shell. This command is
particularly useful when you want to run a specific command and exit immediately, without the overhead
of an interactive session.

The ``breeze run`` command creates a fresh container that is automatically cleaned up after the command
completes, and each run uses a unique project name to avoid conflicts with other instances.

Here are some common examples:

Running a specific test:

.. code-block:: bash

breeze run pytest providers/google/tests/unit/google/cloud/operators/test_dataflow.py -v

Running Python commands:

.. code-block:: bash

breeze run python -c "from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS; print(AIRFLOW_V_3_0_PLUS)"

Running bash commands:

.. code-block:: bash

breeze run bash -c "cd /opt/airflow && python -m pytest providers/google/tests/"

Running with different Python version:

.. code-block:: bash

breeze run --python 3.11 pytest providers/standard/tests/unit/operators/test_bash.py

Running with PostgreSQL backend:

.. code-block:: bash

breeze run --backend postgres pytest providers/postgres/tests/

Those are all available flags of ``run`` command:

.. image:: ./images/output_run.svg
:target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_run.svg
:width: 100%
:alt: Breeze run

Running Breeze with Metrics
---------------------------

Expand Down
54 changes: 29 additions & 25 deletions dev/breeze/doc/images/output-commands.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
240 changes: 240 additions & 0 deletions dev/breeze/doc/images/output_run.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dev/breeze/doc/images/output_run.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
820a829e6ae777a8625862d010f8e693
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
990975cc123e19cc0e094e129dcac59b
b1c66655acd75f4f7c65b2d35552f54e
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dd551b481de86089ffc562db65a88f2c
d112f32bf3ac63a45cafb3cd1248d728
Loading
Loading