Bug 1286075: if <kind>/kind.yml doesn't exist, skip it; r=gps draft
authorDustin J. Mitchell <dustin@mozilla.com>
Thu, 18 Aug 2016 20:08:22 +0000
changeset 412725 58f1debe5219fc52ead2971718da932b63bb06d7
parent 412724 7ee2444782b1354d5a4edcfc55c3044b292fcc46
child 412726 efd297d37bd49dbe655266380641abc258dda725
push id29252
push userdmitchell@mozilla.com
push dateMon, 12 Sep 2016 19:16:39 +0000
reviewersgps
bugs1286075
milestone51.0a1
Bug 1286075: if <kind>/kind.yml doesn't exist, skip it; r=gps Version control tends to leave kind directories around containing .orig files or other such detritus. It's best to just ignore such directories, rather than failing to generate the taskgraph. MozReview-Commit-ID: B9GIZndbfi1
taskcluster/taskgraph/generator.py
--- a/taskcluster/taskgraph/generator.py
+++ b/taskcluster/taskgraph/generator.py
@@ -133,19 +133,22 @@ class TaskGraphGenerator(object):
         return self._run_until('label_to_taskid')
 
     def _load_kinds(self):
         for path in os.listdir(self.root_dir):
             path = os.path.join(self.root_dir, path)
             if not os.path.isdir(path):
                 continue
             kind_name = os.path.basename(path)
-            logger.debug("loading kind `{}` from `{}`".format(kind_name, path))
 
             kind_yml = os.path.join(path, 'kind.yml')
+            if not os.path.exists(kind_yml):
+                continue
+
+            logger.debug("loading kind `{}` from `{}`".format(kind_name, path))
             with open(kind_yml) as f:
                 config = yaml.load(f)
 
             yield Kind(kind_name, path, config)
 
     def _run(self):
         logger.info("Loading kinds")
         # put the kinds into a graph and sort topologically so that kinds are loaded