aboutsummaryrefslogtreecommitdiff
path: root/sqitch
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
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')
-rw-r--r--sqitch/pg/deploy/setup_failures.sql7
-rw-r--r--sqitch/pg/revert/setup_failures.sql7
-rw-r--r--sqitch/pg/verify/setup_failures.sql7
-rw-r--r--sqitch/sqitch.plan1
-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
7 files changed, 53 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/setup_failures.sql b/sqitch/pg/deploy/setup_failures.sql
new file mode 100644
index 0000000..a84700e
--- /dev/null
+++ b/sqitch/pg/deploy/setup_failures.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:setup_failures to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/setup_failures.sql b/sqitch/pg/revert/setup_failures.sql
new file mode 100644
index 0000000..5c377d7
--- /dev/null
+++ b/sqitch/pg/revert/setup_failures.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:setup_failures from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/setup_failures.sql b/sqitch/pg/verify/setup_failures.sql
new file mode 100644
index 0000000..fc5f408
--- /dev/null
+++ b/sqitch/pg/verify/setup_failures.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:setup_failures on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 21a3134..487fdf4 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -7,3 +7,4 @@ create_builds 2020-04-06T18:50:48Z Christopher Baines <mail@cbaines.net> # Creat
initial_agent_tables 2020-04-09T20:03:53Z Christopher Baines <mail@cbaines.net> # Create initial tables for agent related state
build_allocation_tables 2020-04-10T19:26:36Z Christopher Baines <mail@cbaines.net> # Create initial tables for allocating builds
build_results 2020-04-12T19:59:27Z Christopher Baines <mail@cbaines.net> # Create table for storing build results
+setup_failures 2020-04-13T13:05:29Z Christopher Baines <mail@cbaines.net> # Create table for storing setup_failures
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;