Commit 5f668571 authored by Sven Zheng's avatar Sven Zheng Committed by Commit Bot

Enable and update lint format for infra/config

This cl should not change any logic. Lucicfg tool had an update and
caused 'lucicfg fmt' changed.
This cl enabled lint, fixed some lint issues, and generated changes
after running 'lucicfg fmt' inside infra/config.

Change-Id: Id6b8cbde334075c2b549337eb12ee819f3ece211
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316795
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: default avatarGarrett Beaty <gbeaty@chromium.org>
Auto-Submit: Sven Zheng <svenzheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794878}
parent c6607a2f
......@@ -6,27 +6,27 @@
# See https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/lucicfg/doc/README.md
# for information on starlark/lucicfg
load('//project.star', 'master_only_exec')
load("//project.star", "master_only_exec")
lucicfg.check_version(
min = '1.18.4',
message = 'Update depot_tools',
min = "1.18.4",
message = "Update depot_tools",
)
# Enable LUCI Realms support.
lucicfg.enable_experiment('crbug.com/1085650')
lucicfg.enable_experiment("crbug.com/1085650")
# Tell lucicfg what files it is allowed to touch
lucicfg.config(
config_dir = 'generated',
config_dir = "generated",
tracked_files = [
'cr-buildbucket-dev.cfg',
'luci-logdog-dev.cfg',
'luci-milo-dev.cfg',
'luci-scheduler-dev.cfg',
'realms-dev.cfg',
"cr-buildbucket-dev.cfg",
"luci-logdog-dev.cfg",
"luci-milo-dev.cfg",
"luci-scheduler-dev.cfg",
"realms-dev.cfg",
],
fail_on_warnings = True,
)
master_only_exec('//dev/dev.star')
master_only_exec("//dev/dev.star")
......@@ -7,13 +7,13 @@
# for information on starlark/lucicfg
luci.project(
name = 'chromium',
name = "chromium",
dev = True,
buildbucket = 'cr-buildbucket-dev.appspot.com',
logdog = 'luci-logdog-dev.appspot.com',
milo = 'luci-milo-dev.appspot.com',
scheduler = 'luci-scheduler-dev.appspot.com',
swarming = 'chromium-swarm-dev.appspot.com',
buildbucket = "cr-buildbucket-dev.appspot.com",
logdog = "luci-logdog-dev.appspot.com",
milo = "luci-milo-dev.appspot.com",
scheduler = "luci-scheduler-dev.appspot.com",
swarming = "chromium-swarm-dev.appspot.com",
acls = [
acl.entry(
roles = [
......@@ -21,37 +21,37 @@ luci.project(
acl.PROJECT_CONFIGS_READER,
acl.SCHEDULER_READER,
],
groups = 'all',
groups = "all",
),
acl.entry(
roles = acl.LOGDOG_WRITER,
groups = 'luci-logdog-chromium-dev-writers',
groups = "luci-logdog-chromium-dev-writers",
),
acl.entry(
roles = acl.SCHEDULER_OWNER,
groups = 'project-chromium-admins',
groups = "project-chromium-admins",
),
],
)
luci.logdog(
gs_bucket = 'chromium-luci-logdog',
gs_bucket = "chromium-luci-logdog",
)
luci.milo(
logo = 'https://storage.googleapis.com/chrome-infra-public/logo/chromium.svg',
logo = "https://storage.googleapis.com/chrome-infra-public/logo/chromium.svg",
)
# An all-purpose public realm.
luci.realm(
name = 'public',
name = "public",
bindings = [
luci.binding(
roles = 'role/buildbucket.reader',
groups = 'all',
roles = "role/buildbucket.reader",
groups = "all",
),
# Other roles are inherited from @root which grants them to group:all.
],
)
exec('//dev/subprojects/chromium/subproject.star')
exec("//dev/subprojects/chromium/subproject.star")
......@@ -2,98 +2,97 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load('//lib/builders.star', 'builder', 'cpu', 'defaults', 'os')
load("//lib/builders.star", "builder", "cpu", "defaults", "os")
luci.bucket(
name = 'ci',
name = "ci",
acls = [
acl.entry(
roles = acl.BUILDBUCKET_READER,
groups = 'all',
groups = "all",
),
acl.entry(
roles = acl.BUILDBUCKET_TRIGGERER,
users = [
'luci-scheduler-dev@appspot.gserviceaccount.com',
'chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com',
"luci-scheduler-dev@appspot.gserviceaccount.com",
"chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com",
],
),
acl.entry(
roles = acl.BUILDBUCKET_OWNER,
groups = 'google/luci-task-force@google.com',
groups = "google/luci-task-force@google.com",
),
],
)
luci.gitiles_poller(
name = 'master-gitiles-trigger',
bucket = 'ci',
repo = 'https://chromium.googlesource.com/chromium/src',
name = "master-gitiles-trigger",
bucket = "ci",
repo = "https://chromium.googlesource.com/chromium/src",
)
luci.recipe.defaults.cipd_package.set(
'infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build')
"infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
)
defaults.bucket.set('ci')
defaults.bucket.set("ci")
defaults.build_numbers.set(True)
defaults.builderless.set(None)
defaults.cpu.set(cpu.X86_64)
defaults.executable.set(luci.recipe(name = 'swarming/staging'))
defaults.executable.set(luci.recipe(name = "swarming/staging"))
defaults.execution_timeout.set(3 * time.hour)
defaults.mastername.set('chromium.dev')
defaults.mastername.set("chromium.dev")
defaults.os.set(os.LINUX_DEFAULT)
defaults.service_account.set(
'chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com')
defaults.swarming_tags.set(['vpython:native-python-wrapper'])
"chromium-ci-builder-dev@chops-service-accounts.iam.gserviceaccount.com",
)
defaults.swarming_tags.set(["vpython:native-python-wrapper"])
def ci_builder(*, name, **kwargs):
return builder(
name = name,
triggered_by = ['master-gitiles-trigger'],
resultdb_bigquery_exports = [resultdb.export_test_results(
bq_table = 'luci-resultdb-dev.chromium.ci_test_results',
)],
**kwargs
)
return builder(
name = name,
triggered_by = ["master-gitiles-trigger"],
resultdb_bigquery_exports = [resultdb.export_test_results(
bq_table = "luci-resultdb-dev.chromium.ci_test_results",
)],
**kwargs
)
ci_builder(
name = 'android-lollipop-arm-rel-swarming',
name = "android-lollipop-arm-rel-swarming",
)
ci_builder(
name = 'android-marshmallow-arm64-rel-swarming',
name = "android-marshmallow-arm64-rel-swarming",
)
ci_builder(
name = 'linux-rel-swarming',
name = "linux-rel-swarming",
)
ci_builder(
name = 'mac-rel-swarming',
name = "mac-rel-swarming",
os = os.MAC_DEFAULT,
)
ci_builder(
name = 'win-rel-swarming',
name = "win-rel-swarming",
os = os.WINDOWS_DEFAULT,
)
## builders using swarming staging instance
def ci_builder_staging(**kwargs):
return ci_builder(
swarming_host = 'chromium-swarm-staging.appspot.com',
**kwargs
)
return ci_builder(
swarming_host = "chromium-swarm-staging.appspot.com",
**kwargs
)
ci_builder_staging(
name = 'linux-rel-swarming-staging',
name = "linux-rel-swarming-staging",
)
ci_builder_staging(
name = 'win-rel-swarming-staging',
name = "win-rel-swarming-staging",
os = os.WINDOWS_DEFAULT,
)
......@@ -3,24 +3,24 @@
# found in the LICENSE file.
luci.console_view(
name = 'chromium.dev',
header = '//dev/chromium-header.textpb',
repo = 'https://chromium.googlesource.com/chromium/src',
name = "chromium.dev",
header = "//dev/chromium-header.textpb",
repo = "https://chromium.googlesource.com/chromium/src",
entries = [
luci.console_view_entry(builder = 'ci/android-lollipop-arm-rel-swarming'),
luci.console_view_entry(builder = 'ci/android-marshmallow-arm64-rel-swarming'),
luci.console_view_entry(builder = 'ci/linux-rel-swarming'),
luci.console_view_entry(builder = 'ci/mac-rel-swarming'),
luci.console_view_entry(builder = 'ci/win-rel-swarming'),
],
luci.console_view_entry(builder = "ci/android-lollipop-arm-rel-swarming"),
luci.console_view_entry(builder = "ci/android-marshmallow-arm64-rel-swarming"),
luci.console_view_entry(builder = "ci/linux-rel-swarming"),
luci.console_view_entry(builder = "ci/mac-rel-swarming"),
luci.console_view_entry(builder = "ci/win-rel-swarming"),
],
)
luci.console_view(
name = 'chromium.staging',
header = '//dev/chromium-header.textpb',
repo = 'https://chromium.googlesource.com/chromium/src',
name = "chromium.staging",
header = "//dev/chromium-header.textpb",
repo = "https://chromium.googlesource.com/chromium/src",
entries = [
luci.console_view_entry(builder = 'ci/linux-rel-swarming-staging'),
luci.console_view_entry(builder = 'ci/win-rel-swarming-staging'),
],
luci.console_view_entry(builder = "ci/linux-rel-swarming-staging"),
luci.console_view_entry(builder = "ci/win-rel-swarming-staging"),
],
)
......@@ -2,5 +2,5 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
exec('./ci.star')
exec('./consoles/chromium.swarm.star')
exec("./ci.star")
exec("./consoles/chromium.swarm.star")
This diff is collapsed.
......@@ -3,34 +3,34 @@
# found in the LICENSE file.
def _ensure_ci_jobs_can_be_bucketed_or_not(ctx):
cfg = ctx.output['luci-scheduler.cfg']
ci_jobs = {}
for j in cfg.job:
# The default behavior is the same as 'triggered', so look for non-empty
# schedules that are not 'triggered', we don't want to create duplicates of
# those jobs because it will cause double the number of builds to be
# scheduled
if j.schedule and j.schedule != 'triggered':
continue
bucket = j.buildbucket.bucket
if bucket != 'luci.chromium.ci':
continue
builder = j.buildbucket.builder
if builder in ci_jobs:
fail('Multiple jobs defined for CI builder ci/{}'.format(builder))
ci_jobs[builder] = j
for builder, job in ci_jobs.items():
new_job = proto.from_wirepb(proto.message_type(job), proto.to_wirepb(job))
new_job.id = builder if job.id != builder else 'ci-{}'.format(builder)
cfg.job.append(new_job)
jobs = sorted(cfg.job, key=lambda j: j.id)
cfg.job.clear()
cfg.job.extend(jobs)
cfg = ctx.output["luci-scheduler.cfg"]
ci_jobs = {}
for j in cfg.job:
# The default behavior is the same as 'triggered', so look for non-empty
# schedules that are not 'triggered', we don't want to create duplicates of
# those jobs because it will cause double the number of builds to be
# scheduled
if j.schedule and j.schedule != "triggered":
continue
bucket = j.buildbucket.bucket
if bucket != "luci.chromium.ci":
continue
builder = j.buildbucket.builder
if builder in ci_jobs:
fail("Multiple jobs defined for CI builder ci/{}".format(builder))
ci_jobs[builder] = j
for builder, job in ci_jobs.items():
new_job = proto.from_wirepb(proto.message_type(job), proto.to_wirepb(job))
new_job.id = builder if job.id != builder else "ci-{}".format(builder)
cfg.job.append(new_job)
jobs = sorted(cfg.job, key = lambda j: j.id)
cfg.job.clear()
cfg.job.extend(jobs)
lucicfg.generator(_ensure_ci_jobs_can_be_bucketed_or_not)
......@@ -13,9 +13,8 @@ without error.
"""
# Don't make a habit of this - it isn't public API
load('@stdlib//internal/luci/proto.star', 'scheduler_pb')
load('//project.star', 'settings')
load("@stdlib//internal/luci/proto.star", "scheduler_pb")
load("//project.star", "settings")
# For the chromium project (settings.is_master is True), we have bucket-based
# milestones for <=M85. We create a no-op job that prefixes the ci bucket name
......@@ -26,51 +25,48 @@ load('//project.star', 'settings')
# milestone project will use the same bucket names, so we create a no-op job for
# the 'ci' bucket.
_BRANCH_NOOP_CONFIG = struct(
buckets = ['ci-m84', 'ci-m85'],
fmt = '{bucket}-{builder}',
buckets = ["ci-m84", "ci-m85"],
fmt = "{bucket}-{builder}",
) if settings.is_master else struct(
buckets = ['ci'],
fmt = '{builder}',
buckets = ["ci"],
fmt = "{builder}",
)
_NON_BRANCHED_TESTERS = (
# This tester is triggered by 'Mac Builder', but it is an FYI builder and
# not mirrored by any branched try builders, so we do not need to run it on
# the branches
'mac-osxbeta-rel',
"mac-osxbeta-rel",
# These testers are triggered by 'Win x64 Builder', but it is an FYI builder
# and not mirrored by any branched try builders, so we do not need to run it
# on the branches (crbug/990885)
'Win10 Tests x64 1803',
'Win10 Tests x64 1909',
"Win10 Tests x64 1803",
"Win10 Tests x64 1909",
# These Android testers are triggered by 'Android arm Builder (dbg)', but we
# don't have sufficient capacity of devices with older Android versions, so
# we do not run them on the branches
'Android WebView L (dbg)',
'Lollipop Phone Tester',
'Lollipop Tablet Tester',
'Marshmallow Tablet Tester',
"Android WebView L (dbg)",
"Lollipop Phone Tester",
"Lollipop Tablet Tester",
"Marshmallow Tablet Tester",
)
_TESTER_NOOP_JOBS = [scheduler_pb.Job(
id = _BRANCH_NOOP_CONFIG.fmt.format(bucket=bucket, builder=builder),
schedule = 'triggered',
id = _BRANCH_NOOP_CONFIG.fmt.format(bucket = bucket, builder = builder),
schedule = "triggered",
acl_sets = [bucket],
acls = [scheduler_pb.Acl(
role = scheduler_pb.Acl.TRIGGERER,
granted_to = 'chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com',
granted_to = "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
)],
noop = scheduler_pb.NoopTask(),
) for builder in _NON_BRANCHED_TESTERS for bucket in _BRANCH_NOOP_CONFIG.buckets]
def _add_noop_jobs(ctx):
cfg = ctx.output['luci-scheduler.cfg']
for j in _TESTER_NOOP_JOBS:
cfg.job.append(j)
cfg = ctx.output["luci-scheduler.cfg"]
for j in _TESTER_NOOP_JOBS:
cfg.job.append(j)
lucicfg.generator(_add_noop_jobs)
def _sort_consoles(ctx):
milo = ctx.output['luci-milo.cfg']
# Sort so that the overview consoles appear at the top of the console list
# The overview consoles specify a title, so checking c.id == c.name will put
# the overview consoles first
milo.consoles = sorted(milo.consoles, key=lambda c: (c.id == c.name, c.id))
milo = ctx.output["luci-milo.cfg"]
# Sort so that the overview consoles appear at the top of the console list
# The overview consoles specify a title, so checking c.id == c.name will put
# the overview consoles first
milo.consoles = sorted(milo.consoles, key = lambda c: (c.id == c.name, c.id))
lucicfg.generator(_sort_consoles)
......@@ -5,65 +5,61 @@
"""Library containing utilities for handling args in libraries."""
def _sentinel(tag):
return struct(**{tag: tag})
return struct(**{tag: tag})
# A sentinel value indicating a value that will be computed based off of some
# other values
COMPUTE = _sentinel('__compute__')
COMPUTE = _sentinel("__compute__")
# A sentinel value to be used as a default so that it can be distinguished
# between an unspecified value and an explicit value of None
DEFAULT = _sentinel('__default__')
def defaults(extends=None, **vars):
"""Define a structure that provides module-level defaults for function
arguments.
Arguments:
* extends - A struct containing `lucicfg.var` attributes to add to the
resulting struct.
* vars - Defaults to define. Each entry results in a `lucicfg.var` attribute
being added to the resulting struct. The name of the attribute is the
keyword and the default value of the `lucicfg.var` is the keyword's value.
Returns:
A struct containing `lucicfg.var` attributes providing the module level
defaults and the following methods:
* get_value(name, value) - Gets the value of an argument. If `value` is not
`DEFAULT`, `value` is returned. Otherwise, the module-level default for
`name` is returned.
* get_value_from_kwargs(name, kwargs) - Gets the value of a keyword
argument. If `name` is in `kwargs`, `kwargs[name]` is returned. Otherwise,
the module-level default for `name` is returned.
"""
methods = ['get_value', 'get_value_from_kwargs']
for m in methods:
if m in vars:
fail("{!r} can't be used as the name of a default: it is a method"
.format(a))
vars = {k: lucicfg.var(default = v) for k, v in vars.items()}
for a in dir(extends):
if a not in methods:
vars[a] = getattr(extends, a)
def get_value(name, value):
if value != DEFAULT:
return value
return vars[name].get()
def get_value_from_kwargs(name, kwargs):
return get_value(name, kwargs.get(name, DEFAULT))
return struct(
get_value = get_value,
get_value_from_kwargs = get_value_from_kwargs,
**vars
)
DEFAULT = _sentinel("__default__")
def defaults(extends = None, **vars):
"""Define a structure that provides module-level defaults for function
arguments.
Arguments:
* extends - A struct containing `lucicfg.var` attributes to add to the
resulting struct.
* vars - Defaults to define. Each entry results in a `lucicfg.var` attribute
being added to the resulting struct. The name of the attribute is the
keyword and the default value of the `lucicfg.var` is the keyword's value.
Returns:
A struct containing `lucicfg.var` attributes providing the module level
defaults and the following methods:
* get_value(name, value) - Gets the value of an argument. If `value` is not
`DEFAULT`, `value` is returned. Otherwise, the module-level default for
`name` is returned.
* get_value_from_kwargs(name, kwargs) - Gets the value of a keyword
argument. If `name` is in `kwargs`, `kwargs[name]` is returned. Otherwise,
the module-level default for `name` is returned.
"""
methods = ["get_value", "get_value_from_kwargs"]
for m in methods:
if m in vars:
fail("{!r} can't be used as the name of a default: it is a method"
.format(a))
vars = {k: lucicfg.var(default = v) for k, v in vars.items()}
for a in dir(extends):
if a not in methods:
vars[a] = getattr(extends, a)
def get_value(name, value):
if value != DEFAULT:
return value
return vars[name].get()
def get_value_from_kwargs(name, kwargs):
return get_value(name, kwargs.get(name, DEFAULT))
return struct(
get_value = get_value,
get_value_from_kwargs = get_value_from_kwargs,
**vars
)
args = struct(
COMPUTE = COMPUTE,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,53 +6,62 @@
# See https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/lucicfg/doc/README.md
# for information on starlark/lucicfg
load('//project.star', 'master_only_exec', 'settings')
load("//project.star", "master_only_exec", "settings")
lucicfg.check_version(
min = '1.18.4',
message = 'Update depot_tools',
min = "1.18.4",
message = "Update depot_tools",
)
# Enable LUCI Realms support.
lucicfg.enable_experiment('crbug.com/1085650')
lucicfg.enable_experiment("crbug.com/1085650")
# Enable tree closing.
lucicfg.enable_experiment("crbug.com/1054172")
# Tell lucicfg what files it is allowed to touch
lucicfg.config(
config_dir = 'generated',
config_dir = "generated",
tracked_files = [
'commit-queue.cfg',
'cq-builders.md',
'cr-buildbucket.cfg',
'luci-logdog.cfg',
'luci-milo.cfg',
'luci-notify.cfg',
'luci-notify/email-templates/*.template',
'luci-scheduler.cfg',
'project.cfg',
'project.pyl',
'realms.cfg',
'tricium-prod.cfg',
"commit-queue.cfg",
"cq-builders.md",
"cr-buildbucket.cfg",
"luci-logdog.cfg",
"luci-milo.cfg",
"luci-notify.cfg",
"luci-notify/email-templates/*.template",
"luci-scheduler.cfg",
"project.cfg",
"project.pyl",
"realms.cfg",
"tricium-prod.cfg",
],
fail_on_warnings = True,
lint_checks = [
"default",
"-confusing-name",
"-function-docstring",
"-function-docstring-args",
"-function-docstring-return",
"-function-docstring-header",
"-module-docstring",
],
)
# Just copy tricium-prod.cfg to the generated outputs
lucicfg.emit(
dest = 'tricium-prod.cfg',
data = io.read_file('tricium-prod.cfg'),
dest = "tricium-prod.cfg",
data = io.read_file("tricium-prod.cfg"),
)
luci.project(
name = settings.project,
buildbucket = 'cr-buildbucket.appspot.com',
logdog = 'luci-logdog.appspot.com',
milo = 'luci-milo.appspot.com',
notify = 'luci-notify.appspot.com',
scheduler = 'luci-scheduler.appspot.com',
swarming = 'chromium-swarm.appspot.com',
buildbucket = "cr-buildbucket.appspot.com",
logdog = "luci-logdog.appspot.com",
milo = "luci-milo.appspot.com",
notify = "luci-notify.appspot.com",
scheduler = "luci-scheduler.appspot.com",
swarming = "chromium-swarm.appspot.com",
acls = [
acl.entry(
roles = [
......@@ -60,15 +69,15 @@ luci.project(
acl.PROJECT_CONFIGS_READER,
acl.SCHEDULER_READER,
],
groups = 'all',
groups = "all",
),
acl.entry(
roles = acl.LOGDOG_WRITER,
groups = 'luci-logdog-chromium-writers',
groups = "luci-logdog-chromium-writers",
),
acl.entry(
roles = acl.SCHEDULER_OWNER,
groups = 'project-chromium-admins',
groups = "project-chromium-admins",
),
],
)
......@@ -76,15 +85,15 @@ luci.project(
luci.cq(
submit_max_burst = 2,
submit_burst_delay = time.minute,
status_host = 'chromium-cq-status.appspot.com',
status_host = "chromium-cq-status.appspot.com",
)
luci.logdog(
gs_bucket = 'chromium-luci-logdog',
gs_bucket = "chromium-luci-logdog",
)
luci.milo(
logo = 'https://storage.googleapis.com/chrome-infra-public/logo/chromium.svg',
logo = "https://storage.googleapis.com/chrome-infra-public/logo/chromium.svg",
)
luci.notify(
......@@ -93,27 +102,28 @@ luci.notify(
# An all-purpose public realm.
luci.realm(
name = 'public',
name = "public",
bindings = [
luci.binding(
roles = 'role/buildbucket.reader',
groups = 'all',
roles = "role/buildbucket.reader",
groups = "all",
),
# Other roles are inherited from @root which grants them to group:all.
],
)
exec('//recipes.star')
exec("//recipes.star")
exec("//notifiers.star")
exec('//notifiers.star')
exec("//subprojects/chromium/subproject.star")
master_only_exec("//subprojects/codesearch/subproject.star")
master_only_exec("//subprojects/findit/subproject.star")
master_only_exec("//subprojects/goma/subproject.star")
master_only_exec("//subprojects/webrtc/subproject.star")
exec('//subprojects/chromium/subproject.star')
master_only_exec('//subprojects/codesearch/subproject.star')
master_only_exec('//subprojects/findit/subproject.star')
master_only_exec('//subprojects/goma/subproject.star')
master_only_exec('//subprojects/webrtc/subproject.star')
master_only_exec("//generators/cq-builders-md.star")
master_only_exec('//generators/cq-builders-md.star')
# This should be exec'ed before exec'ing scheduler-noop-jobs.star because
# attempting to read the buildbucket field that is not set for the noop jobs
# actually causes an empty buildbucket message to be set
......@@ -121,14 +131,15 @@ master_only_exec('//generators/cq-builders-md.star')
# problems when the number of builders with the same name goes from 1 to >1 or
# vice-versa. This generator makes sure both the bucketed and non-bucketed IDs
# work so that there aren't transient failures when the configuration changes
master_only_exec('//generators/scheduler-bucketed-jobs.star')
master_only_exec("//generators/scheduler-bucketed-jobs.star")
# TODO(https://crbug.com/819899) There are a number of noop jobs for dummy
# builders defined due to legacy requirements that trybots mirror CI bots
# no-op scheduler jobs are not supported by the lucicfg libraries, so this
# generator adds in the necessary no-op jobs
# The trybots should be update to not require no-op jobs to be triggered so that
# the no-op jobs can be removed
exec('//generators/scheduler-noop-jobs.star')
exec('//generators/sort-consoles.star')
exec("//generators/scheduler-noop-jobs.star")
exec("//generators/sort-consoles.star")
exec('//validators/builders-in-consoles.star')
exec("//validators/builders-in-consoles.star")
......@@ -3,105 +3,105 @@
# found in the LICENSE file.
luci.notifier(
name = 'chromesec-lkgr-failures',
name = "chromesec-lkgr-failures",
on_status_change = True,
notify_emails = [
'chromesec-lkgr-failures@google.com',
"chromesec-lkgr-failures@google.com",
],
)
luci.notifier(
name = 'chrome-memory-sheriffs',
name = "chrome-memory-sheriffs",
on_status_change = True,
notify_emails = [
'chrome-memory-sheriffs+bots@google.com',
"chrome-memory-sheriffs+bots@google.com",
],
)
luci.notifier(
name = 'cr-fuchsia',
name = "cr-fuchsia",
on_status_change = True,
notify_emails = [
'cr-fuchsia+bot@chromium.org',
"cr-fuchsia+bot@chromium.org",
],
)
luci.notifier(
name = 'cronet',
name = "cronet",
on_status_change = True,
notify_emails = [
'cronet-bots-observer@google.com',
"cronet-bots-observer@google.com",
],
)
luci.notifier(
name = 'metadata-mapping',
on_new_status = ['FAILURE'],
notify_emails = ['chromium-component-mapping@google.com'],
name = "metadata-mapping",
on_new_status = ["FAILURE"],
notify_emails = ["chromium-component-mapping@google.com"],
)
TREE_CLOSING_STEPS = [
'bot_update',
'compile',
'gclient runhooks',
'runhooks',
'update',
"bot_update",
"compile",
"gclient runhooks",
"runhooks",
"update",
]
luci.tree_closer(
name = 'chromium-tree-closer',
tree_status_host = 'chromium-status.appspot.com',
failed_step_regexp = TREE_CLOSING_STEPS
name = "chromium-tree-closer",
tree_status_host = "chromium-status.appspot.com",
failed_step_regexp = TREE_CLOSING_STEPS,
)
luci.tree_closer(
name = 'close-on-any-step-failure',
tree_status_host = 'chromium-status.appspot.com',
name = "close-on-any-step-failure",
tree_status_host = "chromium-status.appspot.com",
)
def tree_closure_notifier(**kwargs):
return luci.notifier(
on_occurrence = ['FAILURE'],
failed_step_regexp = TREE_CLOSING_STEPS,
**kwargs,
)
return luci.notifier(
on_occurrence = ["FAILURE"],
failed_step_regexp = TREE_CLOSING_STEPS,
**kwargs
)
tree_closure_notifier(
name = 'chromium-tree-closer-email',
name = "chromium-tree-closer-email",
notify_rotation_urls = [
"https://chrome-ops-rotation-proxy.appspot.com/current/oncallator:chrome-build-sheriff",
],
template = luci.notifier_template(
name = 'tree_closure_email_template',
body = io.read_file('templates/tree_closure_email.template'),
name = "tree_closure_email_template",
body = io.read_file("templates/tree_closure_email.template"),
),
)
tree_closure_notifier(
name = 'gpu-tree-closer-email',
notify_emails = ['chrome-gpu-build-failures@google.com'],
name = "gpu-tree-closer-email",
notify_emails = ["chrome-gpu-build-failures@google.com"],
notify_rotation_urls = [
"https://rota-ng.appspot.com/legacy/sheriff_gpu.json",
],
)
tree_closure_notifier(
name = 'linux-memory',
notify_emails = ['thomasanderson@chromium.org'],
name = "linux-memory",
notify_emails = ["thomasanderson@chromium.org"],
)
tree_closure_notifier(
name = 'linux-archive-rel',
notify_emails = ['thomasanderson@chromium.org'],
name = "linux-archive-rel",
notify_emails = ["thomasanderson@chromium.org"],
)
tree_closure_notifier(
name = 'Deterministic Android',
notify_emails = ['agrieve@chromium.org'],
name = "Deterministic Android",
notify_emails = ["agrieve@chromium.org"],
)
tree_closure_notifier(
name = 'Deterministic Linux',
name = "Deterministic Linux",
notify_emails = [
"tikuta@chromium.org",
"ukai@chromium.org",
......@@ -110,7 +110,7 @@ tree_closure_notifier(
)
tree_closure_notifier(
name = 'linux-ozone-rel',
name = "linux-ozone-rel",
notify_emails = [
"fwang@chromium.org",
"maksim.sisov@chromium.org",
......@@ -122,14 +122,14 @@ tree_closure_notifier(
)
luci.notifier(
name = 'Closure Compilation Linux',
name = "Closure Compilation Linux",
notify_emails = [
"dbeam+closure-bots@chromium.org",
"fukino+closure-bots@chromium.org",
"hirono+closure-bots@chromium.org",
"vitalyp@chromium.org",
],
on_occurrence = ['FAILURE'],
on_occurrence = ["FAILURE"],
failed_step_regexp = [
"update_scripts",
"setup_build",
......@@ -137,57 +137,57 @@ luci.notifier(
"generate_gyp_files",
"compile",
"generate_v2_gyp_files",
"compile_v2"
]
"compile_v2",
],
)
luci.notifier(
name = 'Site Isolation Android',
name = "Site Isolation Android",
notify_emails = [
"nasko+fyi-bots@chromium.org",
"creis+fyi-bots@chromium.org",
"lukasza+fyi-bots@chromium.org",
"alexmos+fyi-bots@chromium.org",
],
on_new_status = ['FAILURE'],
on_new_status = ["FAILURE"],
)
luci.notifier(
name = 'CFI Linux',
name = "CFI Linux",
notify_emails = [
'pcc@chromium.org',
"pcc@chromium.org",
],
on_new_status = ['FAILURE'],
on_new_status = ["FAILURE"],
)
luci.notifier(
name = 'Win 10 Fast Ring',
name = "Win 10 Fast Ring",
notify_emails = [
'wfh@chromium.org',
"wfh@chromium.org",
],
on_new_status = ['FAILURE'],
on_new_status = ["FAILURE"],
)
luci.notifier(
name = 'linux-blink-heap-verification',
name = "linux-blink-heap-verification",
notify_emails = [
'mlippautz+fyi-bots@chromium.org',
"mlippautz+fyi-bots@chromium.org",
],
on_new_status = ['FAILURE'],
on_new_status = ["FAILURE"],
)
luci.notifier(
name = 'annotator-rel',
name = "annotator-rel",
notify_emails = [
"pastarmovj@chromium.org",
"nicolaso@chromium.org",
],
on_new_status = ['FAILURE'],
on_new_status = ["FAILURE"],
)
tree_closure_notifier(
name = 'chromium.linux',
name = "chromium.linux",
notify_emails = [
'thomasanderson@chromium.org',
"thomasanderson@chromium.org",
],
)
......@@ -3,48 +3,45 @@
# found in the LICENSE file.
settings = struct(
project = 'chromium',
project = "chromium",
# Switch this to False for branches
is_master = True,
ref = 'refs/heads/master',
ci_bucket = 'ci',
ci_poller = 'master-gitiles-trigger',
main_console_name = 'main',
main_console_title = 'Chromium Main Console',
cq_mirrors_console_name = 'mirrors',
cq_mirrors_console_title = 'Chromium CQ Mirrors Console',
try_bucket = 'try',
try_triggering_projects = ['angle', 'dawn', 'skia', 'v8'],
cq_group = 'cq',
cq_ref_regexp = 'refs/heads/.+',
main_list_view_name = 'try',
main_list_view_title = 'Chromium CQ console',
ref = "refs/heads/master",
ci_bucket = "ci",
ci_poller = "master-gitiles-trigger",
main_console_name = "main",
main_console_title = "Chromium Main Console",
cq_mirrors_console_name = "mirrors",
cq_mirrors_console_title = "Chromium CQ Mirrors Console",
try_bucket = "try",
try_triggering_projects = ["angle", "dawn", "skia", "v8"],
cq_group = "cq",
cq_ref_regexp = "refs/heads/.+",
main_list_view_name = "try",
main_list_view_title = "Chromium CQ console",
# Switch this to None for branches
tree_status_host = 'chromium-status.appspot.com/',
tree_status_host = "chromium-status.appspot.com/",
)
def _generate_project_pyl(ctx):
ctx.output['project.pyl'] = '\n'.join([
'# This is a non-LUCI generated file',
'# This is consumed by presubmit checks that need to validate the config',
repr(dict(
# On master, we want to ensure that we don't have source side specs
# defined for non-existent builders
# On branches, we don't want to re-generate the source side specs as
# that would increase branch day toil and complicate cherry-picks
validate_source_side_specs_have_builder = settings.is_master,
)),
'',
])
ctx.output["project.pyl"] = "\n".join([
"# This is a non-LUCI generated file",
"# This is consumed by presubmit checks that need to validate the config",
repr(dict(
# On master, we want to ensure that we don't have source side specs
# defined for non-existent builders
# On branches, we don't want to re-generate the source side specs as
# that would increase branch day toil and complicate cherry-picks
validate_source_side_specs_have_builder = settings.is_master,
)),
"",
])
lucicfg.generator(_generate_project_pyl)
def master_only_exec(f):
if settings.is_master:
exec(f)
if settings.is_master:
exec(f)
# The branch numbers of branches that we have builders running for (including
# milestone-specific projects)
......
......@@ -2,144 +2,145 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
_RECIPE_NAME_PREFIX = 'recipe:'
_RECIPE_NAME_PREFIX = "recipe:"
def _recipe_for_package(cipd_package):
def recipe(*, name, cipd_version=None, recipe=None, use_bbagent=False):
# Force the caller to put the recipe prefix rather than adding it
# programatically to make the string greppable
if not name.startswith(_RECIPE_NAME_PREFIX):
fail("Recipe name {!r} does not start with {!r}"
.format(name, _RECIPE_NAME_PREFIX))
if recipe == None:
recipe = name[len(_RECIPE_NAME_PREFIX):]
return luci.recipe(
name = name,
cipd_package = cipd_package,
cipd_version = cipd_version,
recipe = recipe,
use_bbagent = use_bbagent,
)
return recipe
def recipe(*, name, cipd_version = None, recipe = None, use_bbagent = False):
# Force the caller to put the recipe prefix rather than adding it
# programatically to make the string greppable
if not name.startswith(_RECIPE_NAME_PREFIX):
fail("Recipe name {!r} does not start with {!r}"
.format(name, _RECIPE_NAME_PREFIX))
if recipe == None:
recipe = name[len(_RECIPE_NAME_PREFIX):]
return luci.recipe(
name = name,
cipd_package = cipd_package,
cipd_version = cipd_version,
recipe = recipe,
use_bbagent = use_bbagent,
)
return recipe
build_recipe = _recipe_for_package(
'infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build')
"infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
)
build_recipe(
name = 'recipe:android/avd_packager',
name = "recipe:android/avd_packager",
)
build_recipe(
name = 'recipe:android/sdk_packager',
name = "recipe:android/sdk_packager",
)
build_recipe(
name = 'recipe:angle_chromium',
name = "recipe:angle_chromium",
)
build_recipe(
name = 'recipe:angle_chromium_trybot',
name = "recipe:angle_chromium_trybot",
)
build_recipe(
name = 'recipe:binary_size_generator_tot',
name = "recipe:binary_size_generator_tot",
)
build_recipe(
name = 'recipe:binary_size_trybot',
name = "recipe:binary_size_trybot",
)
build_recipe(
name = 'recipe:celab',
name = "recipe:celab",
)
build_recipe(
name = 'recipe:chromium',
name = "recipe:chromium",
)
build_recipe(
name = 'recipe:chromium_afl',
name = "recipe:chromium_afl",
)
build_recipe(
name = 'recipe:chromium_clang_coverage_tot',
name = "recipe:chromium_clang_coverage_tot",
)
build_recipe(
name = 'recipe:chromium_codesearch',
name = "recipe:chromium_codesearch",
use_bbagent = True,
)
build_recipe(
name = 'recipe:chromium_export_metadata',
name = "recipe:chromium_export_metadata",
use_bbagent = True,
)
build_recipe(
name = 'recipe:chromium_libfuzzer',
name = "recipe:chromium_libfuzzer",
)
build_recipe(
name = 'recipe:chromium_libfuzzer_trybot',
name = "recipe:chromium_libfuzzer_trybot",
)
build_recipe(
name = 'recipe:chromium_trybot',
name = "recipe:chromium_trybot",
)
build_recipe(
name = 'recipe:chromium_upload_clang',
name = "recipe:chromium_upload_clang",
)
build_recipe(
name = 'recipe:closure_compilation',
name = "recipe:closure_compilation",
)
build_recipe(
name = 'recipe:cronet',
name = "recipe:cronet",
)
build_recipe(
name = 'recipe:findit/chromium/compile',
name = "recipe:findit/chromium/compile",
)
build_recipe(
name = 'recipe:findit/chromium/export_bot_db',
name = "recipe:findit/chromium/export_bot_db",
)
build_recipe(
name = 'recipe:findit/chromium/single_revision',
name = "recipe:findit/chromium/single_revision",
)
build_recipe(
name = 'recipe:findit/chromium/update_components',
name = "recipe:findit/chromium/update_components",
)
build_recipe(
name = 'recipe:ios/try',
name = "recipe:ios/try",
)
build_recipe(
name = 'recipe:ios/unified_builder_tester',
name = "recipe:ios/unified_builder_tester",
)
build_recipe(
name = 'recipe:presubmit',
name = "recipe:presubmit",
)
build_recipe(
name = 'recipe:swarming/deterministic_build',
name = "recipe:swarming/deterministic_build",
)
build_recipe(
name = 'recipe:tricium_clang_tidy_wrapper',
name = "recipe:tricium_clang_tidy_wrapper",
)
build_recipe(
name = 'recipe:tricium_metrics',
name = "recipe:tricium_metrics",
)
build_recipe(
name = 'recipe:webrtc/chromium_ios',
name = "recipe:webrtc/chromium_ios",
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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