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

Unified Diff: commit-queue/pending_manager.py

Issue 62273005: CQ: catch more exceptions when looking for new pending changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: commit-queue/pending_manager.py
===================================================================
--- commit-queue/pending_manager.py (revision 235481)
+++ commit-queue/pending_manager.py (working copy)
@@ -13,8 +13,11 @@
- SVN will check the committer write access.
"""
+import errno
import logging
import os
+import socket
+import ssl
import time
import traceback
import urllib2
@@ -23,7 +26,6 @@
import checkout
import git_cl
import patch
-import ssl
import subprocess2
import errors
@@ -193,8 +195,33 @@
# Find new issues.
for issue_id in new_issues:
if str(issue_id) not in self.queue.pending_commits:
- issue_data = self.context.rietveld.get_issue_properties(
- issue_id, True)
+ try:
+ issue_data = self.context.rietveld.get_issue_properties(
+ issue_id, True)
+ except urllib2.HTTPError as e:
+ if e.code in (500, 502, 503):
+ # Temporary AppEngine hiccup. Just log it and continue.
+ logging.warning(str(e))
Ryan Tseng 2013/11/16 01:38:37 logging.warning('%s while accessing %s. Ignoring
+ continue
+ raise
Ryan Tseng 2013/11/16 01:38:37 "raise e" so we can propagate this downstream. Al
+ except urllib2.URLError as e:
+ # Temporary AppEngine hiccup. Just log it and continue.
+ if 'timed out' in e.reason:
+ logging.warning(str(e))
Ryan Tseng 2013/11/16 01:38:37 Make this more verbose. '%s while accessing rietve
+ continue
+ raise
+ except socket.error as e:
+ # Temporary AppEngine hiccup. Just log it and continue.
+ if e.errno == errno.ECONNRESET:
+ logging.warning(str(e))
+ continue
+ raise
+ except IOError as e:
+ # Temporary AppEngine hiccup. Just log it and continue.
+ if e.errno == 'socket error':
+ logging.warning(str(e))
+ continue
+ raise
# This assumption needs to hold.
assert issue_id == issue_data['issue']
if issue_data['patchsets'] and issue_data['commit']:
« 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