Bug 1364650 - retry on ChunkedEncodingError; r?gps draft
authorRok Garbas <rok@garbas.si>
Thu, 06 Jul 2017 10:20:12 +0200
changeset 604665 f42126c977df1215babb9029a68ae3f691e493a0
parent 604481 af0466865a212c84fbbab343c9cbb984c6132920
child 636264 ff6a8024aa4c9899845874781bd6fdca46cee3c3
push id67157
push userrgarbas@mozilla.com
push dateThu, 06 Jul 2017 08:34:56 +0000
reviewersgps
bugs1364650, 1364695, 1371140
milestone56.0a1
Bug 1364650 - retry on ChunkedEncodingError; r?gps As done with ConnectionError in Bug 1364695, we should also retry on ChunkedEncodingError. This should also fix Bug 1371140. MozReview-Commit-ID: 5pocA7qJNCM
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1832,16 +1832,17 @@ class PackageFrontend(MachCommandBase):
                      'Downloading {name}')
             valid = False
             # sleeptime is 60 per retry.py, used by tooltool_wrapper.sh
             for attempt, _ in enumerate(redo.retrier(attempts=retry+1,
                                                      sleeptime=60)):
                 try:
                     record.fetch_with(cache)
                 except (requests.exceptions.HTTPError,
+                        requests.exceptions.ChunkedEncodingError,
                         requests.exceptions.ConnectionError) as e:
 
                     if isinstance(e, requests.exceptions.ConnectionError):
                         should_retry = True
                     else:
                         # The relengapi proxy likes to return error 400 bad request
                         # which seems improbably to be due to our (simple) GET
                         # being borked.