Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1425571 - fixups for release notifications, r=aki
Browse files Browse the repository at this point in the history
Sends 'in the candidates directory', 'pushed to cdntest', etc emails only when the underlying dummy tasks succeed, avoiding false messages when graphs are cancelled or the dummy job fails for infrastructure reasons.

Also sets the body of the email to be the same string as the subject, as we used to do, to avoid unnecessary information about the dummy task.
  • Loading branch information
nthomas-mozilla committed Apr 30, 2018
1 parent 340df59 commit c5cfff0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions taskcluster/taskgraph/transforms/release_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def add_notifications(config, jobs):
)
subject = notifications['subject'].format(**format_kwargs)
message = notifications['message'].format(**format_kwargs)
routes = ['notify.email.{email_dest}.on-any']
# we only send these on succces to avoid messages like 'blah is in the
# candidates dir' when cancelling graphs, dummy job failure, etc
routes = ['notify.email.{email_dest}.on-success']
# Don't need this any more
del job['notifications']
else:
Expand Down Expand Up @@ -92,6 +94,6 @@ def add_notifications(config, jobs):
}
)
if message:
job['extra']['notify']['email']['message'] = message
job['extra']['notify']['email']['content'] = message

yield job

0 comments on commit c5cfff0

Please sign in to comment.