Bug 1425571 - fixups for release notifications, r=aki
authorNick Thomas <nthomas@mozilla.com>
Mon, 30 Apr 2018 13:45:53 +1200
changeset 472493 0247bf6522996220bf123f9d8443986fa71e554d
parent 472492 eea27e04c541c8f3f1221764b00a4f95de23ef78
child 472494 1bfab79dc9a7feb92aea531de3b49efde3f20255
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1425571
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1425571 - fixups for release notifications, r=aki 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.
taskcluster/taskgraph/transforms/release_notifications.py
--- a/taskcluster/taskgraph/transforms/release_notifications.py
+++ b/taskcluster/taskgraph/transforms/release_notifications.py
@@ -51,17 +51,19 @@ def add_notifications(config, jobs):
             emails = notifications['emails']
             format_kwargs = dict(
                 task=job,
                 config=config.__dict__,
                 release_config=release_config,
             )
             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:
             emails = email_dest
             format_kwargs = dict(
                 label=label,
                 shipping_product=shipping_product,
                 config=config.__dict__,
@@ -87,11 +89,11 @@ def add_notifications(config, jobs):
                    'notify': {
                        'email': {
                             'subject': subject,
                         }
                     }
                 }
             )
             if message:
-                job['extra']['notify']['email']['message'] = message
+                job['extra']['notify']['email']['content'] = message
 
         yield job