From c58e46ddd1b4c4e11e36b914bf83e50fe097ba18 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 5 Apr 2018 11:57:18 +0200 Subject: dashboard/app: allow deplaying intial bug reporting This is useful to collect reproducers and more info about trees where the bug happens before it is first reported. --- dashboard/app/config.go | 2 ++ dashboard/app/reporting.go | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'dashboard') diff --git a/dashboard/app/config.go b/dashboard/app/config.go index f629b2c76..1d8a5ca15 100644 --- a/dashboard/app/config.go +++ b/dashboard/app/config.go @@ -51,6 +51,8 @@ type Config struct { Key string // Mail bugs without reports (e.g. "no output"). MailWithoutReport bool + // How long should we wait before reporting a bug. + ReportingDelay time.Duration // How long should we wait for a C repro before reporting a bug. WaitForRepro time.Duration // Managers that were turned down and will not hold bug fixing due to missed commits. diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index 46e06886c..4a6fb1665 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -102,6 +102,11 @@ func needReport(c context.Context, typ string, state *ReportingState, bug *Bug) } ent := state.getEntry(timeNow(c), bug.Namespace, reporting.Name) cfg := config.Namespaces[bug.Namespace] + if timeSince(c, bug.FirstTime) < cfg.ReportingDelay { + status = fmt.Sprintf("%v: initial reporting delay", reporting.DisplayTitle) + reporting, bugReporting = nil, nil + return + } if bug.ReproLevel < ReproLevelC && timeSince(c, bug.FirstTime) < cfg.WaitForRepro { status = fmt.Sprintf("%v: waiting for C repro", reporting.DisplayTitle) reporting, bugReporting = nil, nil -- cgit mrf-deployment