diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-01-09 12:13:32 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-01-09 11:47:13 +0000 |
| commit | 4807fb37655c65620525dcf72cf9f59a27a7c58c (patch) | |
| tree | 28940ff34258c9b38f8b0f3aec1ea4cff24b771f /dashboard/app/reporting.go | |
| parent | 668b1c2966ea9e411e3c21a47e07eecfcc05b989 (diff) | |
dashboard: prevent infinite reporting of revoked repros
Fix a bug in the reporting of bugs with revoked reproducers. Add a test
that reproduces the problematic situation.
Also, ensure that we don't include the revoked reproducer into the
report we send to the next reporting stage.
Cc #4412.
Diffstat (limited to 'dashboard/app/reporting.go')
| -rw-r--r-- | dashboard/app/reporting.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index 8cd058787..8b85702ca 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -106,7 +106,7 @@ func needReport(c context.Context, typ string, state *ReportingState, bug *Bug) return } link = bugReporting.Link - if !bugReporting.Reported.IsZero() && bugReporting.ReproLevel >= bug.ReproLevel { + if !bugReporting.Reported.IsZero() && bugReporting.ReproLevel >= bug.HeadReproLevel { status = fmt.Sprintf("%v: reported%v on %v", reporting.DisplayTitle, reproStr(bugReporting.ReproLevel), html.FormatTime(bugReporting.Reported)) @@ -538,14 +538,6 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key, if len(report) > maxMailReportLen { report = report[:maxMailReportLen] } - reproC, _, err := getText(c, textReproC, crash.ReproC) - if err != nil { - return nil, err - } - reproSyz, err := loadReproSyz(c, crash) - if err != nil { - return nil, err - } machineInfo, _, err := getText(c, textMachineInfo, crash.MachineInfo) if err != nil { return nil, err @@ -573,10 +565,6 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key, ReportLink: externalLink(c, textCrashReport, crash.Report), CC: kernelRepo.CC.Always, Maintainers: append(crash.Maintainers, kernelRepo.CC.Maintainers...), - ReproC: reproC, - ReproCLink: externalLink(c, textReproC, crash.ReproC), - ReproSyz: reproSyz, - ReproSyzLink: externalLink(c, textReproSyz, crash.ReproSyz), ReproOpts: crash.ReproOpts, MachineInfo: machineInfo, MachineInfoLink: externalLink(c, textMachineInfo, crash.MachineInfo), @@ -588,6 +576,18 @@ func crashBugReport(c context.Context, bug *Bug, crash *Crash, crashKey *db.Key, Assets: assetList, ReportElements: &dashapi.ReportElements{GuiltyFiles: crash.ReportElements.GuiltyFiles}, } + if !crash.ReproIsRevoked { + rep.ReproCLink = externalLink(c, textReproC, crash.ReproC) + rep.ReproC, _, err = getText(c, textReproC, crash.ReproC) + if err != nil { + return nil, err + } + rep.ReproSyzLink = externalLink(c, textReproSyz, crash.ReproSyz) + rep.ReproSyz, err = loadReproSyz(c, crash) + if err != nil { + return nil, err + } + } if bugReporting.CC != "" { rep.CC = append(rep.CC, strings.Split(bugReporting.CC, "|")...) } |
