diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-02-13 11:57:14 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-02-14 13:40:12 +0000 |
| commit | f20e88b2468bdcdb631b14e384f1f9a67e984013 (patch) | |
| tree | d2758c08ab9deea9354a91237a3d9234de0efce3 /syz-cluster/pkg/db/migrations/1_initialize.up.sql | |
| parent | eaf86f3f4dc8a7190abf09fe840e20bcf83709d8 (diff) | |
syz-cluster: report session results
Provide an API to set up the reporting of finished sessions for which
syz-cluster collected reportable findings.
The actual sending of the results is to be done in a separate component
that would:
1) Call Next() to get the next report to send.
2) Call Confirm() to confirm that the report has been sent.
3) Call Upstream() if the report has been moderated and needs to be sent
to e.g. public mailing lists.
Diffstat (limited to 'syz-cluster/pkg/db/migrations/1_initialize.up.sql')
| -rw-r--r-- | syz-cluster/pkg/db/migrations/1_initialize.up.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/syz-cluster/pkg/db/migrations/1_initialize.up.sql b/syz-cluster/pkg/db/migrations/1_initialize.up.sql index 0be0c7cef..e7a1b396d 100644 --- a/syz-cluster/pkg/db/migrations/1_initialize.up.sql +++ b/syz-cluster/pkg/db/migrations/1_initialize.up.sql @@ -61,6 +61,7 @@ CREATE TABLE Sessions ( ) PRIMARY KEY(ID); ALTER TABLE Series ADD CONSTRAINT FK_SeriesLatestSession FOREIGN KEY (LatestSessionID) REFERENCES Sessions (ID); +CREATE INDEX SessionsByFinishedAt ON Sessions (FinishedAt); -- Individual tests/steps completed within a session. CREATE TABLE SessionTests ( @@ -94,3 +95,16 @@ CREATE TABLE Findings ( ) PRIMARY KEY (ID); CREATE UNIQUE INDEX NoDupFindings ON Findings(SessionID, TestName, Title); + +-- Session's bug reports. +CREATE TABLE SessionReports ( + ID STRING(36) NOT NULL, -- UUID?? + SessionID STRING(36) NOT NULL, -- UUID + ReportedAt TIMESTAMP, + Moderation BOOL, + Link STRING(256), + CONSTRAINT FK_SessionReports FOREIGN KEY (SessionID) REFERENCES Sessions (ID), +) PRIMARY KEY(ID); + +CREATE UNIQUE INDEX NoDupSessionReports ON SessionReports(SessionID, Moderation); +CREATE INDEX SessionReportsByStatus ON SessionReports (Moderation, ReportedAt); |
