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

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: 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 raise 722 raise
723 except socket.error as e: 723 except socket.error as e:
724 # Temporary AppEngine hiccup. Just log it and return failure. 724 # Temporary AppEngine hiccup. Just log it and return failure.
725 if e.errno == errno.ECONNRESET: 725 if e.errno == errno.ECONNRESET:
726 logging.warning( 726 logging.warning(
727 '%s while updating tryserver status for rietveld issue %s.' % ( 727 '%s while updating tryserver status for rietveld issue %s.' % (
728 str(e), str(pending.issue))) 728 str(e), str(pending.issue)))
729 return False 729 return False
730 else: 730 else:
731 raise 731 raise
732 except urllib2.URLError as e:
Paweł Hajdan Jr. 2014/01/28 01:26:29 Let's just put it right below urllib2.HTTPError.
733 if 'timed out' in e.reason:
734 # Handle timeouts gracefully.
735 logging.warning('%s while updating tryserver status for '
736 +'rietveld issue %s', e, pending.issue)
Paweł Hajdan Jr. 2014/01/28 01:26:29 nit: Add space after +. Actually the + should not
737 return False
738 else:
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