Skip to content
Snippets Groups Projects
Commit 9f1de230 authored by Tom Pollard's avatar Tom Pollard Committed by Tom Pollard
Browse files

widget.py: Limit failure summary to currently failing elements

Change widget.py print_summary() to only print the failure
messages of elements in the Failure Summary that failed on the
current try.
parent 9a46c16f
No related branches found
No related tags found
No related merge requests found
Pipeline #26567685 passed
......@@ -522,12 +522,15 @@ class LogLine(Widget):
text += "\n\n"
if self._failure_messages:
text += self.content_profile.fmt("Failure Summary\n", bold=True)
values = OrderedDict()
for element, messages in sorted(self._failure_messages.items(), key=lambda x: x[0].name):
values[element.name] = ''.join(self._render(v) for v in messages)
text += self._format_values(values, style_value=False)
for queue in stream.queues:
if any(el.name == element.name for el in queue.failed_elements):
values[element.name] = ''.join(self._render(v) for v in messages)
if values:
text += self.content_profile.fmt("Failure Summary\n", bold=True)
text += self._format_values(values, style_value=False)
text += self.content_profile.fmt("Pipeline Summary\n", bold=True)
values = OrderedDict()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment