0

Update replacement header

Manual specify which rotations to include in the header so the internal
perf rotation can be included. Update the rotation to be a struct as
well so it's easy to discover the source of the console names

Bug: 40873502
Change-Id: Iaf38b0001cfbe26235617ce6123ed105f41ded4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309924
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Cr-Commit-Position: refs/heads/main@{#1427186}
This commit is contained in:
Struan Shrimpton
2025-03-03 09:41:25 -08:00
committed by Chromium LUCI CQ
parent cc0d7e738c
commit 73cdc43803
5 changed files with 1838 additions and 2552 deletions
infra/config

@ -3,7 +3,6 @@
# found in the LICENSE file.
load("//lib/branches.star", "branches")
load("//lib/builders.star", "builders")
load("//lib/headers.star", "headers")
load(".//project.star", "ACTIVE_MILESTONES", "settings")
@ -461,15 +460,6 @@ HEADER = headers.header(
tree_name = "chromium" if settings.is_main else None,
)
# A WIP header to potentially replace the existing one.
def get_rotation_names():
rotations = [getattr(builders.gardener_rotations, a) for a in dir(builders.gardener_rotations)]
rotation_names = []
for rotation in rotations:
if rotation and len(rotation) > 0:
rotation_names.append(builders.gardener_rotation_name(rotation[0]))
return rotation_names
# TODO(crbug.com/40873502): Replace the normal header after this is approved
DEV_HEADER = headers.header(
oncalls = [
@ -851,7 +841,17 @@ DEV_HEADER = headers.header(
text = "Gardener Rotations",
url = "https://chromium-status.appspot.com/",
),
console_ids = ["chromium/{}".format(r) for r in get_rotation_names()],
console_ids = [
"chromium/android rotation",
"chromium/angle rotation",
"chromium/cft rotation",
"chromium/chromium rotation",
"chromium/chromium.gpu rotation",
"chrome/chromium.perf",
"chromium/dawn rotation",
"chromium/fuchsia rotation",
"chromium/ios rotation",
],
),
],
) or [

File diff suppressed because it is too large Load Diff

@ -119,31 +119,31 @@ siso = struct(
),
)
def _rotation(name):
def _rotation(name, console_name):
if not name:
fail("Rotations must be created with a name")
return branches.value(
branch_selector = branches.selector.MAIN,
value = [name],
value = struct(
name = name,
console_name = console_name,
),
)
def _gardener_rotation_name(rotation):
return "{}.rotation".format(rotation)
# Gardener rotations that a builder can be added to (only takes effect on trunk)
# New rotations can be added, but won't automatically show up in SoM without
# changes to SoM code.
gardener_rotations = struct(
ANDROID = _rotation("android"),
ANGLE = _rotation("angle"),
CHROMIUM = _rotation("chromium"),
CFT = _rotation("cft"),
DAWN = _rotation("dawn"),
FUCHSIA = _rotation("fuchsia"),
CHROMIUM_CLANG = _rotation("chromium.clang"),
CHROMIUM_GPU = _rotation("chromium.gpu"),
CHROMIUM_PERF = _rotation("chromium.perf"),
IOS = _rotation("ios"),
CHROMIUMOS = _rotation("chromiumos"), # This group is not on SoM.
LACROS_SKYLAB = _rotation("lacros_skylab"),
ANDROID = _rotation("android", "android rotation"),
ANGLE = _rotation("angle", "angle rotation"),
CHROMIUM = _rotation("chromium", "chromium rotation"),
CFT = _rotation("cft", "cft rotation"),
DAWN = _rotation("dawn", "dawn rotation"),
FUCHSIA = _rotation("fuchsia", "fuchsia rotation"),
CHROMIUM_CLANG = _rotation("chromium.clang", "chromium.clang rotation"),
CHROMIUM_GPU = _rotation("chromium.gpu", "chromium.gpu rotation"),
IOS = _rotation("ios", "ios rotation"),
CHROMIUMOS = _rotation("chromiumos", "chromiumos rotation"), # This group is not on SoM.
)
# Free disk space in a machine reserved for build tasks.
@ -841,10 +841,11 @@ def builder(
dimensions["pool"] = pool
gardener_rotations = defaults.get_value("gardener_rotations", gardener_rotations, merge = args.MERGE_LIST)
gardener_rotation_names = [rotation.name for rotation in gardener_rotations]
if gardener_rotations:
# TODO(343503161): Remove gardener_rotations after SoM is updated.
properties["sheriff_rotations"] = gardener_rotations
properties["gardener_rotations"] = gardener_rotations
properties["sheriff_rotations"] = gardener_rotation_names
properties["gardener_rotations"] = gardener_rotation_names
ssd = defaults.get_value("ssd", ssd)
if ssd == args.COMPUTE:
@ -1091,7 +1092,7 @@ def builder(
if builder_group != None and bucket not in _BUILDER_GROUP_REUSE_BUCKET_ALLOWLIST:
_BUILDER_GROUP_ID_NODE.add("{}:{}".format(builder_group, name))
register_gardener_builder(bucket, name, gardener_rotations)
register_gardener_builder(bucket, name, gardener_rotation_names)
register_recipe_experiments_ref(bucket, name, executable)
@ -1192,6 +1193,6 @@ builders = struct(
defaults = defaults,
os = os,
gardener_rotations = gardener_rotations,
gardener_rotation_name = _gardener_rotation_name,
rotation = _rotation,
free_space = free_space,
)

@ -126,9 +126,9 @@ def ci_builder(
merged_resultdb_bigquery_exports.extend(resultdb_bigquery_exports or [])
branch_gardener_rotations = list({
platform_settings.gardener_rotation: None
builders.rotation(platform_settings.gardener_rotation, None): None
for platform, platform_settings in settings.platforms.items()
if branches.matches(branch_selector, platform = platform)
if branches.matches(branch_selector, platform = platform) and platform_settings.gardener_rotation
})
branch_gardener_rotations = args.listify(gardener_rotations, branch_gardener_rotations)
@ -192,7 +192,7 @@ def ci_builder(
for rotation in gardener_rotations:
luci.console_view_entry(
builder = builder,
console_view = builders.gardener_rotation_name(rotation),
console_view = rotation.console_name,
category = overview_console_category,
short_name = entry.short_name,
)

@ -158,8 +158,8 @@ consoles.console_view(name = "Tree Closers", branch_selector = branches.selector
def register_gardener_rotation_consoles():
rotations = [getattr(builders.gardener_rotations, a) for a in dir(builders.gardener_rotations)]
for rotation in rotations:
if rotation and len(rotation) > 0:
consoles.console_view(name = builders.gardener_rotation_name(rotation[0]), header = DEV_HEADER)
if rotation:
consoles.console_view(name = rotation.console_name, header = DEV_HEADER)
register_gardener_rotation_consoles()