You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/12/28 15:05:51 UTC
[airflow] branch master updated: Print better error message when
tests fail (#13339)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new f7d354d Print better error message when tests fail (#13339)
f7d354d is described below
commit f7d354df1cf4273cae5dbfa5052d95ada116e44c
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Mon Dec 28 16:05:35 2020 +0100
Print better error message when tests fail (#13339)
The recently added log groupping hides error messages in case
there is an error in tests. You need to manually unfold last test
step which is somewhate hidden - it is followed by several
'dump-container' logs.
This change adds clear error message showing the exact log
group that you need to unfold in case you want to look for
a problem.
---
scripts/ci/libraries/_start_end.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/ci/libraries/_start_end.sh b/scripts/ci/libraries/_start_end.sh
index c6bbd5a..4d6a7a4 100644
--- a/scripts/ci/libraries/_start_end.sh
+++ b/scripts/ci/libraries/_start_end.sh
@@ -89,11 +89,16 @@ function start_end::script_end {
#shellcheck disable=2181
local exit_code=$?
if [[ ${exit_code} != 0 ]]; then
+ # Finish previous group so that output can be written
# Cat output log in case we exit with error but only if we do not PRINT_INFO_FROM_SCRIPTS
# Because it will be printed immediately by "tee"
if [[ -f "${OUTPUT_LOG}" && ${PRINT_INFO_FROM_SCRIPTS} == "false" ]]; then
cat "${OUTPUT_LOG}"
fi
+ start_end::group_end
+ echo
+ echo "${COLOR_RED_ERROR} The previous step completed with error. Please take a look at output above ${COLOR_RESET}"
+ echo
if [[ ${CI} == "true" ]]; then
local container
for container in $(docker ps --format '{{.Names}}')