Restructure shared types and db columns

Now, the server sends the runner pretty much all run metadata. This way,
the reservation the server makes for the runner is accurate, providing
the runner responds with the same metadata it was sent. It also means
that only the server's system clock is relevant for tie breakers, and a
run's duration spans from the moment it is reserved to the moment it is
saved.

Also, the bench method is now always called `bench_method` and a
human-readable description is stored in the database for each run.
This commit is contained in:
Joscha 2023-08-12 19:15:38 +02:00
parent 53be0338f2
commit c7a89867a7
8 changed files with 121 additions and 98 deletions

View file

@ -1,9 +1,10 @@
CREATE TABLE runs (
id TEXT NOT NULL PRIMARY KEY,
hash TEXT NOT NULL,
start TEXT NOT NULL,
end TEXT NOT NULL,
exit_code INT NOT NULL,
id TEXT NOT NULL PRIMARY KEY,
hash TEXT NOT NULL,
bench_method TEXT NOT NULL,
start TEXT NOT NULL,
end TEXT NOT NULL,
exit_code INT NOT NULL,
FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE
) STRICT;