diff --git a/.gitlab-ci/lava/lava_job_submitter.py b/.gitlab-ci/lava/lava_job_submitter.py index 82a52a7f130..1bbd77d8e85 100755 --- a/.gitlab-ci/lava/lava_job_submitter.py +++ b/.gitlab-ci/lava/lava_job_submitter.py @@ -357,17 +357,13 @@ def fetch_logs(job, max_idle_time, log_follower) -> None: # silence means that the device has died and we should try it again if datetime.now() - job.last_log_time > max_idle_time: max_idle_time_min = max_idle_time.total_seconds() / 60 - print_log( - f"{CONSOLE_LOG['BOLD']}" - f"{CONSOLE_LOG['FG_RED']}" - f"No log output for {max_idle_time_min} minutes; " - "assuming device has died, retrying" - f"{CONSOLE_LOG['RESET']}" - ) raise MesaCITimeoutError( + f"{CONSOLE_LOG['BOLD']}" + f"{CONSOLE_LOG['FG_YELLOW']}" f"LAVA job {job.job_id} does not respond for {max_idle_time_min} " - "minutes. Retry.", + "minutes. Retry." + f"{CONSOLE_LOG['RESET']}", timeout_duration=max_idle_time, ) diff --git a/.gitlab-ci/lava/utils/log_follower.py b/.gitlab-ci/lava/utils/log_follower.py index d08923bf07b..c61a9aa4e60 100644 --- a/.gitlab-ci/lava/utils/log_follower.py +++ b/.gitlab-ci/lava/utils/log_follower.py @@ -207,7 +207,10 @@ def print_log(msg): def fatal_err(msg): - print_log(msg) + colored_msg = f"{CONSOLE_LOG['FG_RED']}" + f"{msg}" + f"{CONSOLE_LOG['RESET']}" + print_log(colored_msg) sys.exit(1)