aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-13 17:18:52 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-13 18:06:57 +0100
commit99f37a4eb8a0475a54135baa5d9fcd89329845cf (patch)
treefb19b1ebf2fa7b09a1b48799e83dfec935cf2abf /sqitch/sqlite
parenta7da2619b97a3dbc9013d2254c86feeb0f26d92d (diff)
downloadbuild-coordinator-99f37a4eb8a0475a54135baa5d9fcd89329845cf.tar
build-coordinator-99f37a4eb8a0475a54135baa5d9fcd89329845cf.tar.gz
Add a new table to store setup_failures
This is when a build was allocated to an agent, but the agent couldn't setup the environment for the build. One failure I'm particularly thinking about is where inputs to the derivation are missing, so add another table to store them.
Diffstat (limited to 'sqitch/sqlite')
-rw-r--r--sqitch/sqlite/deploy/setup_failures.sql17
-rw-r--r--sqitch/sqlite/revert/setup_failures.sql7
-rw-r--r--sqitch/sqlite/verify/setup_failures.sql7
3 files changed, 31 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/setup_failures.sql b/sqitch/sqlite/deploy/setup_failures.sql
new file mode 100644
index 0000000..977f103
--- /dev/null
+++ b/sqitch/sqlite/deploy/setup_failures.sql
@@ -0,0 +1,17 @@
+-- Deploy guix-build-coordinator:setup_failures to sqlite
+
+BEGIN;
+
+CREATE TABLE setup_failures (
+ id INTEGER PRIMARY KEY ASC,
+ build_id TEXT NOT NULL REFERENCES builds (uuid),
+ agent_id TEXT NOT NULL REFERENCES agents (id),
+ failure_reason TEXT NOT NULL
+);
+
+CREATE TABLE setup_failure_missing_inputs (
+ setup_failure_id INTEGER NOT NULL REFERENCES setup_failures (id),
+ missing_input_store_path TEXT NOT NULL
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/setup_failures.sql b/sqitch/sqlite/revert/setup_failures.sql
new file mode 100644
index 0000000..4079a26
--- /dev/null
+++ b/sqitch/sqlite/revert/setup_failures.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:setup_failures from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/setup_failures.sql b/sqitch/sqlite/verify/setup_failures.sql
new file mode 100644
index 0000000..05f4a97
--- /dev/null
+++ b/sqitch/sqlite/verify/setup_failures.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:setup_failures on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;