mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Reduce retries in gclient_utils
There are other retries (e.g. in git wrapper, gclient_scm) so we shouldn't be retrying that much in gclient_utils. In ideal case, we have a dedicated place where retries are determined, and we make a retry decision based on stderr / exit code. R=jojwang@google.com Bug: 1359109 Change-Id: I97daa0d991a7294635e54b7a3d85a349c03c04c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3871979 Commit-Queue: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Joanna Wang <jojwang@chromium.org>
This commit is contained in:
@@ -39,8 +39,11 @@ else:
|
|||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
|
|
||||||
|
|
||||||
RETRY_MAX = 3
|
# Git wrapper retries on a transient error, and some callees do retries too,
|
||||||
RETRY_INITIAL_SLEEP = 0.5
|
# such as GitWrapper.update (doing clone). One retry attempt should be
|
||||||
|
# sufficient to help with any transient errors at this level.
|
||||||
|
RETRY_MAX = 1
|
||||||
|
RETRY_INITIAL_SLEEP = 2 # in seconds
|
||||||
START = datetime.datetime.now()
|
START = datetime.datetime.now()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class CheckCallAndFilterTestCase(unittest.TestCase):
|
|||||||
'allo',
|
'allo',
|
||||||
'addb',
|
'addb',
|
||||||
'✔',
|
'✔',
|
||||||
'________ running \'boo foo bar\' in \'bleh\' attempt 2 / 4\n',
|
'________ running \'boo foo bar\' in \'bleh\' attempt 2 / 2\n',
|
||||||
'ahah',
|
'ahah',
|
||||||
'accb',
|
'accb',
|
||||||
'allo',
|
'allo',
|
||||||
|
|||||||
Reference in New Issue
Block a user