Commit b93a7df2 authored by Garrett Beaty's avatar Garrett Beaty Committed by Chromium LUCI CQ

Define the sheriff.ios console entries at the builders.

This adds support for providing multiple console_view_entry values in
ci.builder.

Change-Id: Ia936e903a139e855fbdb14ca452a176225c56317
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585446
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: default avatarStephen Martinis <martiniss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835832}
parent 932e5c13
......@@ -310,17 +310,29 @@ def overview_console_view(*, name, top_level_ordering, branch_selector = branche
top_level_ordering = top_level_ordering,
)
def console_view_entry(*, console_view = None, category = None, short_name = None):
def console_view_entry(
*,
branch_selector = branches.ALL_BRANCHES,
console_view = None,
category = None,
short_name = None):
"""Specifies the details of a console view entry.
See https://chromium.googlesource.com/infra/luci/luci-go/+/refs/heads/master/lucicfg/doc/README.md#luci.console_view_entry
for more details on the arguments.
Args:
branch_selector - A branch selector value controlling whether
console view entry definition is executed. The console view
entry is only defined if the associated builder is defined based
on its branch selector value. By default, the console view entry
will be defined whenever the associated builder is defined. See
branches.star for more information.
console_view - The console view to add an entry for the associated
builder to. By default, the entry will be for a console with the
same name as the builder's builder group, which the builder must
have.
have. At most one `console_view_entry` for a builder can omit
the `console_view` value.
category - The category of the builder in the console.
short_name - The short name of the builder in the console.
......@@ -330,6 +342,7 @@ def console_view_entry(*, console_view = None, category = None, short_name = Non
builder.
"""
return struct(
branch_selector = branch_selector,
console_view = console_view,
category = category,
short_name = short_name,
......@@ -354,16 +367,19 @@ def ci_builder(
branch_selector - A branch selector value controlling whether the
builder definition is executed. See branches.star for more
information.
console_view_entry - A structure providing the details of the entry
to add to the console view. See `ci.console_view_entry` for details.
console_view_entry - A `ci.console_view_entry` struct or a list of
them describing console view entries to create for the builder.
See `ci.console_view_entry` for details.
main_console_view - A string identifying the ID of the main console
view to add an entry to. Supports a module-level default that
defaults to None. An entry will be added only if
`console_view_entry` is provided.
`console_view_entry` is provided and the first entry's branch
selector causes the entry to be defined.
cq_mirrors_console_view - A string identifying the ID of the CQ
mirrors console view to add an entry to. Supports a module-level
default that defaults to None. An entry will be added only if
`console_view_entry` is provided.
`console_view_entry` is provided and the first entry's branch
selector causes the entry to be defined.
tree_closing - If true, failed builds from this builder that meet certain
criteria will close the tree and email the sheriff. See the
'chromium-tree-closer' config in notifiers.star for the full criteria.
......@@ -417,46 +433,65 @@ def ci_builder(
)
if console_view_entry:
console_view = console_view_entry.console_view
if console_view == None:
console_view = defaults.get_value_from_kwargs("builder_group", kwargs)
if not console_view:
fail("Builder does not have builder group and " +
"console_view_entry does not have console view: {}"
.format(console_view_entry))
builder = "{}/{}".format(bucket, name)
luci.console_view_entry(
builder = builder,
console_view = console_view,
category = console_view_entry.category,
short_name = console_view_entry.short_name,
)
if type(console_view_entry) == type(struct()):
entries = [console_view_entry]
else:
entries = console_view_entry
entries_without_console_view = [
e
for e in entries
if e.console_view == None
]
if len(entries_without_console_view) > 1:
fail("Multiple entries provided without console_view: {}"
.format(entries_without_console_view))
for idx, entry in enumerate(entries):
if not branches.matches(entry.branch_selector):
continue
console_view = entry.console_view
if console_view == None:
console_view = defaults.get_value_from_kwargs("builder_group", kwargs)
if not console_view:
fail("Builder does not have builder group and " +
"console_view_entry does not have console view: {}".format(entry))
builder = "{}/{}".format(bucket, name)
overview_console_category = console_view
if console_view_entry.category:
overview_console_category = "|".join([console_view, console_view_entry.category])
main_console_view = defaults.get_value("main_console_view", main_console_view)
if main_console_view:
luci.console_view_entry(
builder = builder,
console_view = main_console_view,
category = overview_console_category,
short_name = console_view_entry.short_name,
console_view = console_view,
category = entry.category,
short_name = entry.short_name,
)
cq_mirrors_console_view = defaults.get_value(
"cq_mirrors_console_view",
cq_mirrors_console_view,
)
if cq_mirrors_console_view:
luci.console_view_entry(
builder = builder,
console_view = cq_mirrors_console_view,
category = overview_console_category,
short_name = console_view_entry.short_name,
if idx > 0:
continue
overview_console_category = console_view
if entry.category:
overview_console_category = "|".join([console_view, entry.category])
main_console_view = defaults.get_value("main_console_view", main_console_view)
if main_console_view:
luci.console_view_entry(
builder = builder,
console_view = main_console_view,
category = overview_console_category,
short_name = entry.short_name,
)
cq_mirrors_console_view = defaults.get_value(
"cq_mirrors_console_view",
cq_mirrors_console_view,
)
if cq_mirrors_console_view:
luci.console_view_entry(
builder = builder,
console_view = cq_mirrors_console_view,
category = overview_console_category,
short_name = entry.short_name,
)
def android_builder(
*,
......
Definitions of LUCI entities that test the chromium/src codebase.
* consoles - Manually curated consoles for chromium subproject builders.
* ci.star - builders that do post-submit testing against the master branch
* try.star, gpu.trystar, swangle.try.star - builders that do pre-submit testing
* fallback-cq.star - generator that sets up a do-nothing fallback CQ
......
......@@ -359,6 +359,17 @@ ci.console_view(
header = None,
)
ci.console_view(
name = "sheriff.ios",
title = "iOS Sheriff Console",
ordering = {
"*type*": ci.ordering(short_names = ["dev", "sim"]),
None: ["chromium.mac", "chromium.fyi"],
"chromium.mac": "*type*",
"chromium.fyi|13": "*type*",
},
)
# The chromium.clang console includes some entries for builders from the chrome project
[branches.console_view_entry(
builder = "chrome:ci/{}".format(name),
......@@ -3168,28 +3179,52 @@ ci.fyi_ios_builder(
ci.fyi_ios_builder(
name = "ios13-beta-simulator",
console_view_entry = ci.console_view_entry(
category = "iOS|iOS13",
short_name = "ios13",
),
console_view_entry = [
ci.console_view_entry(
category = "iOS|iOS13",
short_name = "ios13",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.fyi|13",
short_name = "ios13",
),
],
schedule = "0 0,12 * * *",
triggered_by = [],
)
ci.fyi_ios_builder(
name = "ios13-sdk-device",
console_view_entry = ci.console_view_entry(
category = "iOS|iOS13",
short_name = "dev",
),
console_view_entry = [
ci.console_view_entry(
category = "iOS|iOS13",
short_name = "dev",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.fyi|13",
short_name = "dev",
),
],
)
ci.fyi_ios_builder(
name = "ios13-sdk-simulator",
console_view_entry = ci.console_view_entry(
category = "iOS|iOS13",
short_name = "sdk13",
),
console_view_entry = [
ci.console_view_entry(
category = "iOS|iOS13",
short_name = "sdk13",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.fyi|13",
short_name = "sim",
),
],
schedule = "0 6,18 * * *",
triggered_by = [],
)
......@@ -4649,10 +4684,18 @@ ci.thin_tester(
ci.mac_ios_builder(
name = "ios-device",
console_view_entry = ci.console_view_entry(
category = "ios|default",
short_name = "dev",
),
console_view_entry = [
ci.console_view_entry(
category = "ios|default",
short_name = "dev",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.mac",
short_name = "dev",
),
],
# We don't have necessary capacity to run this configuration in CQ, but it
# is part of the main waterfall
main_console_view = "main",
......@@ -4661,10 +4704,18 @@ ci.mac_ios_builder(
ci.mac_ios_builder(
name = "ios-simulator",
branch_selector = branches.STANDARD_MILESTONE,
console_view_entry = ci.console_view_entry(
category = "ios|default",
short_name = "sim",
),
console_view_entry = [
ci.console_view_entry(
category = "ios|default",
short_name = "sim",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.mac",
short_name = "sim",
),
],
cq_mirrors_console_view = "mirrors",
main_console_view = "main",
)
......@@ -4672,20 +4723,36 @@ ci.mac_ios_builder(
ci.mac_ios_builder(
name = "ios-simulator-full-configs",
branch_selector = branches.STANDARD_MILESTONE,
console_view_entry = ci.console_view_entry(
category = "ios|default",
short_name = "ful",
),
console_view_entry = [
ci.console_view_entry(
category = "ios|default",
short_name = "ful",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.mac",
short_name = "ful",
),
],
cq_mirrors_console_view = "mirrors",
main_console_view = "main",
)
ci.mac_ios_builder(
name = "ios-simulator-noncq",
console_view_entry = ci.console_view_entry(
category = "ios|default",
short_name = "non",
),
console_view_entry = [
ci.console_view_entry(
category = "ios|default",
short_name = "non",
),
ci.console_view_entry(
branch_selector = branches.MAIN,
console_view = "sheriff.ios",
category = "chromium.mac",
short_name = "non",
),
],
# We don't have necessary capacity to run this configuration in CQ, but it
# is part of the main waterfall
main_console_view = "main",
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load("//console-header.star", "HEADER")
luci.console_view(
name = "sheriff.ios",
header = HEADER,
repo = "https://chromium.googlesource.com/chromium/src",
title = "iOS Sheriff Console",
entries = [
luci.console_view_entry(
builder = "ci/ios-device",
category = "chromium.mac",
short_name = "dev",
),
luci.console_view_entry(
builder = "ci/ios-simulator",
category = "chromium.mac",
short_name = "sim",
),
luci.console_view_entry(
builder = "ci/ios-simulator-full-configs",
category = "chromium.mac",
short_name = "ful",
),
luci.console_view_entry(
builder = "ci/ios-simulator-noncq",
category = "chromium.mac",
short_name = "non",
),
luci.console_view_entry(
builder = "ci/ios13-sdk-device",
category = "chromium.fyi|13",
short_name = "dev",
),
luci.console_view_entry(
builder = "ci/ios13-sdk-simulator",
category = "chromium.fyi|13",
short_name = "sim",
),
luci.console_view_entry(
builder = "ci/ios13-beta-simulator",
category = "chromium.fyi|13",
short_name = "ios13",
),
],
)
......@@ -31,6 +31,4 @@ exec("./swangle.try.star")
# source = "chromium-m86:try",
# )
branches.exec("./consoles/sheriff.ios.star")
branches.exec("./fallback-cq.star")
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