Bug 1580996 - Make artifact builds fetch Android artifacts from `geckoview_example.apk`. r=froydnj
authorNick Alexander <nalexander@mozilla.com>
Tue, 17 Sep 2019 22:37:34 +0000
changeset 493645 a86b87abf6fdeaa74600b976874600faeed69495
parent 493644 c0db7327fb12f37b793ea273167ffd7d69cc4f7d
child 493646 de64ea5fc5c1e6bd29c0598d7191fc38c6e6a971
push id36585
push usermalexandru@mozilla.com
push dateWed, 18 Sep 2019 09:56:40 +0000
treeherdermozilla-central@e71921b729c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1580996
milestone71.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 1580996 - Make artifact builds fetch Android artifacts from `geckoview_example.apk`. r=froydnj The underlying native libraries are identical between Fennec and GeckoView example. This paves the way for removing Fennec entirely. At the same, remove the `.ini` extraction, which is no longer required. Differential Revision: https://phabricator.services.mozilla.com/D45769
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -307,22 +307,20 @@ class ArtifactJob(object):
             # without any of the path parts of the artifact, so we must inject
             # the desired `host/bin` prefix here.
             orig_basename = os.path.basename(filename).split('-', 1)[1]
             destpath = mozpath.join('host/bin', orig_basename)
             writer.add(destpath.encode('utf-8'), open(filename, 'rb'))
 
 
 class AndroidArtifactJob(ArtifactJob):
-    package_re = r'public/build/target\.apk'
+    package_re = r'public/build/geckoview_example\.apk'
     product = 'mobile'
 
     package_artifact_patterns = {
-        'application.ini',
-        'platform.ini',
         '**/*.so',
     }
 
     def process_package_artifact(self, filename, processed_filename):
         # Extract all .so files into the root, which will get copied into dist/bin.
         with JarWriter(file=processed_filename, compress_level=5) as writer:
             for p, f in UnpackFinder(JarFinder(filename, JarReader(filename))):
                 if not any(mozpath.match(p, pat) for pat in self.package_artifact_patterns):
@@ -373,24 +371,22 @@ class AndroidArtifactJob(ArtifactJob):
                            gzip.GzipFile(fileobj=reader[filename].uncompressed_data))
 
 
 class LinuxArtifactJob(ArtifactJob):
     package_re = r'public/build/target\.tar\.bz2'
     product = 'firefox'
 
     _package_artifact_patterns = {
-        '{product}/application.ini',
         '{product}/crashreporter',
         '{product}/dependentlibs.list',
         '{product}/{product}',
         '{product}/{product}-bin',
         '{product}/minidump-analyzer',
         '{product}/pingsender',
-        '{product}/platform.ini',
         '{product}/plugin-container',
         '{product}/updater',
         '{product}/**/*.so',
     }
 
     @property
     def package_artifact_patterns(self):
         return {
@@ -534,18 +530,16 @@ class MacArtifactJob(ArtifactJob):
 
 
 class WinArtifactJob(ArtifactJob):
     package_re = r'public/build/target\.(zip|tar\.gz)'
     product = 'firefox'
 
     _package_artifact_patterns = {
         '{product}/dependentlibs.list',
-        '{product}/platform.ini',
-        '{product}/application.ini',
         '{product}/**/*.dll',
         '{product}/*.exe',
         '{product}/*.tlb',
     }
 
     @property
     def package_artifact_patterns(self):
         return {
@@ -1039,19 +1033,16 @@ see https://developer.mozilla.org/en-US/
         try:
             taskId, artifacts = task_cache.artifacts(
                 tree, job, self._artifact_job.__class__, pushhead)
         except ValueError:
             return None
 
         urls = []
         for artifact_name in self._artifact_job.find_candidate_artifacts(artifacts):
-            # We can easily extract the task ID from the URL.  We can't easily
-            # extract the build ID; we use the .ini files embedded in the
-            # downloaded artifact for this.
             url = get_artifact_url(taskId, artifact_name)
             urls.append(url)
         if urls:
             self.log(logging.INFO, 'artifact',
                      {'pushhead': pushhead,
                       'tree': tree},
                      'Installing from remote pushhead {pushhead} on {tree}')
             return urls
@@ -1101,18 +1092,16 @@ see https://developer.mozilla.org/en-US/
         self._artifact_cache._persist_limit.register_file(processed_filename)
 
         self.log(logging.INFO, 'artifact',
                  {'processed_filename': processed_filename},
                  'Installing from processed {processed_filename}')
 
         with zipfile.ZipFile(processed_filename) as zf:
             for info in zf.infolist():
-                if info.filename.endswith('.ini'):
-                    continue
                 n = mozpath.join(distdir, info.filename)
                 fh = FileAvoidWrite(n, readmode='rb')
                 shutil.copyfileobj(zf.open(info), fh)
                 file_existed, file_updated = fh.close()
                 self.log(logging.INFO, 'artifact',
                          {'updating': 'Updating' if file_updated else 'Not updating',
                           'filename': n},
                          '{updating} {filename}')
@@ -1206,19 +1195,16 @@ see https://developer.mozilla.org/en-US/
         )]
         return self._install_from_hg_pushheads(pushheads, distdir)
 
     def install_from_task(self, taskId, distdir):
         artifacts = list_artifacts(taskId)
 
         urls = []
         for artifact_name in self._artifact_job.find_candidate_artifacts(artifacts):
-            # We can easily extract the task ID from the URL.  We can't easily
-            # extract the build ID; we use the .ini files embedded in the
-            # downloaded artifact for this.
             url = get_artifact_url(taskId, artifact_name)
             urls.append(url)
         if not urls:
             raise ValueError(
                 'Task {taskId} existed, but no artifacts found!'.format(taskId=taskId))
         for url in urls:
             if self.install_from_url(url, distdir):
                 return 1