Lines Matching full:reporting

22 // Backend-independent reporting logic.
72 reporting, bugReporting, crash, crashKey, _, _, _, err := needReport(c, typ, state, bug)
73 if err != nil || reporting == nil {
76 rep, err := createBugReport(c, bug, crash, crashKey, bugReporting, reporting.Config)
80 log.Infof(c, "bug %q: reporting to %v", bug.Title, reporting.Name)
85 reporting *Reporting, bugReporting *BugReporting, crash *Crash,
87 reporting, bugReporting, reportingIdx, status, err = currentReporting(c, bug)
88 if err != nil || reporting == nil {
91 if typ != "" && typ != reporting.Config.Type() {
92 status = "on a different reporting"
93 reporting, bugReporting = nil, nil
99 reporting.DisplayTitle, reproStr(bugReporting.ReproLevel),
101 reporting, bugReporting = nil, nil
104 ent := state.getEntry(timeNow(c), bug.Namespace, reporting.Name)
107 status = fmt.Sprintf("%v: initial reporting delay", reporting.DisplayTitle)
108 reporting, bugReporting = nil, nil
112 status = fmt.Sprintf("%v: waiting for C repro", reporting.DisplayTitle)
113 reporting, bugReporting = nil, nil
117 status = fmt.Sprintf("%v: no report", reporting.DisplayTitle)
118 reporting, bugReporting = nil, nil
124 status = fmt.Sprintf("%v: no crashes!", reporting.DisplayTitle)
125 reporting, bugReporting = nil, nil
128 if reporting.Config.NeedMaintainers() && len(crash.Maintainers) == 0 {
129 status = fmt.Sprintf("%v: no maintainers", reporting.DisplayTitle)
130 reporting, bugReporting = nil, nil
136 if bugReporting.Reported.IsZero() && reporting.DailyLimit != 0 &&
137 ent.Sent >= reporting.DailyLimit {
138 status = fmt.Sprintf("%v: out of quota for today", reporting.DisplayTitle)
139 reporting, bugReporting = nil, nil
146 // reporting too many bugs in a single poll.
149 status = fmt.Sprintf("%v: ready to report", reporting.DisplayTitle)
157 func currentReporting(c context.Context, bug *Bug) (*Reporting, *BugReporting, int, string, error) {
158 for i := range bug.Reporting {
159 bugReporting := &bug.Reporting[i]
163 reporting := config.Namespaces[bug.Namespace].ReportingByName(bugReporting.Name)
164 if reporting == nil {
167 switch reporting.Filter(bug) {
174 return reporting, bugReporting, i, "", nil
176 return nil, nil, 0, fmt.Sprintf("%v: reporting suspended", reporting.DisplayTitle), nil
179 return nil, nil, 0, "", fmt.Errorf("no reporting left")
308 for i := range bug.Reporting {
309 bugMap[bug.Reporting[i].ID] = bug
363 // Email reporting passes bug title in cmd.DupOf, try to find bug by title.
371 fmt.Errorf("dup does not have reporting %q", bugReporting.Name)
377 return false, internalError, fmt.Errorf("can't find bug reporting")
383 return false, fmt.Sprintf("Can't dup bug to itself in different reporting (%v->%v).\n"+
384 "Please dup syzbot bugs only onto syzbot bugs for the same kernel/reporting.",
393 return false, fmt.Sprintf("Can't dup bug to a bug in different reporting (%v->%v)."+
394 "Please dup syzbot bugs only onto syzbot bugs for the same kernel/reporting.",
434 return false, internalError, fmt.Errorf("can't find bug reporting")
505 // Close all previous reporting if they are not closed yet
507 for i := range bug.Reporting {
508 if bugReporting == &bug.Reporting[i] {
511 if bug.Reporting[i].Closed.IsZero() {
512 bug.Reporting[i].Closed = now
580 log.Errorf(c, "This bug reporting is already closed")
590 Filter("Reporting.ID=", id).
597 return nil, nil, fmt.Errorf("failed to find bug by reporting id %q", id)
600 return nil, nil, fmt.Errorf("multiple bugs for reporting id %q", id)
620 for i := range bug.Reporting {
621 if bug.Reporting[i].ID == id {
622 return &bug.Reporting[i], i == len(bug.Reporting)-1
629 for i := range bug.Reporting {
630 if bug.Reporting[i].Name == name {
631 return &bug.Reporting[i]
683 return nil, fmt.Errorf("failed to get reporting state: %v", err)
691 return fmt.Errorf("failed to put reporting state: %v", err)
698 panic(fmt.Sprintf("requesting reporting state for %v/%v", namespace, name))