Bump Gerrit fetch retry logic to 6 tries and 12s initial sleep
Upon Gerrit team's suggestion, up the retry time and number of retries
to handle increased replication delay.
Bug:b/285164390
Change-Id: If833ae9bb0f8c276b761970a8b5f96ec217d11b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4621268
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Gavin Mak <gavinmak@google.com>
diff --git a/gerrit_util.py b/gerrit_util.py
index 2ccc685..8312bba 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -44,10 +44,11 @@
from io import StringIO
LOGGER = logging.getLogger()
-# With a starting sleep time of 10.0 seconds, x <= [1.8-2.2]x backoff, and five
-# total tries, the sleep time between the first and last tries will be ~7 min.
-TRY_LIMIT = 5
-SLEEP_TIME = 10.0
+# With a starting sleep time of 12.0 seconds, x <= [1.8-2.2]x backoff, and six
+# total tries, the sleep time between the first and last tries will be ~6 min
+# (excluding time for each try).
+TRY_LIMIT = 6
+SLEEP_TIME = 12.0
MAX_BACKOFF = 2.2
MIN_BACKOFF = 1.8