Lines Matching refs:crash
490 req.Crash.BuildID = req.Build.ID
491 bug, err := reportCrash(c, ns, &req.Crash)
506 req := new(dashapi.Crash)
520 func reportCrash(c context.Context, ns string, req *dashapi.Crash) (*Bug, error) {
563 log.Infof(c, "not saving crash for %q", bug.Title)
603 func saveCrash(c context.Context, ns string, req *dashapi.Crash, bugKey *datastore.Key, build *Build) error {
604 // Reporting priority of this crash.
614 crash := &Crash{
623 if crash.Log, err = putText(c, ns, textCrashLog, req.Log, false); err != nil {
626 if crash.Report, err = putText(c, ns, textCrashReport, req.Report, false); err != nil {
629 if crash.ReproSyz, err = putText(c, ns, textReproSyz, req.ReproSyz, false); err != nil {
632 if crash.ReproC, err = putText(c, ns, textReproC, req.ReproC, false); err != nil {
635 crashKey := datastore.NewIncompleteKey(c, "Crash", bugKey)
636 if _, err = datastore.Put(c, crashKey, crash); err != nil {
637 return fmt.Errorf("failed to put crash: %v", err)
646 var crashes []*Crash
647 keys, err := datastore.NewQuery("Crash").
660 keyMap := make(map[*Crash]*datastore.Key)
661 for i, crash := range crashes {
662 keyMap[crash] = keys[i]
668 // Find latest crash on each manager.
669 latestOnManager := make(map[string]*Crash)
670 for _, crash := range crashes {
671 if latestOnManager[crash.Manager] == nil {
672 latestOnManager[crash.Manager] = crash
675 // Oldest first but move latest crash on each manager to the end (preserve them).
686 for _, crash := range crashes {
687 if crash.ReproSyz != 0 || crash.ReproC != 0 || !crash.Reported.IsZero() {
691 toDelete = append(toDelete, keyMap[crash])
692 if crash.Log != 0 {
693 toDelete = append(toDelete, datastore.NewKey(c, textCrashLog, "", crash.Log, nil))
695 if crash.Report != 0 {
696 toDelete = append(toDelete, datastore.NewKey(c, textCrashReport, "", crash.Report, nil))
718 return nil, fmt.Errorf("%v: can't find bug for crash %q", ns, req.Title)
758 return nil, fmt.Errorf("%v: can't find bug for crash %q", ns, req.Title)
806 func createBugForCrash(c context.Context, ns string, req *dashapi.Crash) (*Bug, *datastore.Key, error) {