Bug 1303668 - Retry downloading symbols if we're expecting them. r=aki
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Mon, 03 Oct 2016 09:52:02 -0400
changeset 317124 df471131e1b68aadfdd7951776224c21142a37b8
parent 317123 52bba388b92a30b8c5ca203336561f02861ba3c2
child 317125 0adc3b879367014fb83e0aee9e5c0aa5ddb7e5e7
push id20681
push userphilringnalda@gmail.com
push dateSat, 08 Oct 2016 23:57:20 +0000
treeherderfx-team@7a7ba250bb2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1303668
milestone52.0a1
Bug 1303668 - Retry downloading symbols if we're expecting them. r=aki In the case for 'ondemand' symbols, we're OK to proceed without getting a hold of the symbols from the get go. However, in other cases we need to at least retry before giving up (e.g. debug tests need symbols) MozReview-Commit-ID: 7LHflKhpze3
testing/mozharness/mozharness/mozilla/testing/testbase.py
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -501,26 +501,37 @@ 2. running via buildbot and running the 
                                             file_name=file_name,
                                             parent_dir=dirs['abs_work_dir'],
                                             error_level=FATAL)
         self.installer_path = os.path.realpath(source)
         self.set_buildbot_property("build_url", self.installer_url, write_to_file=True)
 
     def _download_and_extract_symbols(self):
         dirs = self.query_abs_dirs()
-        self.symbols_url = self.query_symbols_url()
         if self.config.get('download_symbols') == 'ondemand':
+            self.symbols_url = self.query_symbols_url()
             self.symbols_path = self.symbols_url
             return
-        if not self.symbols_path:
-            self.symbols_path = os.path.join(dirs['abs_work_dir'], 'symbols')
 
-        self.set_buildbot_property("symbols_url", self.symbols_url,
-                                   write_to_file=True)
-        self.download_unpack(self.symbols_url, self.symbols_path)
+        else:
+            # In the case for 'ondemand', we're OK to proceed without getting a hold of the
+            # symbols right this moment, however, in other cases we need to at least retry
+            # before being unable to proceed (e.g. debug tests need symbols)
+            self.symbols_url = self.retry(
+                action=self.query_symbols_url,
+                sleeptime=20,
+                error_level=FATAL,
+                error_message="We can't proceed without downloading symbols.",
+            )
+            if not self.symbols_path:
+                self.symbols_path = os.path.join(dirs['abs_work_dir'], 'symbols')
+
+            self.set_buildbot_property("symbols_url", self.symbols_url,
+                                       write_to_file=True)
+            self.download_unpack(self.symbols_url, self.symbols_path)
 
     def download_and_extract(self, extract_dirs=None, suite_categories=None):
         """
         download and extract test zip / download installer
         """
         # Swap plain http for https when we're downloading from ftp
         # See bug 957502 and friends
         from_ = "http://ftp.mozilla.org"