From 2e2eb4e428f5dfd51eb5be7fc78d8555235ff439 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 12 Aug 2024 09:32:45 +0200 Subject: [PATCH] [FIX] runbot: move error message to the end When building a docker image the error is part of the stream, and at the end. The current behaviour will append the error message at the begining of the "result log" breaking the temporality of the output. Adding it at the end should be more intuitive to read. This will also help to get a more usefull error sumary in some cases. --- runbot/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/container.py b/runbot/container.py index 74c91c56..e9fa14bd 100644 --- a/runbot/container.py +++ b/runbot/container.py @@ -121,7 +121,7 @@ def _docker_build(build_dir, image_tag): return (False, e.explanation) except docker.errors.BuildError as e: _logger.error('Build of image %s failed', image_tag) - msg = f"{e.msg}\n{''.join(l.get('stream') or '' for l in e.build_log)}" + msg = f"{''.join(l.get('stream') or '' for l in e.build_log)}\nERROR:{e.msg}" return (False, msg)