Merge pull request #11471 from jbradberry/failure-notification-fallback-explanation

Only update the job_explanation on error if there wasn't already one
This commit is contained in:
Jeff Bradberry 2021-12-16 11:10:38 -05:00 committed by GitHub
commit 3414cae677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1544,7 +1544,8 @@ class BaseTask(object):
rc = res.rc
if status in ('timeout', 'error'):
self.instance.job_explanation = f"Job terminated due to {status}"
job_explanation = f"Job terminated due to {status}"
self.instance.job_explanation = self.instance.job_explanation or job_explanation
if status == 'timeout':
status = 'failed'