Commit graph

205 commits

Author SHA1 Message Date
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
53be0338f2 Launch idle thread for each server 2023-08-12 21:23:36 +02:00
4f63b02509 Fix and simplify tar downloads 2023-08-12 19:19:43 +02:00
81328fcf04 Start reimplementing worker 2023-08-12 19:19:43 +02:00
22efa5bfc9 Save work before fetching queue 2023-08-12 14:34:03 +02:00
416e3e6aa1 Implement internal runner 2023-08-12 14:21:48 +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
9fc7c22ae8 Dispatch based on bench method 2023-08-12 02:26:15 +02:00
b23fc6460f Start runs and coordinate with server 2023-08-12 02:16:05 +02:00
f79468c871 Fix incorrect HashSet import 2023-08-12 02:16:05 +02:00
cc87171f62 Download and unpack tars 2023-08-12 02:16:05 +02:00
3d959c703c Add dash to id prefixes 2023-08-12 02:16:05 +02:00
9744d5c059 Add todos 2023-08-11 21:47:58 +02:00
a7afbea0b9 Move queue js to /queue.js 2023-08-11 16:52:27 +02:00
48693d3f1c Add "Enqueue" button to commits 2023-08-11 16:50:32 +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
78f945647c Add --local-runner cli flag 2023-08-11 02:12:38 +02:00
0ae43c608f Ping server regularly 2023-08-11 02:12:38 +02:00
33607779b0 Poke server tasks in coordinator 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
f3d646c8d5 List runners in queue 2023-08-10 23:04:34 +02:00
c3c597897c Add typed commit links 2023-08-10 22:04:30 +02:00
0253d2d90b Add /runner/:name endpoint 2023-08-10 21:26:57 +02:00
b5bdd49d9c Add --open cli flag 2023-08-10 21:10:07 +02:00
6ed6ff1a36 Ensure base path always starts and ends with /
The base path is an absolute path, so it should always start with /.
Whenever it is used, it must also always be followed by at least one /,
so baking that into the value makes sense. Finally, we can now
deduplicate the / in case the base path is the root.
2023-08-10 21:03:25 +02:00
d5a41abaff Remove /commit/ endpoint 2023-08-10 20:40:41 +02:00
c713abc5d3 Implement /api/runner/status 2023-08-10 18:47:44 +02:00
5c8c037417 Move logo inside first nav <a> 2023-08-10 17:50:23 +02:00
7338de98a5 Add web.runner_token and web.runner_timeout options 2023-08-10 17:50:23 +02:00
8005718584 Generate random runner tokens 2023-08-10 17:50:23 +02:00
f84a5b288e Add --bench-script cli arg 2023-08-10 17:50:23 +02:00
e03617edda Update design notes on runner api 2023-08-10 17:50:23 +02:00
9ff95a2c10 Model server-runner communication 2023-08-10 17:50:23 +02:00
13fed3d18e Add lang to html tag 2023-08-09 23:13:24 +02:00
724aed001f Add meta viewport tag 2023-08-09 22:32:08 +02:00
65d23f0994 Create tables for runs and measurements 2023-08-09 16:27:25 +02:00
e5de9ccb97 Identify queue items by commit hash, not id 2023-08-09 16:20:20 +02:00
bf08d00922 Implement basic runner structure 2023-08-09 16:00:43 +02:00
23ae5613c7 Add runner config options 2023-08-09 15:59:42 +02:00
9264e033fa Make config structs private 2023-08-09 15:18:47 +02:00
28de8b1cc1 Implement Coordinator 2023-08-09 14:57:31 +02:00
04212dff1c Make repo optional 2023-08-09 14:13:17 +02:00
a261bfdd26 Derive repo name based on repo path 2023-08-09 00:24:34 +02:00
6604cccf9e Restrict web server to localhost by default
While this is one more thing to configure when running tablejohn as a
web server, the overhead should be negligible if I provide an example
server config. Security trumps convenience - this time.
2023-08-09 00:03:45 +02:00
8b53a22b78 Make web server address configurable 2023-08-09 00:03:34 +02:00