mirror of
https://github.com/ansible/awx.git
synced 2026-07-31 09:59:55 -02:30
add job_description to failed workflow node
* When workflow job fails because a workflow job node doesn't have a related unified_job_template note that with an error on the workflow job's job_description * When a workflow job fails because a failure path isn't defined, note that on the workflow job job_description
This commit is contained in:
@@ -129,15 +129,15 @@ class WorkflowDAG(SimpleDAG):
|
||||
obj = node['node_object']
|
||||
|
||||
if obj.unified_job_template is None:
|
||||
return True
|
||||
return True, "Workflow job node {} related unified job template missing".format(obj.id)
|
||||
if obj.job and obj.job.status in ['failed', 'canceled', 'error']:
|
||||
failed_nodes.append(node)
|
||||
for node in failed_nodes:
|
||||
obj = node['node_object']
|
||||
if (len(self.get_dependencies(obj, 'failure_nodes')) +
|
||||
len(self.get_dependencies(obj, 'always_nodes'))) == 0:
|
||||
return True
|
||||
return False
|
||||
return True, "Workflow job node {} has a status of '{}' without an error handler path".format(obj.id, obj.job.status)
|
||||
return False, None
|
||||
|
||||
r'''
|
||||
Determine if all nodes have been decided on being marked do_not_run.
|
||||
|
||||
Reference in New Issue
Block a user