1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

simplify workflow job failure reason

* Log the more detailed reason for a workflow job failing but expose a
simplified reason to users via job_explanation
This commit is contained in:
chris meyers 2018-11-20 11:53:12 -05:00 committed by mabashian
parent f8f2e005ba
commit 228e412478

View File

@ -186,7 +186,8 @@ class TaskManager():
update_fields = ['status', 'start_args']
workflow_job.status = new_status
if reason:
workflow_job.job_explanation = reason
logger.info(reason)
workflow_job.job_explanation = "No error handling paths found, marking workflow as failed"
update_fields.append('job_explanation')
workflow_job.start_args = '' # blank field to remove encrypted passwords
workflow_job.save(update_fields=update_fields)