From 12ec8ac2175a1ef4820e589d8a17ea33ec7b5813 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 3 Aug 2023 23:06:05 +0200 Subject: [PATCH] Write down some design notes --- README.md | 30 ++++++++++++++++++++++++++++++ src/main.rs | 1 + 2 files changed, 31 insertions(+) diff --git a/README.md b/README.md index 542a60e..a4ce46a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ # tablejohn A tool to run benchmarks for a git repo and display their results. + +## Design notes + +- A tablejohn instance tracks exactly one git repository. +- A tablejohn instance has exactly one sqlite db. +- Tablejohn does not clone or update repos, only inspect them. +- Tablejohn can inspect bare and non-bare repos. +- Server settings should go in a config file. +- Repo settings should go in the db and be managed via the web UI. +- Locally, tablejohn should just work™ without custom config. +- Run via `tablejohn []` + +- The db contains... + - Known commits + - Runs and their measurements + - Queue of tasks (not-yet-run runs) + - Tracked branches (new commits are added to the queue automatically) + - Github commands + +- Runners... + - Ping tablejohn instance regularly with their info? + - WS connection complex, but quicker to update + - Reserve tasks (for a limited amount of time 10 min?) + - Steal tasks based on time already spent on task + - Update server on tasks + - Maybe this is the same as reserving a task? + - Include last few lines of output + - Turn tasks into runs + - Handle errors sensibly + - Include full output (stdout and stderr), especially if task fails diff --git a/src/main.rs b/src/main.rs index 0726c65..ef7ea40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,7 @@ async fn run() -> anyhow::Result<()> { }), ) .fallback(get(r#static::static_handler)); + // TODO Add text body to body-less status codes axum::Server::bind(&"0.0.0.0:8000".parse().unwrap()) .serve(app.into_make_service())