From 432c8d9a7e0a8634b76dd86d8489c729f480f35a Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 7 Jul 2023 12:17:14 +0200 Subject: dashboard: include Manager into BugReport De-facto BugReport anyway refers to a specified crash and not just to the bug in general. Let's also include the Manager field there. --- dashboard/app/reporting.go | 1 + dashboard/app/reporting_test.go | 2 ++ dashboard/dashapi/dashapi.go | 1 + 3 files changed, 4 insertions(+) diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index f26ddac99..071d67339 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -565,6 +565,7 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key, CrashTime: crash.Time, NumCrashes: bug.NumCrashes, HappenedOn: managersToRepos(c, bug.Namespace, bug.HappenedOn), + Manager: crash.Manager, Assets: assetList, ReportElements: &dashapi.ReportElements{GuiltyFiles: crash.ReportElements.GuiltyFiles}, } diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go index 7c34edf5e..26ce564cd 100644 --- a/dashboard/app/reporting_test.go +++ b/dashboard/app/reporting_test.go @@ -84,6 +84,7 @@ func TestReportBug(t *testing.T) { CrashID: rep.CrashID, CrashTime: timeNow(c.ctx), NumCrashes: 1, + Manager: "manager1", HappenedOn: []string{"repo1 branch1"}, Assets: []dashapi.Asset{}, ReportElements: &dashapi.ReportElements{GuiltyFiles: []string{"a.c"}}, @@ -254,6 +255,7 @@ func TestInvalidBug(t *testing.T) { CrashID: rep.CrashID, CrashTime: timeNow(c.ctx), NumCrashes: 1, + Manager: "manager1", HappenedOn: []string{"repo1 branch1"}, Assets: []dashapi.Asset{}, ReportElements: &dashapi.ReportElements{}, diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 96e8dff0e..a64ee2ad5 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -424,6 +424,7 @@ type BugReport struct { ReproOpts []byte MachineInfo []byte MachineInfoLink string + Manager string CrashID int64 // returned back in BugUpdate CrashTime time.Time NumCrashes int64 -- cgit mrf-deployment