Bug 1386857 - [taskgraph] Add path of offending config file to the UNKNOWN_GROUP_NAME error message, r=dustin

When trying to remove an ubiquitous group like tc(), it's hard to tell where the
error was located without grepping my filesystem. This makes it a bit easier to
find and fix these errors.

MozReview-Commit-ID: 8NjvB5zOoqb
This commit is contained in:
Andrew Halberstadt
2018-01-12 15:49:27 -05:00
parent 702078458f
commit 6023d4c291
2 changed files with 5 additions and 2 deletions

View File

@@ -589,7 +589,8 @@ TC_TREEHERDER_SCHEMA_URL = 'https://github.com/taskcluster/taskcluster-treeherde
'blob/master/schemas/task-treeherder-config.yml'
UNKNOWN_GROUP_NAME = "Treeherder group {} has no name; add it to taskcluster/ci/config.yml"
UNKNOWN_GROUP_NAME = "Treeherder group {} (from {}) has no name; " \
"add it to taskcluster/ci/config.yml"
V2_ROUTE_TEMPLATES = [
"index.{trust-domain}.v2.{project}.latest.{product}.{job-name}",
@@ -1396,7 +1397,8 @@ def build_task(config, tasks):
if groupSymbol != '?':
treeherder['groupSymbol'] = groupSymbol
if groupSymbol not in group_names:
raise Exception(UNKNOWN_GROUP_NAME.format(groupSymbol))
path = os.path.join(config.path, task.get('job-from', ''))
raise Exception(UNKNOWN_GROUP_NAME.format(groupSymbol, path))
treeherder['groupName'] = group_names[groupSymbol]
treeherder['symbol'] = symbol
if len(symbol) > 25 or len(groupSymbol) > 25: