mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Minor organization clarity for workflow failure summary
This commit is contained in:
parent
9a16e9f787
commit
d3c51ce75d
@ -17,9 +17,9 @@ class WorkflowJob(UnifiedJob):
|
||||
"""Special implementation of this part of assert_status so that
|
||||
workflow_job.assert_successful() will give a breakdown of failure
|
||||
"""
|
||||
msg = '\nNode summary:'
|
||||
node_list = self.related.workflow_nodes.get().results
|
||||
|
||||
msg = '\nNode summary:'
|
||||
for node in node_list:
|
||||
msg += '\n{}: {}'.format(node.id, node.summary_fields.get('job'))
|
||||
for rel in ('failure_nodes', 'always_nodes', 'success_nodes'):
|
||||
@ -29,12 +29,14 @@ class WorkflowJob(UnifiedJob):
|
||||
|
||||
msg += '\n\nUnhandled individual job failures:\n'
|
||||
for node in node_list:
|
||||
# nodes without always or failure paths consider failures unhandled
|
||||
if node.job and not (node.failure_nodes or node.always_nodes):
|
||||
job = node.related.job.get()
|
||||
try:
|
||||
job.assert_successful()
|
||||
except Exception as e:
|
||||
msg += str(e)
|
||||
|
||||
return msg
|
||||
|
||||
@property
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user