Skip to content

Commit 09eab47

Browse files
dmitshurgopherbot
authored andcommitted
dashboard: add a map for hiding builders that migrated to LUCI
This sets a path forward for hiding builders that have migrated. Outright deleting their configuration is left for a later phase. For golang/go#65913. Updates golang/go#63471. Change-Id: Icaa40cbaf5e9395ef6f82fc70a6febc2ec8bc838 Reviewed-on: https://go-review.googlesource.com/c/build/+/568196 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 253aa5b commit 09eab47

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

cmd/coordinator/internal/dashboard/handler.go

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ func (d *Handler) getBuilders(conf map[string]*dashboard.BuildConfig, luci lucip
128128
if !b.BuildsRepoPostSubmit("go", "master", "master") {
129129
continue
130130
}
131+
if dashboard.BuildersPortedToLUCI[b.Name] && len(luci.Builders) > 0 {
132+
// Don't display old builders that have been ported
133+
// to LUCI if willing to show LUCI builders as well.
134+
continue
135+
}
131136
db := bm[b.GOOS()]
132137
db.OS = b.GOOS()
133138
db.Archs = append(db.Archs, &arch{

cmd/coordinator/internal/legacydash/ui.go

+18
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,15 @@ func (tb *uiTemplateDataBuilder) buildTemplateData(ctx context.Context, datastor
476476
for _, pkg := range ts.Packages {
477477
addBuilders(builders, pkg.Package.Name, ts.Branch())
478478
}
479+
if len(luci.Builders) > 0 {
480+
for name := range builders {
481+
if dashboard.BuildersPortedToLUCI[name] {
482+
// Don't display old builders that have been ported
483+
// to LUCI if willing to show LUCI builders as well.
484+
delete(builders, name)
485+
}
486+
}
487+
}
479488
addLUCIBuilders(luci, builders, ts.Packages, gorel.BranchName)
480489
ts.Builders = builderKeys(builders)
481490

@@ -510,6 +519,15 @@ func (tb *uiTemplateDataBuilder) buildTemplateData(ctx context.Context, datastor
510519
} else {
511520
addBuilders(builders, tb.repoGerritProj(), tb.branch())
512521
}
522+
if len(luci.Builders) > 0 {
523+
for name := range builders {
524+
if dashboard.BuildersPortedToLUCI[name] {
525+
// Don't display old builders that have been ported
526+
// to LUCI if willing to show LUCI builders as well.
527+
delete(builders, name)
528+
}
529+
}
530+
}
513531
data.Builders = builderKeys(builders)
514532

515533
if tb.res.CommitsTruncated {

dashboard/builders.go

+22
Original file line numberDiff line numberDiff line change
@@ -2863,6 +2863,24 @@ func init() {
28632863
})
28642864
}
28652865

2866+
// BuildersPortedToLUCI lists coordinator builders that have been ported
2867+
// over to LUCI and don't need to continue to run. Their results will be
2868+
// hidden from the build.golang.org page and new builds won't be started
2869+
// if stopPortedBuilders (below) is true.
2870+
//
2871+
// See go.dev/issue/65913
2872+
// and go.dev/issue/63471.
2873+
var BuildersPortedToLUCI = map[string]bool{
2874+
"wasip1-wasm-wasmedge": true, // Would be 'wasip1-wasm_wasmedge' but put off until go.dev/issue/60097 picks up activity.
2875+
2876+
// TODO(go.dev/issue/63471): Add more here. For example:
2877+
//"wasip1-wasm-wazero": true, // Available as https://ci.chromium.org/p/golang/builders/ci/gotip-wasip1-wasm_wazero.
2878+
}
2879+
2880+
// stopPortedBuilders controls whether ported builders should be stopped,
2881+
// instead of just made invisible in the web UI.
2882+
const stopPortedBuilders = false
2883+
28662884
// addBuilder adds c to the Builders map after doing some checks.
28672885
func addBuilder(c BuildConfig) {
28682886
if c.Name == "" {
@@ -2899,6 +2917,10 @@ func addBuilder(c BuildConfig) {
28992917
panic(fmt.Sprintf("build config %q host type inconsistent (must be Reverse, Image, or VM)", c.Name))
29002918
}
29012919

2920+
if BuildersPortedToLUCI[c.Name] && stopPortedBuilders {
2921+
return
2922+
}
2923+
29022924
Builders[c.Name] = &c
29032925
}
29042926

0 commit comments

Comments
 (0)