aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-03-02 08:44:01 +0000
committerChristopher Baines <mail@cbaines.net>2025-03-02 09:08:23 +0000
commit7737f5f91a64388a0f19713a7579fdaffe23151d (patch)
treeeb97d1a5017784b1bb812892bea96b1999819f08 /sqitch
parent1c86e5e1c7459dd2e14c85a305966468fbe6b313 (diff)
downloadbuild-coordinator-7737f5f91a64388a0f19713a7579fdaffe23151d.tar
build-coordinator-7737f5f91a64388a0f19713a7579fdaffe23151d.tar.gz
Do less work when fetching builds
Don't necessarily use a transaction if there are no allocation plan builds, and only run the submit-outputs hook once and store the values, rather than running it each time for each fetch builds request for every allocated build.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/allocated_builds_submit_outputs.sql7
-rw-r--r--sqitch/pg/revert/allocated_builds_submit_outputs.sql7
-rw-r--r--sqitch/pg/verify/allocated_builds_submit_outputs.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/allocated_builds_submit_outputs.sql7
-rw-r--r--sqitch/sqlite/revert/allocated_builds_submit_outputs.sql7
-rw-r--r--sqitch/sqlite/verify/allocated_builds_submit_outputs.sql7
7 files changed, 43 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/allocated_builds_submit_outputs.sql b/sqitch/pg/deploy/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..a2ebe1e
--- /dev/null
+++ b/sqitch/pg/deploy/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:allocated_builds_submit_outputs to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/allocated_builds_submit_outputs.sql b/sqitch/pg/revert/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..255efb1
--- /dev/null
+++ b/sqitch/pg/revert/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:allocated_builds_submit_outputs from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/allocated_builds_submit_outputs.sql b/sqitch/pg/verify/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..e95a717
--- /dev/null
+++ b/sqitch/pg/verify/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:allocated_builds_submit_outputs on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index ee9dd7a..f4f538b 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -48,3 +48,4 @@ system_uptime 2023-05-05T18:18:35Z Chris <chris@felis> # Add system uptime
build_starts_index 2023-11-24T16:30:13Z Chris <chris@felis> # build_starts index
background-jobs-queue 2025-02-06T10:49:08Z Chris <chris@fang> # Add background_jobs_queue
builds_replace_unprocessed_index 2025-02-19T11:19:42Z Chris <chris@fang> # Replace builds_unprocessed
+allocated_builds_submit_outputs 2025-03-02T08:22:48Z Chris <chris@fang> # Add allocated_builds.submit_outputs
diff --git a/sqitch/sqlite/deploy/allocated_builds_submit_outputs.sql b/sqitch/sqlite/deploy/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..66d6b45
--- /dev/null
+++ b/sqitch/sqlite/deploy/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:allocated_builds_submit_outputs to sqlite
+
+BEGIN;
+
+ALTER TABLE allocated_builds ADD COLUMN submit_outputs BOOLEAN DEFAULT NULL;
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/allocated_builds_submit_outputs.sql b/sqitch/sqlite/revert/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..240de22
--- /dev/null
+++ b/sqitch/sqlite/revert/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:allocated_builds_submit_outputs from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/allocated_builds_submit_outputs.sql b/sqitch/sqlite/verify/allocated_builds_submit_outputs.sql
new file mode 100644
index 0000000..0b1331e
--- /dev/null
+++ b/sqitch/sqlite/verify/allocated_builds_submit_outputs.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:allocated_builds_submit_outputs on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;