[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/11: Guard against derivation IDs that aren't numbers
From: |
Christopher Baines |
Subject: |
01/11: Guard against derivation IDs that aren't numbers |
Date: |
Fri, 9 Oct 2020 15:21:18 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 2c463fcdab78412f65459f37398a185b1ee6a311
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Oct 9 19:27:04 2020 +0100
Guard against derivation IDs that aren't numbers
I saw an error suggesting that something came back that wasn't a number, and
this should give a more informative error.
---
guix-data-service/data-deletion.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/guix-data-service/data-deletion.scm
b/guix-data-service/data-deletion.scm
index 7674535..1d8a22c 100644
--- a/guix-data-service/data-deletion.scm
+++ b/guix-data-service/data-deletion.scm
@@ -493,6 +493,11 @@ WHERE NOT EXISTS (
0
(map
(lambda (derivation-id)
+ (unless (string->number derivation-id)
+ (error
+ (simple-format #f "derivation-id: ~A is not a number"
+ derivation-id)))
+
(with-thread-postgresql-connection
(lambda (conn)
(with-postgresql-transaction
- branch master updated (f1eb2d3 -> 4f3be14), Christopher Baines, 2020/10/09
- 01/11: Guard against derivation IDs that aren't numbers,
Christopher Baines <=
- 02/11: Guard against errors when recording job stderr output, Christopher Baines, 2020/10/09
- 04/11: Change the derivation comparison targets, Christopher Baines, 2020/10/09
- 03/11: Link to the revisions in the comparison header, Christopher Baines, 2020/10/09
- 05/11: Use letpar& for systems and targets in render-compare/derivations, Christopher Baines, 2020/10/09
- 06/11: Clarify that the derivations comparison only is for packages, Christopher Baines, 2020/10/09
- 08/11: Include tablespace as a label for table metrics, Christopher Baines, 2020/10/09
- 09/11: Include the base commit and target commit in the compare output, Christopher Baines, 2020/10/09
- 07/11: Improve select-job-for-commit, Christopher Baines, 2020/10/09
- 10/11: Add Prometheus metrics for indexes specifically, Christopher Baines, 2020/10/09
- 11/11: Split the jobs metric in to succeede, queued and failed, Christopher Baines, 2020/10/09