Bug 1519174 - Default to downloading latest m-c manifest if no commits are found, r=ato
authorJames Graham <james@hoppipolla.co.uk>
Fri, 11 Jan 2019 15:18:02 +0000
changeset 453483 e37abec79d0805045b52b41ca0cb3ee663ebce7f
parent 453482 c55708f479737050ecf8fb383001463493b3d012
child 453484 0b0fc6359576cdd592c2fac73a065225908e3fd4
push id35357
push usernerli@mozilla.com
push dateFri, 11 Jan 2019 21:54:07 +0000
treeherdermozilla-central@0ce024c91511 [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 - Default to downloading latest m-c manifest if no commits are found, r=ato Instead of defaulting to regenerating the manifest in this case default to downloading whatever the latest on central is. Depends on D16315 Differential Revision: https://phabricator.services.mozilla.com/D16316
testing/web-platform/manifestdownload.py
--- a/testing/web-platform/manifestdownload.py
+++ b/testing/web-platform/manifestdownload.py
@@ -40,17 +40,17 @@ def git_commits(repo_root):
 def get_commits(logger, repo_root):
     if vcs.Mercurial.is_hg_repo(repo_root):
         return hg_commits(repo_root)
 
     elif vcs.Git.is_git_repo(repo_root):
         return git_commits(repo_root)
 
     logger.warning("No VCS found")
-    return False
+    return []
 
 
 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))
@@ -113,18 +113,16 @@ def taskcluster_url(logger, commits):
 
 def download_manifest(logger, test_paths, commits_func, url_func, force=False):
     manifest_paths = [item["manifest_path"] for item in test_paths.itervalues()]
 
     if not force and not should_download(logger, manifest_paths):
         return True
 
     commits = commits_func()
-    if not commits:
-        return False
 
     url = url_func(logger, commits)
     if not url:
         logger.warning("No generated manifest found")
         return False
 
     logger.info("Downloading manifest from %s" % url)
     try: