Bug 1305775 - Output more metadata about files fetched to increase debuggability. r=ted
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Tue, 27 Sep 2016 13:37:18 -0400
changeset 315368 e709712a33e7bdfd8f8e8a6cb82b200f95b8b285
parent 315367 50143dbdcb47bf47c8827c8777b0e11e92e25418
child 315369 1b79b95e1f3bd549bbc0644b4347c6a5b4a63168
push id30748
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:53:19 +0000
treeherdermozilla-central@8c84b7618840 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1305775, 1305752
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1305775 - Output more metadata about files fetched to increase debuggability. r=ted In bug 1305752 we discovered that we download a zip file into memory without any issues, however, when we tried to unzip we discovered that we have an invalid zip file. The information in the logs is not sufficient to determine what could be the root issue. MozReview-Commit-ID: DKwDUCmUhFF
testing/mozharness/mozharness/base/script.py
--- a/testing/mozharness/mozharness/base/script.py
+++ b/testing/mozharness/mozharness/base/script.py
@@ -389,17 +389,19 @@ class ScriptMixin(PlatformMixin):
         # Bug 1301807 - BadStatusLine: ''
         response = urllib2.urlopen(request)
 
         if parsed_url.scheme in ('http', 'https'):
             expected_file_size = int(response.headers.get('Content-Length'))
 
         self.info('Expected file size: {}'.format(expected_file_size))
         self.debug('Url: {}'.format(url))
-        self.debug('Content-Encoding {}'.format(response.headers.get('Content-Encoding')))
+        self.info('Content-Encoding {}'.format(response.headers.get('Content-Encoding')))
+        self.info('Content-Type {}'.format(response.headers.get('Content-Type')))
+        self.info('Http code {}'.format(response.getcode()))
 
         file_contents = response.read()
         obtained_file_size = len(file_contents)
 
         if obtained_file_size != expected_file_size:
             raise FetchedIncorrectFilesize(
                 'The expected file size is {} while we got instead {}'.format(
                     expected_file_size, obtained_file_size)