Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # coding=utf8 | 1 # coding=utf8 |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 """Sends patches to the Try server and reads back results. | 5 """Sends patches to the Try server and reads back results. |
| 6 | 6 |
| 7 - RietveldTryJobs contains RietveldTryJob, one per try job on a builder. | 7 - RietveldTryJobs contains RietveldTryJob, one per try job on a builder. |
| 8 - TryRunnerRietveld uses Rietveld to signal and poll job results. | 8 - TryRunnerRietveld uses Rietveld to signal and poll job results. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 | 718 |
| 719 # Update the RietvedTryJobs object. | 719 # Update the RietvedTryJobs object. |
| 720 keys = jobs.update_jobs_from_rietveld( | 720 keys = jobs.update_jobs_from_rietveld( |
| 721 data, | 721 data, |
| 722 status, | 722 status, |
| 723 self.context.checkout, | 723 self.context.checkout, |
| 724 now) | 724 now) |
| 725 except urllib2.HTTPError as e: | 725 except urllib2.HTTPError as e: |
| 726 if e.code in (500, 502, 503): | 726 if e.code in (500, 502, 503): |
| 727 # Temporary AppEngine hiccup. Just log it and return failure. | 727 # Temporary AppEngine hiccup. Just log it and return failure. |
| 728 logging.warning(str(e)) | 728 logging.warning('%s while accessing %s. Ignoring error.' % ( |
| 729 str(e), e.url)) | |
| 729 return False | 730 return False |
| 730 else: | 731 else: |
| 731 raise | 732 raise |
| 732 except socket.error as e: | 733 except socket.error as e: |
| 733 # Temporary AppEngine hiccup. Just log it and return failure. | 734 # Temporary AppEngine hiccup. Just log it and return failure. |
| 734 if e.errno == errno.ECONNRESET: | 735 if e.errno == errno.ECONNRESET: |
| 735 logging.warning(str(e)) | 736 logging.warning( |
| 737 '%s while updating tryserver status for rietveld issue %s.' % ( | |
| 738 str(e), str(pending.issue))) | |
|
cmp
2013/11/27 22:17:16
let's add e.url to the message here, too
| |
| 736 return False | 739 return False |
| 737 else: | 740 else: |
| 738 raise | 741 raise |
| 739 except IOError as e: | 742 except IOError as e: |
| 740 # Temporary AppEngine hiccup. Just log it and return failure. | 743 # Temporary AppEngine hiccup. Just log it and return failure. |
| 741 if e.errno == 'socket error': | 744 if e.errno == 'socket error': |
| 742 logging.warning(str(e)) | 745 logging.warning( |
| 746 '%s while updating tryserver status for rietveld issue %s.' % ( | |
| 747 str(e), str(pending.issue))) | |
|
cmp
2013/11/27 22:17:16
let's add e.url to the message here, too
| |
| 743 return False | 748 return False |
| 744 raise | 749 raise |
| 745 if handle: | 750 if handle: |
| 746 for updated_key in keys: | 751 for updated_key in keys: |
| 747 job = jobs.try_jobs[updated_key] | 752 job = jobs.try_jobs[updated_key] |
| 748 self._update_dashboard(pending, job, status) | 753 self._update_dashboard(pending, job, status) |
| 749 jobs.signal_as_failed_if_needed(job, self._build_status_url(job), now) | 754 jobs.signal_as_failed_if_needed(job, self._build_status_url(job), now) |
| 750 | 755 |
| 751 return True | 756 return True |
| OLD | NEW |