Bug 1191051 - Use full 40 character hashes in |mach artifact|. r=gps
authorNick Alexander <nalexander@mozilla.com>
Tue, 04 Aug 2015 13:32:00 -0700
changeset 287805 41465ed1411f6dc02dec6ee3faa938f105821b56
parent 287804 0c15668d85fb91c8f9938fc15a8e473717871249
child 287806 20ced115bd640e06fbe9bc91e2e7219f683ae216
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1191051
milestone42.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 1191051 - Use full 40 character hashes in |mach artifact|. r=gps DONTBUILD NPOTB on a CLOSED TREE
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -201,19 +201,17 @@ class TaskCache(CacheManager):
         try:
             artifact_re = JOB_DETAILS[job]['re']
         except KeyError:
             self.log(logging.INFO, 'artifact',
                 {'job': job},
                 'Unknown job {job}')
             raise KeyError("Unknown job")
 
-        # Bug 1175655: it appears that the Task Cluster index only takes
-        # 12-char hex hashes.
-        key = '{rev}.{tree}.{job}'.format(rev=rev[:12], tree=tree, job=job)
+        key = '{rev}.{tree}.{job}'.format(rev=rev, tree=tree, job=job)
         try:
             namespace = 'buildbot.revisions.{key}'.format(key=key)
             task = self._index.findTask(namespace)
         except Exception:
             # Not all revisions correspond to pushes that produce the job we
             # care about; and even those that do may not have completed yet.
             raise ValueError('Task for {key} does not exist (yet)!'.format(key=key))
         taskId = task['taskId']
@@ -350,23 +348,29 @@ class Artifacts(object):
         self.log(logging.INFO, 'artifact',
             {'revset': revset},
             'Installing from {revset}')
 
         url = None
         with self._task_cache as task_cache, self._pushhead_cache as pushhead_cache:
             # with blocks handle handle persistence.
             for pushhead in pushhead_cache.pushheads(self._tree, revset):
+                self.log(logging.DEBUG, 'artifact',
+                    {'pushhead': pushhead},
+                    'Trying to find artifacts for pushhead {pushhead}.')
                 try:
                     url = task_cache.artifact_url(self._tree, self._job, pushhead)
                     break
                 except ValueError:
                     pass
         if url:
             return self.install_from_url(url, distdir)
+        self.log(logging.ERROR, 'artifact',
+                 {'revset': revset},
+                 'No built artifacts for {revset} found.')
         return 1
 
     def install_from(self, source, distdir):
         if source and os.path.isfile(source):
             return self.install_from_file(source, distdir)
         elif source and urlparse.urlparse(source).scheme:
             return self.install_from_url(source, distdir)
         else: