aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-27 09:11:03 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-27 09:12:46 +0000
commitc76821f570cfb8702e345859f827b06b28fc9b43 (patch)
tree0f4941ae4d1643e00b124e9caa1b603415594737 /sqitch
parent0535368864fa0d8e17ce9ee97ebb98dc67517af2 (diff)
downloadbuild-coordinator-c76821f570cfb8702e345859f827b06b28fc9b43.tar
build-coordinator-c76821f570cfb8702e345859f827b06b28fc9b43.tar.gz
Implement deferring builds
This isn't intended as some time based scheduling, but more as a way to slow down builds by deferring processing them until some point in the future. I'm intending to use this to test fixed output derivations. I can look up all the derivations I want to test, then defer the builds to run spread out across some period. This feature saves having to submit the builds gradually.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/add_builds_deferred_until.sql7
-rw-r--r--sqitch/pg/revert/add_builds_deferred_until.sql7
-rw-r--r--sqitch/pg/verify/add_builds_deferred_until.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/add_builds_deferred_until.sql7
-rw-r--r--sqitch/sqlite/revert/add_builds_deferred_until.sql7
-rw-r--r--sqitch/sqlite/verify/add_builds_deferred_until.sql7
7 files changed, 43 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/add_builds_deferred_until.sql b/sqitch/pg/deploy/add_builds_deferred_until.sql
new file mode 100644
index 0000000..aa318e0
--- /dev/null
+++ b/sqitch/pg/deploy/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:add_builds_deferred_until to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/add_builds_deferred_until.sql b/sqitch/pg/revert/add_builds_deferred_until.sql
new file mode 100644
index 0000000..a7b4af3
--- /dev/null
+++ b/sqitch/pg/revert/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_builds_deferred_until from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/add_builds_deferred_until.sql b/sqitch/pg/verify/add_builds_deferred_until.sql
new file mode 100644
index 0000000..b6cce04
--- /dev/null
+++ b/sqitch/pg/verify/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_builds_deferred_until on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 42ef7ad..2240cc1 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -24,3 +24,4 @@ add_fixed_output_to_derivations 2020-07-18T14:49:51Z Christopher Baines <mail@cb
add_unbuilt_outputs_table 2020-11-06T18:58:08Z Christopher Baines <mail@cbaines.net> # Add unbuilt_outputs
support_build_cancelation 2020-12-11T18:25:42Z Christopher Baines <mail@cbaines.net> # Add builds.canceled
add_build_tags_build_id_idx 2020-12-21T13:20:54Z Christopher Baines <mail@cbaines.net> # Add an index on build_tags.build_id
+add_builds_deferred_until 2020-12-26T19:26:32Z Christopher Baines <mail@cbaines.net> # Add builds.deferred_until
diff --git a/sqitch/sqlite/deploy/add_builds_deferred_until.sql b/sqitch/sqlite/deploy/add_builds_deferred_until.sql
new file mode 100644
index 0000000..db57b53
--- /dev/null
+++ b/sqitch/sqlite/deploy/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:add_builds_deferred_until to sqlite
+
+BEGIN;
+
+ALTER TABLE builds ADD COLUMN deferred_until TEXT;
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/add_builds_deferred_until.sql b/sqitch/sqlite/revert/add_builds_deferred_until.sql
new file mode 100644
index 0000000..ef41b03
--- /dev/null
+++ b/sqitch/sqlite/revert/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_builds_deferred_until from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/add_builds_deferred_until.sql b/sqitch/sqlite/verify/add_builds_deferred_until.sql
new file mode 100644
index 0000000..7e367da
--- /dev/null
+++ b/sqitch/sqlite/verify/add_builds_deferred_until.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_builds_deferred_until on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;