From 2ad7cd523677cf69398ec5113782604740b53228 Mon Sep 17 00:00:00 2001 From: Brian Sheedy Date: Fri, 12 May 2023 17:03:13 +0000 Subject: [PATCH] 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 Reviewed-by: Garrett Beaty Kokoro: Austin Eng Reviewed-by: Austin Eng --- .../config/global/generated/commit-queue.cfg | 3 -- infra/config/global/main.star | 11 ++++--- infra/config/global/milestones.json | 20 +++++++++-- infra/config/global/project.star | 33 +++++++++++-------- 4 files changed, 43 insertions(+), 24 deletions(-) diff --git a/infra/config/global/generated/commit-queue.cfg b/infra/config/global/generated/commit-queue.cfg index b4d6da05bd..a0f0f8f394 100644 --- a/infra/config/global/generated/commit-queue.cfg +++ b/infra/config/global/generated/commit-queue.cfg @@ -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" } diff --git a/infra/config/global/main.star b/infra/config/global/main.star index 6747e4c20a..6f3e687470 100755 --- a/infra/config/global/main.star +++ b/infra/config/global/main.star @@ -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 diff --git a/infra/config/global/milestones.json b/infra/config/global/milestones.json index 77fd2d1df0..87987eb149 100644 --- a/infra/config/global/milestones.json +++ b/infra/config/global/milestones.json @@ -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" + ] } } \ No newline at end of file diff --git a/infra/config/global/project.star b/infra/config/global/project.star index b09b1ebb5b..303d12de70 100644 --- a/infra/config/global/project.star +++ b/infra/config/global/project.star @@ -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() }