Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 """A StatusReceiver module to warn committers about new failures introduced. | 5 """A StatusReceiver module to warn committers about new failures introduced. |
| 6 """ | 6 """ |
| 7 | 7 |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 from twisted.python import log | 10 from twisted.python import log |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 kwargs.setdefault('sendToInterestedUsers', True) | 29 kwargs.setdefault('sendToInterestedUsers', True) |
| 30 if not kwargs.get('minimum_delay_between_alert'): | 30 if not kwargs.get('minimum_delay_between_alert'): |
| 31 kwargs['minimum_delay_between_alert'] = 0 | 31 kwargs['minimum_delay_between_alert'] = 0 |
| 32 kwargs.setdefault( | 32 kwargs.setdefault( |
| 33 'status_header', | 33 'status_header', |
| 34 'Failure notification for "%(steps)s" on "%(builder)s".') | 34 'Failure notification for "%(steps)s" on "%(builder)s".') |
| 35 chromium_notifier.ChromiumNotifier.__init__(self, **kwargs) | 35 chromium_notifier.ChromiumNotifier.__init__(self, **kwargs) |
| 36 | 36 |
| 37 # TODO(timurrrr): Make recent_failures an optional argument. | 37 # TODO(timurrrr): Make recent_failures an optional argument. |
| 38 # We might want to use one history object for a few | 38 # We might want to use one history object for a few |
| 39 # FailuresNotifiers (e.g. "ordinary" bots + Webkit bots on Memory FYI) | 39 # FailuresNotifiers (e.g. "ordinary" bots + Webkit bots on Memory Full) |
|
Lei Zhang
2016/05/26 19:25:53
We don't have webkit bots anymore.
benwells
2016/05/31 08:22:37
OK ... I changed this comment to something that ho
| |
| 40 self.recent_failures = failures_history.FailuresHistory( | 40 self.recent_failures = failures_history.FailuresHistory( |
| 41 expiration_time=12*3600, size_limit=1000) | 41 expiration_time=12*3600, size_limit=1000) |
| 42 | 42 |
| 43 def isInterestingStep(self, build_status, step_status, results): | 43 def isInterestingStep(self, build_status, step_status, results): |
| 44 """Look at most cases that could make us ignore the step results. | 44 """Look at most cases that could make us ignore the step results. |
| 45 """ | 45 """ |
| 46 # If the base class thinks we're not interesting -> skip it. | 46 # If the base class thinks we're not interesting -> skip it. |
| 47 if not chromium_notifier.ChromiumNotifier.isInterestingStep( | 47 if not chromium_notifier.ChromiumNotifier.isInterestingStep( |
| 48 self, build_status, step_status, results): | 48 self, build_status, step_status, results): |
| 49 return False | 49 return False |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 return False | 102 return False |
| 103 | 103 |
| 104 if has_failures_to_report: | 104 if has_failures_to_report: |
| 105 log.msg('[failurenotifier] Decided to send a warning because of slave %s ' | 105 log.msg('[failurenotifier] Decided to send a warning because of slave %s ' |
| 106 'on revision %s' % (slave_name, str(latest_revision))) | 106 'on revision %s' % (slave_name, str(latest_revision))) |
| 107 return True | 107 return True |
| 108 else: | 108 else: |
| 109 log.msg('[failurenotifier] Slave %s revision %s has no interesting ' | 109 log.msg('[failurenotifier] Slave %s revision %s has no interesting ' |
| 110 'failures' % (slave_name, str(latest_revision))) | 110 'failures' % (slave_name, str(latest_revision))) |
| 111 return False | 111 return False |
| OLD | NEW |