-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure to fire off failure notifications on error #11384
Make sure to fire off failure notifications on error #11384
Conversation
where the error is unrelated to Ansible, thus is not caught by the usual methods.
@chrismeyersfsu The one thing I'm worried about in this PR is if there are circumstances where an error result can cause the notification templates fire off by this path and the more usual path. Any thoughts? |
That's a good thing to be worried about @jbradberry . Do we call |
@chrismeyersfsu the other calls to |
I didn't understand #8771 before, but I might be seeing it now. Either way, this seems fairly correct on its own. The speculated problem here seems to be the mutual exclusivity of the error status and the EOF message. While it could possibly happen, that doesn't sound highly credible to me. |
self.instance.job_explanation = "Job terminated due to timeout" | ||
status = 'failed' | ||
if status in ('timeout', 'error'): | ||
self.instance.job_explanation = f"Job terminated due to {status}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that we don't want job_explanation
to read
Job terminated due to error
This is particularly bad in the cases where an error occurred and job_explanation
was set to something in response to that. This code would overwrite that useful message with this vague one.
SUMMARY
where the error is unrelated to Ansible, thus is not caught by the
usual methods.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION