diff options
author | Alan Rominger <arominge@redhat.com> | 2021-01-05 16:33:35 +0100 |
---|---|---|
committer | Alan Rominger <arominge@redhat.com> | 2021-01-05 16:33:35 +0100 |
commit | d3c51ce75df31d67b711268eaa355d56293b5b0f (patch) | |
tree | 34cbd4814ed7c87d3c0a3766e40f3f06034c6db1 /awxkit | |
parent | Condense logic for handling null job (diff) | |
download | awx-d3c51ce75df31d67b711268eaa355d56293b5b0f.tar.xz awx-d3c51ce75df31d67b711268eaa355d56293b5b0f.zip |
Minor organization clarity for workflow failure summary
Diffstat (limited to 'awxkit')
-rw-r--r-- | awxkit/awxkit/api/pages/workflow_jobs.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/awxkit/awxkit/api/pages/workflow_jobs.py b/awxkit/awxkit/api/pages/workflow_jobs.py index ac3f36a08d..36afc94460 100644 --- a/awxkit/awxkit/api/pages/workflow_jobs.py +++ b/awxkit/awxkit/api/pages/workflow_jobs.py @@ -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 |