aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-01-19 14:36:15 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-01-19 16:56:30 +0100
commit71197f3ac138d7cb03551b7d2159bfc4ecf5c5c2 (patch)
treedf456c30da34d3f3bbf8b8fe284b82fa12f61d1c
parent7cec19129d29eb6e3a6559bcebb46bd4097f080b (diff)
dashboard: show no more than 10 repro retesting jobs
We do have cases [1] where a syzbot problem has led to numerous patch testing requests for a bug. There's no sense to display them all. [1] https://syzkaller.appspot.com/bug?id=0881c535c265ca965edc49c0ac3d0a9850d26eb1
-rw-r--r--dashboard/app/main.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go
index 34a2ddf93..9d1340425 100644
--- a/dashboard/app/main.go
+++ b/dashboard/app/main.go
@@ -543,7 +543,7 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error
SampleReport: sampleReport,
Crashes: crashesTable,
TestPatchJobs: &uiJobList{
- Title: "Patch testing requests:",
+ Title: "Last patch testing requests:",
PerBug: true,
Jobs: testPatchJobs,
},
@@ -1497,6 +1497,7 @@ func getUIJobs(keys []*db.Key, jobs []*Job) []*uiJob {
func loadTestPatchJobs(c context.Context, bug *Bug) ([]*uiJob, error) {
bugKey := bug.key(c)
+
var jobs []*Job
keys, err := db.NewQuery("Job").
Ancestor(bugKey).
@@ -1507,8 +1508,16 @@ func loadTestPatchJobs(c context.Context, bug *Bug) ([]*uiJob, error) {
if err != nil {
return nil, err
}
+ const maxAutomaticJobs = 10
+ autoJobsLeft := maxAutomaticJobs
var results []*uiJob
for i, job := range jobs {
+ if job.User == "" {
+ if autoJobsLeft == 0 {
+ continue
+ }
+ autoJobsLeft--
+ }
var build *Build
if job.BuildID != "" {
if build, err = loadBuild(c, bug.Namespace, job.BuildID); err != nil {