aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/pkg/db
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-04-10 15:09:06 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-04-11 10:07:50 +0000
commit4d9e57eb150fee8d24ff32fb4a8a414c77d246e6 (patch)
tree9214e0b17c3aa833b9f812b52c5ecf7b28b4d741 /syz-cluster/pkg/db
parentdfb5be349af98db984a0944f49896f454e4bc8a6 (diff)
syz-cluster: provide API for uploading artifacts archive
The archive would be a useful source of debugging information. Provide an HTTP endpoint that accepts a multipart form request with the archived data. Provide an *api.Client method to encapsulate the encoding of the data. Add a test.
Diffstat (limited to 'syz-cluster/pkg/db')
-rw-r--r--syz-cluster/pkg/db/entities.go15
-rw-r--r--syz-cluster/pkg/db/migrations/1_initialize.up.sql1
2 files changed, 9 insertions, 7 deletions
diff --git a/syz-cluster/pkg/db/entities.go b/syz-cluster/pkg/db/entities.go
index 43f0a4968..688bb8971 100644
--- a/syz-cluster/pkg/db/entities.go
+++ b/syz-cluster/pkg/db/entities.go
@@ -106,13 +106,14 @@ func (s *Session) SetSkipReason(reason string) {
}
type SessionTest struct {
- SessionID string `spanner:"SessionID"`
- BaseBuildID spanner.NullString `spanner:"BaseBuildID"`
- PatchedBuildID spanner.NullString `spanner:"PatchedBuildID"`
- UpdatedAt time.Time `spanner:"UpdatedAt"`
- TestName string `spanner:"TestName"`
- Result string `spanner:"Result"`
- LogURI string `spanner:"LogURI"`
+ SessionID string `spanner:"SessionID"`
+ BaseBuildID spanner.NullString `spanner:"BaseBuildID"`
+ PatchedBuildID spanner.NullString `spanner:"PatchedBuildID"`
+ UpdatedAt time.Time `spanner:"UpdatedAt"`
+ TestName string `spanner:"TestName"`
+ Result string `spanner:"Result"`
+ LogURI string `spanner:"LogURI"`
+ ArtifactsArchiveURI string `spanner:"ArtifactsArchiveURI"`
}
type Finding struct {
diff --git a/syz-cluster/pkg/db/migrations/1_initialize.up.sql b/syz-cluster/pkg/db/migrations/1_initialize.up.sql
index e7a1b396d..c8938ca53 100644
--- a/syz-cluster/pkg/db/migrations/1_initialize.up.sql
+++ b/syz-cluster/pkg/db/migrations/1_initialize.up.sql
@@ -72,6 +72,7 @@ CREATE TABLE SessionTests (
BaseBuildID STRING(36),
PatchedBuildID STRING(36),
LogURI STRING(256) NOT NULL,
+ ArtifactsArchiveURI STRING(256) NOT NULL,
CONSTRAINT FK_SessionResults FOREIGN KEY (SessionID) REFERENCES Sessions (ID),
CONSTRAINT ResultEnum CHECK (Result IN ('passed', 'failed', 'error', 'running')),
CONSTRAINT FK_BaseBuild FOREIGN KEY (BaseBuildID) REFERENCES Builds (ID),