aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-05-26 13:03:41 +0200
committerAleksandr Nogikh <wp32pw@gmail.com>2023-05-26 13:52:20 +0200
commitcf1845599c0bdab59c69518eaa0ecb960ec7ddf0 (patch)
tree0efc6da35eefd2f1ce2caabf46ee8c399aa8ed5a /dashboard
parent1497c3f6913e5ca4d74befc14791f14dd4bc5a70 (diff)
dashboard: include tree origin jobs into full bug info
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/app/reporting.go5
-rw-r--r--dashboard/app/tree_test.go17
-rw-r--r--dashboard/dashapi/dashapi.go1
3 files changed, 23 insertions, 0 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go
index 2a45be82f..f26ddac99 100644
--- a/dashboard/app/reporting.go
+++ b/dashboard/app/reporting.go
@@ -1456,6 +1456,11 @@ func loadFullBugInfo(c context.Context, bug *Bug, bugKey *db.Key,
}
ret.Crashes = append(ret.Crashes, rep)
}
+ // Query tree testing jobs.
+ ret.TreeJobs, err = treeTestJobs(c, bug)
+ if err != nil {
+ return nil, err
+ }
return ret, nil
}
diff --git a/dashboard/app/tree_test.go b/dashboard/app/tree_test.go
index 7c67c9caf..8ffcfdc07 100644
--- a/dashboard/app/tree_test.go
+++ b/dashboard/app/tree_test.go
@@ -71,6 +71,15 @@ Didn't crash.
More details can be found at:
%URL%
`)
+ // Test that these results are also in the full bug info.
+ info := ctx.fullBugInfo()
+ c.expectEQ(len(info.TreeJobs), 3)
+ c.expectEQ(info.TreeJobs[0].KernelAlias, `downstream`)
+ c.expectNE(info.TreeJobs[0].CrashTitle, ``)
+ c.expectEQ(info.TreeJobs[1].KernelAlias, `lts`)
+ c.expectEQ(info.TreeJobs[1].CrashTitle, ``)
+ c.expectEQ(info.TreeJobs[2].KernelAlias, `upstream`)
+ c.expectEQ(info.TreeJobs[2].CrashTitle, ``)
}
func TestTreeOriginDownstreamEmail(t *testing.T) {
@@ -810,6 +819,14 @@ func (ctx *treeTestCtx) reportToEmail() *aemail.Message {
return ctx.ctx.pollEmailBug()
}
+func (ctx *treeTestCtx) fullBugInfo() *dashapi.FullBugInfo {
+ info, err := ctx.client.LoadFullBug(&dashapi.LoadFullBugReq{
+ BugID: ctx.bugReport.ID,
+ })
+ ctx.ctx.expectOK(err)
+ return info
+}
+
var urlRe = regexp.MustCompile(`(https?://[\w\./\?\=&]+)`)
func (ctx *treeTestCtx) emailWithoutURLs() *aemail.Message {
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go
index 6f6bc81c7..85ac82b44 100644
--- a/dashboard/dashapi/dashapi.go
+++ b/dashboard/dashapi/dashapi.go
@@ -785,6 +785,7 @@ type FullBugInfo struct {
BisectCause *BugReport
BisectFix *BugReport
Crashes []*BugReport
+ TreeJobs []*JobInfo
}
type SimilarBugInfo struct {