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 ...@@ -310,17 +310,29 @@ def overview_console_view(*, name, top_level_ordering, branch_selector = branche
top_level_ordering = top_level_ordering, 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. """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 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. for more details on the arguments.
Args: 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 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 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 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. category - The category of the builder in the console.
short_name - The short name 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 ...@@ -330,6 +342,7 @@ def console_view_entry(*, console_view = None, category = None, short_name = Non
builder. builder.
""" """
return struct( return struct(
branch_selector = branch_selector,
console_view = console_view, console_view = console_view,
category = category, category = category,
short_name = short_name, short_name = short_name,
...@@ -354,16 +367,19 @@ def ci_builder( ...@@ -354,16 +367,19 @@ def ci_builder(
branch_selector - A branch selector value controlling whether the branch_selector - A branch selector value controlling whether the
builder definition is executed. See branches.star for more builder definition is executed. See branches.star for more
information. information.
console_view_entry - A structure providing the details of the entry console_view_entry - A `ci.console_view_entry` struct or a list of
to add to the console view. See `ci.console_view_entry` for details. 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 main_console_view - A string identifying the ID of the main console
view to add an entry to. Supports a module-level default that view to add an entry to. Supports a module-level default that
defaults to None. An entry will be added only if 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 cq_mirrors_console_view - A string identifying the ID of the CQ
mirrors console view to add an entry to. Supports a module-level mirrors console view to add an entry to. Supports a module-level
default that defaults to None. An entry will be added only if 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 tree_closing - If true, failed builds from this builder that meet certain
criteria will close the tree and email the sheriff. See the criteria will close the tree and email the sheriff. See the
'chromium-tree-closer' config in notifiers.star for the full criteria. 'chromium-tree-closer' config in notifiers.star for the full criteria.
...@@ -417,46 +433,65 @@ def ci_builder( ...@@ -417,46 +433,65 @@ def ci_builder(
) )
if console_view_entry: if console_view_entry:
console_view = console_view_entry.console_view if type(console_view_entry) == type(struct()):
if console_view == None: entries = [console_view_entry]
console_view = defaults.get_value_from_kwargs("builder_group", kwargs) else:
if not console_view: entries = console_view_entry
fail("Builder does not have builder group and " + entries_without_console_view = [
"console_view_entry does not have console view: {}" e
.format(console_view_entry)) for e in entries
if e.console_view == None
builder = "{}/{}".format(bucket, name) ]
if len(entries_without_console_view) > 1:
luci.console_view_entry( fail("Multiple entries provided without console_view: {}"
builder = builder, .format(entries_without_console_view))
console_view = console_view,
category = console_view_entry.category, for idx, entry in enumerate(entries):
short_name = console_view_entry.short_name, 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( luci.console_view_entry(
builder = builder, builder = builder,
console_view = main_console_view, console_view = console_view,
category = overview_console_category, category = entry.category,
short_name = console_view_entry.short_name, short_name = entry.short_name,
) )
cq_mirrors_console_view = defaults.get_value( if idx > 0:
"cq_mirrors_console_view", continue
cq_mirrors_console_view,
) overview_console_category = console_view
if cq_mirrors_console_view: if entry.category:
luci.console_view_entry( overview_console_category = "|".join([console_view, entry.category])
builder = builder, main_console_view = defaults.get_value("main_console_view", main_console_view)
console_view = cq_mirrors_console_view, if main_console_view:
category = overview_console_category, luci.console_view_entry(
short_name = console_view_entry.short_name, 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( def android_builder(
*, *,
......
Definitions of LUCI entities that test the chromium/src codebase. 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 * 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 * 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 * fallback-cq.star - generator that sets up a do-nothing fallback CQ
......
...@@ -359,6 +359,17 @@ ci.console_view( ...@@ -359,6 +359,17 @@ ci.console_view(
header = None, 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 # The chromium.clang console includes some entries for builders from the chrome project
[branches.console_view_entry( [branches.console_view_entry(
builder = "chrome:ci/{}".format(name), builder = "chrome:ci/{}".format(name),
...@@ -3168,28 +3179,52 @@ ci.fyi_ios_builder( ...@@ -3168,28 +3179,52 @@ ci.fyi_ios_builder(
ci.fyi_ios_builder( ci.fyi_ios_builder(
name = "ios13-beta-simulator", name = "ios13-beta-simulator",
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "iOS|iOS13", ci.console_view_entry(
short_name = "ios13", 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 * * *", schedule = "0 0,12 * * *",
triggered_by = [], triggered_by = [],
) )
ci.fyi_ios_builder( ci.fyi_ios_builder(
name = "ios13-sdk-device", name = "ios13-sdk-device",
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "iOS|iOS13", ci.console_view_entry(
short_name = "dev", 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( ci.fyi_ios_builder(
name = "ios13-sdk-simulator", name = "ios13-sdk-simulator",
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "iOS|iOS13", ci.console_view_entry(
short_name = "sdk13", 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 * * *", schedule = "0 6,18 * * *",
triggered_by = [], triggered_by = [],
) )
...@@ -4649,10 +4684,18 @@ ci.thin_tester( ...@@ -4649,10 +4684,18 @@ ci.thin_tester(
ci.mac_ios_builder( ci.mac_ios_builder(
name = "ios-device", name = "ios-device",
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "ios|default", ci.console_view_entry(
short_name = "dev", 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 # We don't have necessary capacity to run this configuration in CQ, but it
# is part of the main waterfall # is part of the main waterfall
main_console_view = "main", main_console_view = "main",
...@@ -4661,10 +4704,18 @@ ci.mac_ios_builder( ...@@ -4661,10 +4704,18 @@ ci.mac_ios_builder(
ci.mac_ios_builder( ci.mac_ios_builder(
name = "ios-simulator", name = "ios-simulator",
branch_selector = branches.STANDARD_MILESTONE, branch_selector = branches.STANDARD_MILESTONE,
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "ios|default", ci.console_view_entry(
short_name = "sim", 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", cq_mirrors_console_view = "mirrors",
main_console_view = "main", main_console_view = "main",
) )
...@@ -4672,20 +4723,36 @@ ci.mac_ios_builder( ...@@ -4672,20 +4723,36 @@ ci.mac_ios_builder(
ci.mac_ios_builder( ci.mac_ios_builder(
name = "ios-simulator-full-configs", name = "ios-simulator-full-configs",
branch_selector = branches.STANDARD_MILESTONE, branch_selector = branches.STANDARD_MILESTONE,
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "ios|default", ci.console_view_entry(
short_name = "ful", 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", cq_mirrors_console_view = "mirrors",
main_console_view = "main", main_console_view = "main",
) )
ci.mac_ios_builder( ci.mac_ios_builder(
name = "ios-simulator-noncq", name = "ios-simulator-noncq",
console_view_entry = ci.console_view_entry( console_view_entry = [
category = "ios|default", ci.console_view_entry(
short_name = "non", 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 # We don't have necessary capacity to run this configuration in CQ, but it
# is part of the main waterfall # is part of the main waterfall
main_console_view = "main", 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") ...@@ -31,6 +31,4 @@ exec("./swangle.try.star")
# source = "chromium-m86:try", # source = "chromium-m86:try",
# ) # )
branches.exec("./consoles/sheriff.ios.star")
branches.exec("./fallback-cq.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