Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: dashboard/dashboard/email_template.py

Issue 1924143002: Make sure that email alerts are sent on bisect fyi jobs failures. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dashboard/dashboard/update_bug_with_results.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Defines common functionality used for generating e-mail to sheriffs.""" 5 """Defines common functionality used for generating e-mail to sheriffs."""
6 6
7 import logging 7 import logging
8 import re 8 import re
9 import urllib 9 import urllib
10 10
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 'alerts_link': _ALL_ALERTS_LINK % urllib.quote(sheriff_name), 313 'alerts_link': _ALL_ALERTS_LINK % urllib.quote(sheriff_name),
314 'bug_link': bug_url, 314 'bug_link': bug_url,
315 } 315 }
316 return results 316 return results
317 317
318 318
319 def GetBisectFYITryJobEmailReport(job, message): 319 def GetBisectFYITryJobEmailReport(job, message):
320 """Gets the contents of the email to send once a bisect FYI job completes.""" 320 """Gets the contents of the email to send once a bisect FYI job completes."""
321 results_data = job.results_data 321 results_data = job.results_data
322 subject_dict = { 322 subject_dict = {
323 'bot': results_data['bisect_bot'], 323 'bot': job.bot,
324 'test_name': job.job_name, 324 'test_name': job.job_name,
325 } 325 }
326 report_dict = { 326 report_dict = {
327 'message': message, 327 'message': message,
328 'bot': results_data['bisect_bot'], 328 'bot': job.bot,
329 'job_url': results_data['buildbot_log_url'], 329 'job_url': results_data['buildbot_log_url'],
330 'test_name': job.job_name, 330 'test_name': job.job_name,
331 'config': job.config if job.config else 'Undefined', 331 'config': job.config if job.config else 'Undefined',
332 'errors': results_data.get('errors'), 332 'errors': results_data.get('errors'),
333 'results': results_data.get('results'), 333 'results': results_data.get('results'),
334 } 334 }
335 335
336 html = _BISECT_FYI_EMAIL_HTML_BODY % report_dict 336 html = _BISECT_FYI_EMAIL_HTML_BODY % report_dict
337 text = _BISECT_FYI_EMAIL_TEXT_BODY % report_dict 337 text = _BISECT_FYI_EMAIL_TEXT_BODY % report_dict
338 subject = _BISECT_FYI_EMAIL_SUBJECT % subject_dict 338 subject = _BISECT_FYI_EMAIL_SUBJECT % subject_dict
339 return {'subject': subject, 'html': html, 'body': text} 339 return {'subject': subject, 'html': html, 'body': text}
OLDNEW
« no previous file with comments | « no previous file | dashboard/dashboard/update_bug_with_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698