aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-07-10 11:37:14 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-07-10 09:50:07 +0000
commit19d4829ff49f988d196c48718dd1e6fadbf83743 (patch)
treeb54bd407229b96b49c77b95973a3913588e855ee /syz-cluster
parentd7384b6d0bff77c60aad349866f126ab16ce5296 (diff)
syz-cluster: set report ID for outgoing emails
This allows the dashapi-based sender include them in the email address.
Diffstat (limited to 'syz-cluster')
-rw-r--r--syz-cluster/email-reporter/handler.go1
-rw-r--r--syz-cluster/email-reporter/handler_test.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/syz-cluster/email-reporter/handler.go b/syz-cluster/email-reporter/handler.go
index cecf39d57..7ea229483 100644
--- a/syz-cluster/email-reporter/handler.go
+++ b/syz-cluster/email-reporter/handler.go
@@ -74,6 +74,7 @@ func (h *Handler) report(ctx context.Context, rep *api.SessionReport) error {
To: rep.Cc,
Body: body,
Cc: []string{h.emailConfig.ArchiveList},
+ BugID: rep.ID,
}
if rep.Moderation {
toSend.To = []string{h.emailConfig.ModerationList}
diff --git a/syz-cluster/email-reporter/handler_test.go b/syz-cluster/email-reporter/handler_test.go
index fd9f54615..21ea14149 100644
--- a/syz-cluster/email-reporter/handler_test.go
+++ b/syz-cluster/email-reporter/handler_test.go
@@ -33,6 +33,7 @@ func TestModerationReportFlow(t *testing.T) {
To: []string{testEmailConfig.ModerationList},
Cc: []string{testEmailConfig.ArchiveList},
Subject: "[moderation/CI] Re: " + testSeries.Title,
+ BugID: report.ID,
// Note that InReplyTo and Cc are nil.
}, receivedEmail)
@@ -48,7 +49,7 @@ func TestModerationReportFlow(t *testing.T) {
assert.NoError(t, err)
// The report must be sent upstream.
- _, err = handler.PollAndReport(ctx)
+ report, err = handler.PollAndReport(ctx)
assert.NoError(t, err)
receivedEmail = emailServer.email()
@@ -59,6 +60,7 @@ func TestModerationReportFlow(t *testing.T) {
Cc: []string{testEmailConfig.ArchiveList},
Subject: "[name] Re: " + testSeries.Title,
InReplyTo: testSeries.ExtID,
+ BugID: report.ID,
}, receivedEmail)
}