Add platforms to milestones.json

Adds platform information to milestones.json so that individual
platforms can be enabled/disabled on milestones.

Bug: chromium:1432491
Change-Id: I1269e93a72c476a17a371a87bf8008be217b85df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132520
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Brian Sheedy 2023-05-12 17:03:13 +00:00 committed by Dawn LUCI CQ
parent b0726080f4
commit 2ad7cd5236
4 changed files with 43 additions and 24 deletions

View File

@ -107,9 +107,6 @@ config_groups {
dry_run_access_list: "project-dawn-tryjob-access"
}
tryjob {
builders {
name: "chromium-m112/try/dawn-linux-x64-deps-rel"
}
builders {
name: "chromium-m112/try/dawn-mac-x64-deps-rel"
}

View File

@ -350,6 +350,7 @@ def dawn_standalone_builder(name, clang, debug, cpu, fuzzer = False):
cq_group = "Dawn-CQ",
builder = "dawn:try/" + name,
)
# These builders run fine unbranched on branch CLs, so add them to the
# branch groups as well.
for milestone in ACTIVE_MILESTONES.keys():
@ -358,8 +359,10 @@ def dawn_standalone_builder(name, clang, debug, cpu, fuzzer = False):
builder = "dawn:try/" + name,
)
def _add_branch_verifiers(builder_name, includable_only = False):
for milestone, details in ACTIVE_MILESTONES.items():
def _add_branch_verifiers(builder_name, os, includable_only = False):
for milestone, details in ACTIVE_MILESTONES.items():
if os not in details.platforms:
continue
luci.cq_tryjob_verifier(
cq_group = "Dawn-CQ-" + milestone,
builder = "{}:try/{}".format(details.chromium_project, builder_name),
@ -385,7 +388,7 @@ def chromium_dawn_tryjob(os):
cq_group = "Dawn-CQ",
builder = "chromium:try/" + os + "-dawn-rel",
)
_add_branch_verifiers(_os_to_branch_builder[os])
_add_branch_verifiers(_os_to_branch_builder[os], os)
luci.gitiles_poller(
name = "primary-poller",
@ -444,7 +447,7 @@ luci.cq_tryjob_verifier(
builder = "chromium:try/dawn-try-win10-x86-rel",
includable_only = True,
)
_add_branch_verifiers("dawn-win10-x86-deps-rel", includable_only = True)
_add_branch_verifiers("dawn-win10-x86-deps-rel", "win", includable_only = True)
# Views

View File

@ -2,16 +2,30 @@
"112": {
"name": "m112",
"chromium_project": "chromium-m112",
"ref": "refs/heads/chromium/5615"
"ref": "refs/heads/chromium/5615",
"platforms": [
"mac",
"win"
]
},
"113": {
"name": "m113",
"chromium_project": "chromium-m113",
"ref": "refs/heads/chromium/5672"
"ref": "refs/heads/chromium/5672",
"platforms": [
"linux",
"mac",
"win"
]
},
"114": {
"name": "m114",
"chromium_project": "chromium-m114",
"ref": "refs/heads/chromium/5735"
"ref": "refs/heads/chromium/5735",
"platforms": [
"linux",
"mac",
"win"
]
}
}

View File

@ -4,22 +4,27 @@
# found in the LICENSE file.
#
def _milestone_details(*, chromium_project, ref):
"""Define the details for an active milestone.
def _milestone_details(*, chromium_project, ref, platforms):
"""Define the details for an active milestone.
Args:
* chromium_project - The name of the LUCI project that is configured for the
milestone.
* ref - The ref in the Dawn git repository that contains the code for the
milestone.
"""
return struct(
chromium_project = chromium_project,
ref = ref,
)
Args:
* chromium_project - The name of the LUCI project that is configured for the
milestone.
* ref - The ref in the Dawn git repository that contains the code for the
milestone.
* platforms - A list of platform strings that the milestone is active for.
"""
return struct(
chromium_project = chromium_project,
ref = ref,
platforms = platforms,
)
ACTIVE_MILESTONES = {
m["name"]: _milestone_details(
chromium_project = m["chromium_project"], ref = m["ref"])
for m in json.decode(io.read_file("./milestones.json")).values()
chromium_project = m["chromium_project"],
ref = m["ref"],
platforms = m["platforms"],
)
for m in json.decode(io.read_file("./milestones.json")).values()
}