Commit e8dabedb authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

luci-milo.cfg linter: Lint bot category, and check that each toplevel category...

luci-milo.cfg linter: Lint bot category, and check that each toplevel category on the main waterfall has a subwaterfall.

Also tweak a few categories to make main and subwaterfalls match.

Bug: none
Change-Id: I15ac12e6854be01af39da8869b87102ec17f305a
Reviewed-on: https://chromium-review.googlesource.com/c/1346731Reviewed-by: default avatarRyan Tseng <hinoka@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610112}
parent 8e4125b5
......@@ -24,14 +24,23 @@ def compare_builders(name, main_builders, sub_builders):
# are consistent with the builders on that subwaterfall's main page.
# For example, checks that the builders on the "chromium.win" section
# are the same as on the dedicated standalone chromium.win waterfall.
def to_list(builders):
def to_list(builders, category_prefix=''):
desc_list = []
for builder in builders:
desc_list.append('name: ' + ', '.join(builder.name))
# A bot with "chromium.win|foo|bar" on the main waterfall should have
# a category of "foo|bar" on the "chromium.win" subwaterfall.
category = builder.category
if category_prefix:
if category:
category = category_prefix + '|' + category
else:
category = category_prefix
desc_list.append('category: ' + category)
desc_list.append('short_name: ' + builder.short_name)
return desc_list
main_desc = to_list(main_builders)
sub_desc = to_list(sub_builders)
sub_desc = to_list(sub_builders, name)
if main_desc != sub_desc:
print ('bot lists different between main waterfall ' +
......@@ -59,6 +68,17 @@ def main():
subwaterfall = builder.category.split('|', 1)[0]
subwaterfalls[subwaterfall].append(builder)
# subwaterfalls contains the waterfalls referenced by the main console
# Check that every referenced subwaterfall has its own console.
all_console_names = set([console.id for console in project.consoles])
referenced_names = set(subwaterfalls.keys())
missing_names = referenced_names - all_console_names
if missing_names:
print 'Missing subwaterfall console for', missing_names
return 1
# Check that the bots on a subwaterfall match the corresponding bots on the
# main waterfall
all_good = True
for console in project.consoles:
if console.id in subwaterfalls:
......
......@@ -737,7 +737,7 @@ consoles {
}
builders {
name: "buildbucket/luci.chromium.ci/WebKit Mac10.13 (retina)"
category: "chromium.webkit|mac|release"
category: "chromium.webkit|mac"
short_name: "13r"
}
builders {
......@@ -1025,17 +1025,16 @@ consoles {
}
builders {
name: "buildbucket/luci.chromium.ci/linux-chromeos-dbg"
category: "debug"
short_name: "dbg"
}
builders {
name: "buildbucket/luci.chromium.ci/chromeos-amd64-generic-rel"
category: "simple"
category: "simple|release"
short_name: "x64"
}
builders {
name: "buildbucket/luci.chromium.ci/chromeos-daisy-rel"
category: "simple"
category: "simple|release"
short_name: "dsy"
}
}
......@@ -1081,13 +1080,13 @@ consoles {
builders {
name: "buildbot/chromium.memory/Mac ASan 64 Builder"
name: "buildbucket/luci.chromium.ci/Mac ASan 64 Builder"
category: "mac|asan"
category: "mac"
short_name: "bld"
}
builders {
name: "buildbot/chromium.memory/Mac ASan 64 Tests (1)"
name: "buildbucket/luci.chromium.ci/Mac ASan 64 Tests (1)"
category: "mac|asan"
category: "mac"
short_name: "tst"
}
builders {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment