aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-20 15:07:45 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-20 16:56:58 +0100
commit85fb2860522a96827cf384f9c35bbd5131f00a54 (patch)
tree2bc341894b9f1304acfc4268fdcdab54ba6d4d9a /dashboard
parent4514465649b2a7705bca7c4737b0517a86315a84 (diff)
dashboard/app: add link to dashboard to bug emails
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/app/email_test.go12
-rw-r--r--dashboard/app/mail_bug.txt1
-rw-r--r--dashboard/app/reporting_email.go3
3 files changed, 12 insertions, 4 deletions
diff --git a/dashboard/app/email_test.go b/dashboard/app/email_test.go
index 6ce4a5b7a..3ec492000 100644
--- a/dashboard/app/email_test.go
+++ b/dashboard/app/email_test.go
@@ -52,6 +52,7 @@ func TestEmailReport(t *testing.T) {
syzbot hit the following crash on repo1/branch1 commit
kernel_commit1 (Sat Feb 3 04:05:06 0001 +0000)
kernel_commit_title1
+syzbot dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
Unfortunately, I don't have any reproducer for this crash yet.
Raw console output is attached.
@@ -60,7 +61,7 @@ compiler: compiler1
CC: [bar@foo.com foo@bar.com]
IMPORTANT: if you fix the bug, please add the following tag to the commit:
-Reported-by: syzbot+%v@testapp.appspotmail.com
+Reported-by: syzbot+%[1]v@testapp.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for details.
If you forward the report, please keep this part and the footer.
@@ -158,6 +159,7 @@ For more options, visit https://groups.google.com/d/optout.
body := fmt.Sprintf(`syzbot has found reproducer for the following crash on repo1/branch1 commit
kernel_commit1 (Sat Feb 3 04:05:06 0001 +0000)
kernel_commit_title1
+syzbot dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
So far this crash happened 2 times on repo1/branch1.
syzkaller reproducer is attached.
@@ -167,7 +169,7 @@ compiler: compiler1
CC: [bar@foo.com foo@bar.com]
IMPORTANT: if you fix the bug, please add the following tag to the commit:
-Reported-by: syzbot+%v@testapp.appspotmail.com
+Reported-by: syzbot+%[1]v@testapp.appspotmail.com
It will help syzbot understand when the bug is fixed.
report1
@@ -210,6 +212,7 @@ report1
syzbot hit the following crash on repo1/branch1 commit
kernel_commit1 (Sat Feb 3 04:05:06 0001 +0000)
kernel_commit_title1
+syzbot dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
So far this crash happened 2 times on repo1/branch1.
syzkaller reproducer is attached.
@@ -218,7 +221,7 @@ compiler: compiler1
.config is attached.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
-Reported-by: syzbot+%v@testapp.appspotmail.com
+Reported-by: syzbot+%[1]v@testapp.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for details.
If you forward the report, please keep this part and the footer.
@@ -296,6 +299,7 @@ Content-Type: text/plain
body := fmt.Sprintf(`syzbot has found reproducer for the following crash on repo2/branch2 commit
kernel_commit2 (Sat Feb 3 04:05:06 0001 +0000)
kernel_commit_title2
+syzbot dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
So far this crash happened 3 times on repo1/branch1, repo2/branch2.
C reproducer is attached.
@@ -305,7 +309,7 @@ compiler: compiler2
.config is attached.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
-Reported-by: syzbot+%v@testapp.appspotmail.com
+Reported-by: syzbot+%[1]v@testapp.appspotmail.com
It will help syzbot understand when the bug is fixed.
report1
diff --git a/dashboard/app/mail_bug.txt b/dashboard/app/mail_bug.txt
index 023dfd9e4..4ca3fda47 100644
--- a/dashboard/app/mail_bug.txt
+++ b/dashboard/app/mail_bug.txt
@@ -5,6 +5,7 @@ Hello,
syzbot {{if .First}}hit{{else}}has found reproducer for{{end}} the following crash on {{.KernelRepo}} commit
{{.KernelCommit}}{{if .KernelCommitDate}} ({{.KernelCommitDate}}){{end}}{{if .KernelCommitTitle}}
{{.KernelCommitTitle}}{{end}}
+syzbot dashboard link: {{.Link}}
{{if ne .NumCrashes 1}}So far this crash happened {{.NumCrashes}} times on {{formatList .HappenedOn}}.
{{end}}{{if .ReproC}}C reproducer is attached.
diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go
index 17b1fd98b..4a390e182 100644
--- a/dashboard/app/reporting_email.go
+++ b/dashboard/app/reporting_email.go
@@ -211,9 +211,11 @@ func emailReport(c context.Context, rep *dashapi.BugReport, templ string) error
if rep.Arch == "386" {
userspaceArch = "i386"
}
+ link := fmt.Sprintf("https://%v.appspot.com/bug?extid=%v", appengine.AppID(c), rep.ID)
// Data passed to the template.
type BugReportData struct {
First bool
+ Link string
CreditEmail string
Moderation bool
Maintainers []string
@@ -236,6 +238,7 @@ func emailReport(c context.Context, rep *dashapi.BugReport, templ string) error
}
data := &BugReportData{
First: rep.First,
+ Link: link,
CreditEmail: creditEmail,
Moderation: cfg.Moderation,
Maintainers: rep.Maintainers,