Can we distinguish between failed and canceled jobs?

finnre's Avatar


30 Oct, 2019 04:41 AM

Is there a way to distinguish, in the on_failure section, between a job that failed because of an error and a job that was canceled (because a later build was started, or because another job on the same build failed and fast_fail is set)?

I'm adding a notification for some kinds of failures, and rather than getting one from every job when a build is replaced or fast fails, I'd rather have the one failed job (if any) notify and the rest do nothing. :)

  1. Support Staff 1 Posted by Feodor Fitsner on 31 Oct, 2019 04:25 AM

    Feodor Fitsner's Avatar

    Well, I would say on_failure won't be called if the job is cancelled, so my understanding you can send a notification in on_failure that means the job has failed indeed. Let me know if I correctly understood the problem.

  2. 2 Posted by finnre on 31 Oct, 2019 06:37 PM

    finnre's Avatar

    Ah, it seems you did and I didn't, yeah. :) I had a few failure notifications pop up at the same time, but I think they just managed to squeak through before canceling each other. Seems to be a coincidence. Thanks!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac