Commit graph

12 commits

Author SHA1 Message Date
88d9a1f818 Move worker api to server::web::api::worker 2023-08-13 16:04:48 +02:00
c7a89867a7 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.
2023-08-12 21:23:36 +02:00
22efa5bfc9 Save work before fetching queue 2023-08-12 14:34:03 +02:00
d15d6588f7 Improve and fix runner API
- The server now also signals abort_work if the commit is no longer in
  the queue.
- The server now immediately reserves the work it gives to the worker,
  so other idle workers won't get the same work.
- The server now chooses a run id, not the worker. The worker can still
  submit work under arbitrary run ids when no id is known, for example
  when importing runs from another database.
2023-08-12 13:19:16 +02:00
dd45be98a5 Add todo 2023-08-12 02:33:08 +02:00
5e0b8e3c8c Store finished work in db 2023-08-11 15:16:20 +02:00
a9e08505bc Stream repo and bench repo worktree tars 2023-08-11 14:42:39 +02:00
6f4793bcf2 Rename runners to workers 2023-08-11 02:12:38 +02:00
7911a67906 Overhaul runner protocol
The JSON should now be nicer to work with.
2023-08-11 02:12:38 +02:00
b16b3a668e Fix runners not disappearing 2023-08-11 02:12:38 +02:00
2079d0b12d Fix /api/runner/status 2023-08-11 02:12:38 +02:00
c713abc5d3 Implement /api/runner/status 2023-08-10 18:47:44 +02:00