Skip to content

Commit d636fbf

Browse files
committed
app/appengine: show all builder columns, even if they don't have results
Fixes golang/go#19930 Change-Id: Ia6018a2e93bea123b684d2708d858adcca7bb4e4 Reviewed-on: https://go-review.googlesource.com/c/build/+/170443 Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent b7cb1e8 commit d636fbf

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

app/appengine/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# build.golang.org App Engine App
22

3-
Update with
3+
This is the code that runs https://build.golang.org/
4+
5+
## Local development
6+
7+
On a machine with a browser:
8+
9+
```
10+
dev_appserver.py --port=8080 .
11+
```
12+
13+
With a remote VM with a port open to the Internet:
14+
15+
```
16+
dev_appserver.py --enable_host_checking=false --host=0.0.0.0 --port=8080 .
17+
```
18+
19+
## Deploying
420

521
```sh
622
gcloud config set project golang-org

app/appengine/ui.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"time"
2424

2525
"golang.org/x/build/app/cache"
26+
"golang.org/x/build/dashboard"
2627
"golang.org/x/build/types"
2728

2829
"google.golang.org/appengine"
@@ -356,16 +357,22 @@ func commitBuilders(commits []*Commit) []string {
356357
builders[r.Builder] = true
357358
}
358359
}
359-
// In dev_appserver mode, add some dummy data:
360-
if len(builders) == 0 && isDevAppServer {
361-
return []string{"linux-amd64", "linux-amd64-nocgo", "linux-amd64-race", "windows-386", "windows-amd64"}
360+
// Add all known builders from the builder configuration too.
361+
// We want to see columns even if there are no results so we
362+
// can identify missing builders. (Issue 19930)
363+
for name, bc := range dashboard.Builders {
364+
if !bc.BuildsRepoPostSubmit("go", "master", "master") {
365+
continue
366+
}
367+
builders[name] = true
362368
}
363369
k := keys(builders)
364370
sort.Sort(builderOrder(k))
365371
return k
366372
}
367373

368374
func keys(m map[string]bool) (s []string) {
375+
s = make([]string, 0, len(m))
369376
for k := range m {
370377
s = append(s, k)
371378
}

0 commit comments

Comments
 (0)