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
--- 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