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

Side by Side Diff: verification/try_job_on_rietveld.py

Issue 144343006: Handle URLError timeout from Rietveld (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Changes in response to comments Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 self.context.checkout, 713 self.context.checkout,
714 now) 714 now)
715 except urllib2.HTTPError as e: 715 except urllib2.HTTPError as e:
716 if e.code in (500, 502, 503): 716 if e.code in (500, 502, 503):
717 # Temporary AppEngine hiccup. Just log it and return failure. 717 # Temporary AppEngine hiccup. Just log it and return failure.
718 logging.warning('%s while accessing %s. Ignoring error.' % ( 718 logging.warning('%s while accessing %s. Ignoring error.' % (
719 str(e), e.url)) 719 str(e), e.url))
720 return False 720 return False
721 else: 721 else:
722 raise 722 raise
723 except urllib2.URLError as e:
724 if 'timed out' in e.reason:
725 # Handle timeouts gracefully.
726 logging.warning('%s while updating tryserver status for '
727 'rietveld issue %s', e, pending.issue)
728 return False
729 else:
730 raise
723 except socket.error as e: 731 except socket.error as e:
724 # Temporary AppEngine hiccup. Just log it and return failure. 732 # Temporary AppEngine hiccup. Just log it and return failure.
725 if e.errno == errno.ECONNRESET: 733 if e.errno == errno.ECONNRESET:
726 logging.warning( 734 logging.warning(
727 '%s while updating tryserver status for rietveld issue %s.' % ( 735 '%s while updating tryserver status for rietveld issue %s.' % (
728 str(e), str(pending.issue))) 736 str(e), str(pending.issue)))
729 return False 737 return False
730 else: 738 else:
731 raise 739 raise
732 except IOError as e: 740 except IOError as e:
733 # Temporary AppEngine hiccup. Just log it and return failure. 741 # Temporary AppEngine hiccup. Just log it and return failure.
734 if e.errno == 'socket error': 742 if e.errno == 'socket error':
735 logging.warning( 743 logging.warning(
736 '%s while updating tryserver status for rietveld issue %s.' % ( 744 '%s while updating tryserver status for rietveld issue %s.' % (
737 str(e), str(pending.issue))) 745 str(e), str(pending.issue)))
738 return False 746 return False
739 raise 747 raise
748
740 if handle: 749 if handle:
741 for updated_key in keys: 750 for updated_key in keys:
742 job = jobs.try_jobs[updated_key] 751 job = jobs.try_jobs[updated_key]
743 self._update_dashboard(pending, job) 752 self._update_dashboard(pending, job)
744 jobs.signal_as_failed_if_needed(job, self._build_status_url(job), now) 753 jobs.signal_as_failed_if_needed(job, self._build_status_url(job), now)
745 754
746 return True 755 return True
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698