Bug 1453056 - allow mach taskgraph runs locally with no network. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Wed, 23 May 2018 16:14:17 -0400
changeset 419648 cbf4d07d0e1412451c1c2543122212ea724d9233
parent 419647 a63414fd3bef8796c1bc9967ce0d8858b3382399
child 419649 6f7c84e815c0c2eef81ac9cf8f5fa94b5a416029
push id34041
push userebalazs@mozilla.com
push dateThu, 24 May 2018 09:38:21 +0000
treeherdermozilla-central@043e4ab6e724 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1453056
milestone62.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 1453056 - allow mach taskgraph runs locally with no network. r=ahal
taskcluster/taskgraph/util/perfile.py
--- a/taskcluster/taskgraph/util/perfile.py
+++ b/taskcluster/taskgraph/util/perfile.py
@@ -5,16 +5,17 @@
 from __future__ import absolute_import, print_function, unicode_literals
 
 import logging
 import math
 
 from mozbuild.util import memoize
 from mozpack.path import match as mozpackmatch
 from mozversioncontrol import get_repository_object, InvalidRepoPath
+from subprocess import CalledProcessError
 from taskgraph import files_changed
 from .. import GECKO
 
 logger = logging.getLogger(__name__)
 
 
 @memoize
 def perfile_number_of_chunks(try_task_config, head_repository, head_rev, type):
@@ -46,16 +47,18 @@ def perfile_number_of_chunks(try_task_co
     if try_task_config:
         specified_files = try_task_config.split(":")
 
     try:
         vcs = get_repository_object(GECKO)
         changed_files.update(vcs.get_outgoing_files('AM'))
     except InvalidRepoPath:
         vcs = None
+    except CalledProcessError:
+        return 0
 
     if not changed_files:
         changed_files.update(files_changed.get_changed_files(head_repository,
                                                              head_rev))
 
     changed_files.update(specified_files)
     test_count = 0
     for pattern in file_patterns: