Skip to content

Commit 9a8e0eb

Browse files
dmitshurgopherbot
authored andcommitted
main.star: fix console_ids for dl and protobuf repos
CL 539280 changed console names in order to improve their sort order, but missed one more place that needed updating. Change-Id: I203d95415e601acec653dfe8eb4650851b89528d Reviewed-on: https://go-review.googlesource.com/c/build/+/545535 TryBot-Bypass: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 9e5fb09 commit 9a8e0eb

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

generated/luci-milo.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ consoles {
196196
console_ids: "golang/x-build-gotip"
197197
console_ids: "golang/x-crypto-gotip"
198198
console_ids: "golang/x-debug-gotip"
199-
console_ids: "golang/x-dl-gotip"
199+
console_ids: "golang/z-dl-gotip"
200200
console_ids: "golang/x-exp-gotip"
201201
console_ids: "golang/x-image-gotip"
202202
console_ids: "golang/x-mobile-gotip"
@@ -206,7 +206,7 @@ consoles {
206206
console_ids: "golang/x-perf-gotip"
207207
console_ids: "golang/x-pkgsite-gotip"
208208
console_ids: "golang/x-pkgsite-metrics-gotip"
209-
console_ids: "golang/x-protobuf-gotip"
209+
console_ids: "golang/z-protobuf-gotip"
210210
console_ids: "golang/x-review-gotip"
211211
console_ids: "golang/x-sync-gotip"
212212
console_ids: "golang/x-sys-gotip"
@@ -400,7 +400,7 @@ consoles {
400400
console_ids: "golang/x-build-go1.21"
401401
console_ids: "golang/x-crypto-go1.21"
402402
console_ids: "golang/x-debug-go1.21"
403-
console_ids: "golang/x-dl-go1.21"
403+
console_ids: "golang/z-dl-go1.21"
404404
console_ids: "golang/x-exp-go1.21"
405405
console_ids: "golang/x-image-go1.21"
406406
console_ids: "golang/x-mobile-go1.21"
@@ -410,7 +410,7 @@ consoles {
410410
console_ids: "golang/x-perf-go1.21"
411411
console_ids: "golang/x-pkgsite-go1.21"
412412
console_ids: "golang/x-pkgsite-metrics-go1.21"
413-
console_ids: "golang/x-protobuf-go1.21"
413+
console_ids: "golang/z-protobuf-go1.21"
414414
console_ids: "golang/x-review-go1.21"
415415
console_ids: "golang/x-sync-go1.21"
416416
console_ids: "golang/x-sys-go1.21"
@@ -596,7 +596,7 @@ consoles {
596596
console_ids: "golang/x-build-go1.20"
597597
console_ids: "golang/x-crypto-go1.20"
598598
console_ids: "golang/x-debug-go1.20"
599-
console_ids: "golang/x-dl-go1.20"
599+
console_ids: "golang/z-dl-go1.20"
600600
console_ids: "golang/x-exp-go1.20"
601601
console_ids: "golang/x-image-go1.20"
602602
console_ids: "golang/x-mobile-go1.20"
@@ -606,7 +606,7 @@ consoles {
606606
console_ids: "golang/x-perf-go1.20"
607607
console_ids: "golang/x-pkgsite-go1.20"
608608
console_ids: "golang/x-pkgsite-metrics-go1.20"
609-
console_ids: "golang/x-protobuf-go1.20"
609+
console_ids: "golang/z-protobuf-go1.20"
610610
console_ids: "golang/x-review-go1.20"
611611
console_ids: "golang/x-sync-go1.20"
612612
console_ids: "golang/x-sys-go1.20"

main.star

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def builder_name(project, go_branch_short, builder_type):
607607
# project_title produces a short title for the given project.
608608
def project_title(project):
609609
if project == "go":
610-
fail("project_title isn't expected to be used for 'go'")
610+
fail("project_title doesn't have support for the 'go' project")
611611
elif project == "dl":
612612
return "golang.org/dl"
613613
elif project == "protobuf":
@@ -617,6 +617,16 @@ def project_title(project):
617617
# the 'golang.org/' prefix is left out for brevity.
618618
return "x/" + project
619619

620+
# console_name produces the console name for the given project and branch.
621+
def console_name(project, go_branch_short, suffix):
622+
if project == "go":
623+
fail("console_name doesn't have support for the 'go' project")
624+
sort_letter = "x"
625+
if not project_title(project).startswith("x/"):
626+
# Put "z" at the beginning to sort this at the bottom of the page.
627+
sort_letter = "z"
628+
return "%s-%s-%s" % (sort_letter, project, go_branch_short) + suffix
629+
620630
# Enum values for golangbuild's "mode" property.
621631
GOLANGBUILD_MODES = {
622632
"ALL": 0,
@@ -1205,7 +1215,7 @@ def _define_go_ci():
12051215
# but because they have the same builder set and these
12061216
# bubbles show just the latest build, it doesn't actually
12071217
# matter.
1208-
"golang/x-%s-%s" % (project, go_branch_short)
1218+
"golang/" + console_name(project, go_branch_short, "")
12091219
for project in PROJECTS
12101220
if project != "go"
12111221
],
@@ -1215,19 +1225,15 @@ def _define_go_ci():
12151225
)
12161226
else:
12171227
console_title = project_title(project) + "-" + go_branch_short
1218-
sort_letter = "x"
1219-
if not console_title.startswith("x/"):
1220-
# Put "z" at the beginning to sort this at the bottom of the page.
1221-
sort_letter = "z"
12221228
luci.console_view(
1223-
name = "%s-%s-%s" % (sort_letter, project, go_branch_short),
1229+
name = console_name(project, go_branch_short, ""),
12241230
repo = "https://go.googlesource.com/%s" % project,
12251231
title = console_title,
12261232
refs = ["refs/heads/master"],
12271233
entries = make_console_view_entries(postsubmit_builders),
12281234
)
12291235
luci.console_view(
1230-
name = "%s-%s-%s-by-go" % (sort_letter, project, go_branch_short),
1236+
name = console_name(project, go_branch_short, "-by-go"),
12311237
repo = "https://go.googlesource.com/go",
12321238
title = console_title + "-by-go-commit",
12331239
refs = ["refs/heads/" + go_branch.branch],

0 commit comments

Comments
 (0)