aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-07-03 09:16:33 +0100
committerChristopher Baines <mail@cbaines.net>2020-07-03 09:21:22 +0100
commit8a7e7b537eeb99e341917b14af87146cf74f96fe (patch)
tree4c54238ab888b66f3f1fe197a5ca913d2c232e26 /sqitch
parente7e98cc7ca765a0ebaa65f9dd90fefcaeed0b308 (diff)
downloadbuild-coordinator-8a7e7b537eeb99e341917b14af87146cf74f96fe.tar
build-coordinator-8a7e7b537eeb99e341917b14af87146cf74f96fe.tar.gz
Record what systems agents fetch builds for
This can then be used by allocators to avoid allocating builds to agents that they're never going to fetch.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/build_allocation_agent_requested_systems.sql7
-rw-r--r--sqitch/pg/revert/build_allocation_agent_requested_systems.sql7
-rw-r--r--sqitch/pg/verify/build_allocation_agent_requested_systems.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/build_allocation_agent_requested_systems.sql11
-rw-r--r--sqitch/sqlite/revert/build_allocation_agent_requested_systems.sql7
-rw-r--r--sqitch/sqlite/verify/build_allocation_agent_requested_systems.sql7
7 files changed, 47 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/build_allocation_agent_requested_systems.sql b/sqitch/pg/deploy/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..b71f55d
--- /dev/null
+++ b/sqitch/pg/deploy/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:build_allocation_agent_requested_systems to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/build_allocation_agent_requested_systems.sql b/sqitch/pg/revert/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..4372b86
--- /dev/null
+++ b/sqitch/pg/revert/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:build_allocation_agent_requested_systems from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/build_allocation_agent_requested_systems.sql b/sqitch/pg/verify/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..3223254
--- /dev/null
+++ b/sqitch/pg/verify/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:build_allocation_agent_requested_systems on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 213f01c..a793617 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -19,3 +19,4 @@ build_tags 2020-05-31T13:54:41Z Christopher Baines <mail@cbaines.net> # Support
builds_created_at 2020-06-27T18:30:32Z Christopher Baines <mail@cbaines.net> # Add builds.created_at
build_starts 2020-06-27T20:23:38Z Christopher Baines <mail@cbaines.net> # Add build_starts table
add_builds_end_time 2020-06-27T20:58:01Z Christopher Baines <mail@cbaines.net> # Add builds.end_time field
+build_allocation_agent_requested_systems 2020-07-02T19:45:02Z Christopher Baines <mail@cbaines.net> # Add new build_allocation_agent_requested_systems table
diff --git a/sqitch/sqlite/deploy/build_allocation_agent_requested_systems.sql b/sqitch/sqlite/deploy/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..c0d99f9
--- /dev/null
+++ b/sqitch/sqlite/deploy/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,11 @@
+-- Deploy guix-build-coordinator:build_allocation_agent_requested_systems to sqlite
+
+BEGIN;
+
+CREATE TABLE build_allocation_agent_requested_systems (
+ agent_id NOT NULL REFERENCES agents (id),
+ system TEXT NOT NULL,
+ PRIMARY KEY (agent_id, system)
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/build_allocation_agent_requested_systems.sql b/sqitch/sqlite/revert/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..1bfe6c8
--- /dev/null
+++ b/sqitch/sqlite/revert/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:build_allocation_agent_requested_systems from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/build_allocation_agent_requested_systems.sql b/sqitch/sqlite/verify/build_allocation_agent_requested_systems.sql
new file mode 100644
index 0000000..4a2502b
--- /dev/null
+++ b/sqitch/sqlite/verify/build_allocation_agent_requested_systems.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:build_allocation_agent_requested_systems on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;