Bug 1519174 - Download wpt manifest if existing file is empty, r=ato
authorJames Graham <james@hoppipolla.co.uk>
Fri, 11 Jan 2019 15:18:20 +0000
changeset 513469 0b0fc6359576cdd592c2fac73a065225908e3fd4
parent 513468 e37abec79d0805045b52b41ca0cb3ee663ebce7f
child 513470 69cb7d6acb86156d05e9032cfde384b731bd796b
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1519174
milestone66.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 1519174 - Download wpt manifest if existing file is empty, r=ato This can happen if there's a problem writing the file. Depends on D16316 Differential Revision: https://phabricator.services.mozilla.com/D16317
testing/web-platform/manifestdownload.py
--- a/testing/web-platform/manifestdownload.py
+++ b/testing/web-platform/manifestdownload.py
@@ -51,16 +51,18 @@ def get_commits(logger, repo_root):
 def should_download(logger, manifest_paths, rebuild_time=timedelta(days=5)):
     # TODO: Improve logic for when to download. Maybe if x revisions behind?
     for manifest_path in manifest_paths:
         if not os.path.exists(manifest_path):
             return True
         mtime = datetime.fromtimestamp(os.path.getmtime(manifest_path))
         if mtime < datetime.now() - rebuild_time:
             return True
+        if os.path.getsize(manifest_path) == 0:
+            return True
 
     logger.info("Skipping manifest download because existing file is recent")
     return False
 
 
 def taskcluster_url(logger, commits):
     artifact_path = '/artifacts/public/manifests.tar.gz'