You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/07/26 06:20:20 UTC

[buildstream] 03/03: _frontend/app.py: Flush cached messages when handling a failure.

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/print-error-messages-before-prompt
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 397d7c6fa1b0efec75905cc6612056a50a09f27a
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Tue Jul 26 15:18:58 2022 +0900

    _frontend/app.py: Flush cached messages when handling a failure.
    
    It's very confusing to get an interactive prompt and not see the detailed
    failure message on screen - make sure we print the pending messages when
    handling a failure.
---
 src/buildstream/_frontend/app.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py
index 8d6cdb064..303c9636a 100644
--- a/src/buildstream/_frontend/app.py
+++ b/src/buildstream/_frontend/app.py
@@ -624,6 +624,9 @@ class App:
     def _job_failed(self, task_id, element=None):
         task = self._state.tasks[task_id]
 
+        # Flush any pending messages when handling a failure
+        self._render(message_text=self._message_text)
+
         # Dont attempt to handle a failure if the user has already opted to
         # terminate
         if not self.stream.terminated: