Skip to content

Commit

Permalink
Log all breeze output to a file automatically (#14470)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a54292)
  • Loading branch information
potiuk committed Mar 3, 2021
1 parent 18a1042 commit 247af49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ We called it *Airflow Breeze* as **It's a Breeze to contribute to Airflow**.
The advantages and disadvantages of using the Breeze environment vs. other ways of testing Airflow
are described in `CONTRIBUTING.rst <CONTRIBUTING.rst#integration-test-development-environment>`_.

All the output from the last ./breeze command is automatically logged to the ``logs/breeze.out`` file.

Watch the video below about Airflow Breeze. It explains the motivation for Breeze
and screencasts all its uses.

Expand Down
10 changes: 10 additions & 0 deletions breeze
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@
# under the License.
set -euo pipefail


AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [[ ${BREEZE_REDIRECT=} == "" ]]; then
mkdir -p "${AIRFLOW_SOURCES}"/logs
export BREEZE_REDIRECT="true"
"${0}" "${@}" 2>&1 | tee "${AIRFLOW_SOURCES}"/logs/breeze.out
exit
fi

export AIRFLOW_SOURCES
readonly AIRFLOW_SOURCES


# Bash arrays need to be defined outside of functions unfortunately :(
# Because on Mac OS Bash 3.4 defining arrays inside functions does not work
# Array with extra options for Docker compose
Expand Down

0 comments on commit 247af49

Please sign in to comment.