notifiers.star 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. # Copyright 2020 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. load("//lib/branches.star", "branches")
  5. luci.notifier(
  6. name = "chromesec-lkgr-failures",
  7. on_status_change = True,
  8. notify_emails = [
  9. "chromesec-lkgr-failures@google.com",
  10. ],
  11. )
  12. luci.notifier(
  13. name = "chrome-lacros-engprod-alerts",
  14. on_status_change = True,
  15. notify_emails = [
  16. "chrome-lacros-engprod-alerts@google.com",
  17. ],
  18. )
  19. luci.notifier(
  20. name = "chrome-memory-safety",
  21. on_status_change = True,
  22. notify_emails = [
  23. "chrome-memory-safety+bots@google.com",
  24. ],
  25. )
  26. luci.notifier(
  27. name = "chrome-rust-experiments",
  28. on_new_status = ["FAILURE", "INFRA_FAILURE"],
  29. notify_emails = [
  30. "chrome-rust-experiments+bots@google.com",
  31. ],
  32. )
  33. # Notifier for "package rust" step on *_upload_clang bots.
  34. luci.notifier(
  35. name = "chrome-rust-toolchain",
  36. # Watch for Rust failure regardless of the overall build status.
  37. on_occurrence = ["SUCCESS", "FAILURE", "INFRA_FAILURE"],
  38. failed_step_regexp = "package rust",
  39. notify_emails = [
  40. "chrome-rust-experiments+toolchain@google.com",
  41. ],
  42. )
  43. luci.notifier(
  44. name = "chrome-memory-sheriffs",
  45. on_status_change = True,
  46. notify_emails = [
  47. "chrome-memory-sheriffs+bots@google.com",
  48. ],
  49. )
  50. luci.notifier(
  51. name = "chromium-androidx-packager",
  52. on_new_status = ["FAILURE"],
  53. notify_emails = [
  54. "clank-library-failures+androidx@google.com",
  55. ],
  56. )
  57. luci.notifier(
  58. name = "chromium-3pp-packager",
  59. on_new_status = ["FAILURE"],
  60. notify_emails = [
  61. "chromium-3pp-packager+failures@google.com",
  62. ],
  63. )
  64. luci.notifier(
  65. name = "cr-fuchsia",
  66. on_status_change = True,
  67. notify_emails = [
  68. "chrome-fuchsia-gardener@grotations.appspotmail.com",
  69. ],
  70. )
  71. luci.notifier(
  72. name = "cr-fuchsia-engprod",
  73. on_status_change = True,
  74. notify_emails = [
  75. "chrome-fuchsia-engprod+builder-notification@google.com",
  76. ],
  77. )
  78. luci.notifier(
  79. name = "cronet",
  80. on_occurrence = ["FAILURE", "INFRA_FAILURE"],
  81. notify_emails = [
  82. "cronet-sheriff@grotations.appspotmail.com",
  83. ],
  84. )
  85. luci.notifier(
  86. name = "metadata-mapping",
  87. on_new_status = ["FAILURE"],
  88. notify_emails = ["chromium-component-mapping@google.com"],
  89. )
  90. luci.notifier(
  91. name = "weblayer-sheriff",
  92. on_new_status = ["FAILURE"],
  93. notify_emails = [
  94. "weblayer-sheriff@grotations.appspotmail.com",
  95. ],
  96. )
  97. TREE_CLOSING_STEPS_REGEXP = "\\b({})\\b".format("|".join([
  98. "bot_update",
  99. "compile",
  100. "gclient runhooks",
  101. "runhooks",
  102. "update",
  103. "\\w*nocompile_test",
  104. ]))
  105. # This results in a notifier with no recipients, so nothing will actually be
  106. # notified. This still creates a "notifiable" that can be passed to the notifies
  107. # argument of a builder, so conditional logic doesn't need to be used when
  108. # setting the argument and erroneous tree closure notifications won't be sent
  109. # for failures on branches.
  110. def _empty_notifier(*, name):
  111. luci.notifier(
  112. name = name,
  113. on_new_status = ["INFRA_FAILURE"],
  114. )
  115. def tree_closer(*, name, tree_status_host, **kwargs):
  116. if branches.matches(branches.MAIN):
  117. luci.tree_closer(
  118. name = name,
  119. tree_status_host = tree_status_host,
  120. **kwargs
  121. )
  122. else:
  123. _empty_notifier(name = name)
  124. tree_closer(
  125. name = "chromium-tree-closer",
  126. tree_status_host = "chromium-status.appspot.com",
  127. failed_step_regexp = TREE_CLOSING_STEPS_REGEXP,
  128. )
  129. tree_closer(
  130. name = "close-on-any-step-failure",
  131. tree_status_host = "chromium-status.appspot.com",
  132. )
  133. def tree_closure_notifier(*, name, **kwargs):
  134. if branches.matches(branches.MAIN):
  135. luci.notifier(
  136. name = name,
  137. on_occurrence = ["FAILURE"],
  138. failed_step_regexp = TREE_CLOSING_STEPS_REGEXP,
  139. **kwargs
  140. )
  141. else:
  142. _empty_notifier(name = name)
  143. tree_closure_notifier(
  144. name = "chromium-tree-closer-email",
  145. notify_rotation_urls = [
  146. "https://chrome-ops-rotation-proxy.appspot.com/current/oncallator:chrome-build-sheriff",
  147. ],
  148. template = luci.notifier_template(
  149. name = "tree_closure_email_template",
  150. body = io.read_file("templates/tree_closure_email.template"),
  151. ),
  152. )
  153. tree_closure_notifier(
  154. name = "gpu-tree-closer-email",
  155. notify_emails = ["chrome-gpu-build-failures@google.com"],
  156. notify_rotation_urls = [
  157. "https://chrome-ops-rotation-proxy.appspot.com/current/oncallator:chrome-gpu-pixel-wrangler-weekly",
  158. ],
  159. )
  160. tree_closure_notifier(
  161. name = "linux-memory",
  162. notify_emails = ["thomasanderson@chromium.org"],
  163. )
  164. tree_closure_notifier(
  165. name = "linux-archive-rel",
  166. notify_emails = ["thomasanderson@chromium.org"],
  167. )
  168. tree_closure_notifier(
  169. name = "Deterministic Android",
  170. notify_emails = ["agrieve@chromium.org"],
  171. )
  172. tree_closure_notifier(
  173. name = "Deterministic Linux",
  174. notify_emails = [
  175. "tikuta@chromium.org",
  176. "ukai@chromium.org",
  177. "yyanagisawa@chromium.org",
  178. ],
  179. )
  180. tree_closure_notifier(
  181. name = "linux-ozone-rel",
  182. notify_emails = [
  183. "fwang@chromium.org",
  184. "maksim.sisov@chromium.org",
  185. "rjkroege@chromium.org",
  186. "thomasanderson@chromium.org",
  187. "timbrown@chromium.org",
  188. "tonikitoo@chromium.org",
  189. ],
  190. )
  191. luci.notifier(
  192. name = "Site Isolation Android",
  193. notify_emails = [
  194. "nasko+fyi-bots@chromium.org",
  195. "creis+fyi-bots@chromium.org",
  196. "lukasza+fyi-bots@chromium.org",
  197. "alexmos+fyi-bots@chromium.org",
  198. ],
  199. on_new_status = ["FAILURE"],
  200. )
  201. luci.notifier(
  202. name = "CFI Linux",
  203. notify_emails = [
  204. "pcc@chromium.org",
  205. ],
  206. on_new_status = ["FAILURE"],
  207. )
  208. luci.notifier(
  209. name = "Win 10 Fast Ring",
  210. notify_emails = [
  211. "wfh@chromium.org",
  212. ],
  213. on_new_status = ["FAILURE"],
  214. )
  215. luci.notifier(
  216. name = "linux-blink-fyi-bots",
  217. notify_emails = [
  218. "mlippautz+fyi-bots@chromium.org",
  219. ],
  220. on_new_status = ["FAILURE"],
  221. )
  222. luci.notifier(
  223. name = "annotator-rel",
  224. notify_emails = [
  225. "pastarmovj@chromium.org",
  226. "nicolaso@chromium.org",
  227. ],
  228. on_new_status = ["FAILURE"],
  229. )
  230. luci.notifier(
  231. name = "headless-owners",
  232. notify_emails = [
  233. "headless-owners@chromium.org",
  234. ],
  235. on_new_status = ["FAILURE"],
  236. )
  237. tree_closure_notifier(
  238. name = "chromium.linux",
  239. notify_emails = [
  240. "thomasanderson@chromium.org",
  241. ],
  242. )
  243. luci.notifier(
  244. name = "v8-sandbox-fyi-bots",
  245. notify_emails = [
  246. "saelo+fyi-bots@chromium.org",
  247. ],
  248. on_new_status = ["FAILURE"],
  249. )
  250. luci.notifier(
  251. name = "cr-accessibility",
  252. notify_emails = [
  253. "chrome-a11y-alerts@google.com",
  254. ],
  255. on_new_status = ["FAILURE"],
  256. )