aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-11-07 14:27:46 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-07 14:27:46 +0100
commit461291eaaff30cc4a481c301a20beb1370894e47 (patch)
tree3a4d8c9385f6c29a0bd13247e48e57b70235372c
parent9cf4d4ed2e6b3f689e760845ee2780beaaeff087 (diff)
dashboard/app: show what fix bisections we will mail
Show [report pending] for fix bisections that we will send. Help to analyze what will happen when we enable mailing of fix bisections. Update #1271
-rw-r--r--dashboard/app/main.go14
-rw-r--r--dashboard/app/templates.html1
2 files changed, 12 insertions, 3 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go
index f1c57cecd..685649c9c 100644
--- a/dashboard/app/main.go
+++ b/dashboard/app/main.go
@@ -443,7 +443,7 @@ func getUIJob(c context.Context, bug *Bug, jobType JobType) (*uiJob, error) {
if err != nil {
return nil, err
}
- return makeUIJob(job, jobKey, crash, build), nil
+ return makeUIJob(job, jobKey, bug, crash, build), nil
}
// handleText serves plain text blobs (crash logs, reports, reproducers, etc).
@@ -1036,12 +1036,12 @@ func loadRecentJobs(c context.Context) ([]*uiJob, error) {
}
var results []*uiJob
for i, job := range jobs {
- results = append(results, makeUIJob(job, keys[i], nil, nil))
+ results = append(results, makeUIJob(job, keys[i], nil, nil, nil))
}
return results, nil
}
-func makeUIJob(job *Job, jobKey *db.Key, crash *Crash, build *Build) *uiJob {
+func makeUIJob(job *Job, jobKey *db.Key, bug *Bug, crash *Crash, build *Build) *uiJob {
ui := &uiJob{
Type: job.Type,
Created: job.Created,
@@ -1062,10 +1062,18 @@ func makeUIJob(job *Job, jobKey *db.Key, crash *Crash, build *Build) *uiJob {
CrashReportLink: textLink(textCrashReport, job.CrashReport),
LogLink: textLink(textLog, job.Log),
ErrorLink: textLink(textError, job.Error),
+ Reported: job.Reported,
}
if !job.Finished.IsZero() {
ui.Duration = job.Finished.Sub(job.Started)
}
+ if job.Type == JobBisectCause || job.Type == JobBisectFix {
+ // We don't report these yet (or at all), see pollCompletedJobs.
+ if len(job.Commits) != 1 ||
+ bug != nil && (len(bug.Commits) != 0 || bug.Status != BugStatusOpen) {
+ ui.Reported = true
+ }
+ }
for _, com := range job.Commits {
ui.Commits = append(ui.Commits, &uiCommit{
Hash: com.Hash,
diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html
index 3f64ab2af..64a750be9 100644
--- a/dashboard/app/templates.html
+++ b/dashboard/app/templates.html
@@ -286,6 +286,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the
{{optlink .Crash.ReproSyzLink "syz"}}
{{optlink .Crash.KernelConfigLink ".config"}}<br>
{{end}}
+ {{if not .Reported}}[report pending]<br>{{end}}
{{end}}
{{end}}