aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/pkg
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-05-12 14:27:49 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-05-13 10:05:33 +0000
commita11966dc8beffc94c9f60f6ad1188b3a02f770f0 (patch)
tree571a9556119f3bbcf18999f0440aa2eee1db97e4 /syz-cluster/pkg
parent7b19e0e9cba1cd0044ce7784c9112e07356f2f1e (diff)
syz-cluster: make reporter names more specific
Since email-reporter is anyway tied to a specific reporting channel, let's keep reporter names less generic. Using "lkml" instead of just "email" will also let us generate proper links to the email discussions based only on Reporter+MessageID.
Diffstat (limited to 'syz-cluster/pkg')
-rw-r--r--syz-cluster/pkg/api/reporter.go2
-rw-r--r--syz-cluster/pkg/reporter/api_test.go8
-rw-r--r--syz-cluster/pkg/reporter/generator.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/syz-cluster/pkg/api/reporter.go b/syz-cluster/pkg/api/reporter.go
index 9b0f55d03..5a7b7bfb4 100644
--- a/syz-cluster/pkg/api/reporter.go
+++ b/syz-cluster/pkg/api/reporter.go
@@ -21,7 +21,7 @@ type NextReportResp struct {
Report *SessionReport `json:"report"`
}
-const EmailReporter = "email"
+const LKMLReporter = "lkml"
func (client ReporterClient) GetNextReport(ctx context.Context, reporter string) (*NextReportResp, error) {
v := url.Values{}
diff --git a/syz-cluster/pkg/reporter/api_test.go b/syz-cluster/pkg/reporter/api_test.go
index b3f1dbc6a..599c10e9c 100644
--- a/syz-cluster/pkg/reporter/api_test.go
+++ b/syz-cluster/pkg/reporter/api_test.go
@@ -26,9 +26,9 @@ func TestAPIReportFlow(t *testing.T) {
reportClient := TestServer(t, env)
// The same report will be returned multiple times.
- nextResp, err := reportClient.GetNextReport(ctx, api.EmailReporter)
+ nextResp, err := reportClient.GetNextReport(ctx, api.LKMLReporter)
assert.NoError(t, err)
- nextResp2, err := reportClient.GetNextReport(ctx, api.EmailReporter)
+ nextResp2, err := reportClient.GetNextReport(ctx, api.LKMLReporter)
assert.NoError(t, err)
assert.Equal(t, nextResp2, nextResp)
// We don't know IDs in advance.
@@ -68,7 +68,7 @@ func TestAPIReportFlow(t *testing.T) {
assert.NoError(t, err)
// It should no longer appear in Next().
- emptyNext, err := reportClient.GetNextReport(ctx, api.EmailReporter)
+ emptyNext, err := reportClient.GetNextReport(ctx, api.LKMLReporter)
assert.NoError(t, err)
assert.Nil(t, emptyNext.Report)
@@ -79,7 +79,7 @@ func TestAPIReportFlow(t *testing.T) {
assert.NoError(t, err)
// It should appear again, now with Moderation=false.
- nextResp3, err := reportClient.GetNextReport(ctx, api.EmailReporter)
+ nextResp3, err := reportClient.GetNextReport(ctx, api.LKMLReporter)
assert.NoError(t, err)
assert.False(t, nextResp3.Report.Moderation)
assert.Equal(t, nextResp2.Report.Series, nextResp3.Report.Series)
diff --git a/syz-cluster/pkg/reporter/generator.go b/syz-cluster/pkg/reporter/generator.go
index f7ff5501e..185a087fc 100644
--- a/syz-cluster/pkg/reporter/generator.go
+++ b/syz-cluster/pkg/reporter/generator.go
@@ -59,7 +59,7 @@ func (rg *ReportGenerator) Process(ctx context.Context, limit int) error {
report := &db.SessionReport{
SessionID: session.ID,
Moderation: true,
- Reporter: api.EmailReporter,
+ Reporter: api.LKMLReporter,
}
err := rg.reportRepo.Insert(ctx, report)
if err != nil {