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

Issue 2362993002: More strategic retries in fetch. (Closed)

Created:
4 years, 3 months ago by dnj
Modified:
4 years, 3 months ago
Reviewers:
iannucci, martiniss
CC:
chromium-reviews, infra-reviews+recipes-py_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

More strategic retries in fetch. Define a generic conditional exponential backoff retry decorator. Reimplement the content in fetch to use this decorator instead of "_retry". Move decorator usage to the specific site of retryable failure and only retry known-retryable errors so we don't waste time on failures. This also adds a retry to Gitiles JSON fetching and a unit test to assert that this retry logic works successfully. Defines GitilesFetchError, which includes the status code and error text ain the output message. BUG=chromium:649529, chromium:649466 TEST=unit Committed: https://github.com/luci/recipes-py/commit/044dba0634a396fd78f97f0f633136420780fc37

Patch Set 1 #

Total comments: 6

Patch Set 2 : More strategic retries in fetch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -44 lines) Patch
M recipe_engine/fetch.py View 1 12 chunks +68 lines, -37 lines 0 comments Download
M recipe_engine/unittests/fetch_test.py View 5 chunks +59 lines, -7 lines 0 comments Download
M recipe_engine/util.py View 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
dnj
PTAL https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py File recipe_engine/fetch.py (right): https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py#newcode57 recipe_engine/fetch.py:57: @staticmethod This was a pylint failure b/c it's ...
4 years, 3 months ago (2016-09-23 00:42:46 UTC) #2
martiniss
looks great, thanks for doing this :) https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py File recipe_engine/fetch.py (right): https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py#newcode171 recipe_engine/fetch.py:171: """Returns (bool): ...
4 years, 3 months ago (2016-09-23 00:49:50 UTC) #4
dnj
https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py File recipe_engine/fetch.py (right): https://codereview.chromium.org/2362993002/diff/1/recipe_engine/fetch.py#newcode171 recipe_engine/fetch.py:171: """Returns (bool): True "e" is a GitilesFetchError with transient ...
4 years, 3 months ago (2016-09-23 01:40:55 UTC) #6
martiniss
lgtm
4 years, 3 months ago (2016-09-23 01:45:39 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362993002/20001
4 years, 3 months ago (2016-09-23 01:50:34 UTC) #9
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 01:53:12 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://github.com/luci/recipes-py/commit/044dba0634a396fd78f97f0f63313642078...

Powered by Google App Engine
This is Rietveld 408576698