aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-02-19 22:49:04 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2018-02-19 23:01:47 +0100
commitf5a15cab510178d46ea5dc7a79fd7bb96fd679f3 (patch)
tree6119251543e29e77c61320032bbb7ca4373f91c1 /src
parent593cb7be108ed97bca5371aad2e53fa8ce4817ba (diff)
downloadcuirass-f5a15cab510178d46ea5dc7a79fd7bb96fd679f3.tar
cuirass-f5a15cab510178d46ea5dc7a79fd7bb96fd679f3.tar.gz
database: Fix grouping in db-get-builds.
* src/cuirass/database.scm (db-get-builds): Fix grouping.
Diffstat (limited to 'src')
-rw-r--r--src/cuirass/database.scm17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index df31122..751b8ef 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -432,30 +432,23 @@ Assumes that if group id stays the same the group headers stay the same."
(match rows
(() (list (finish-group)))
- ((#((? same-group? x-builds-id) x-output-name x-output-path ...) . rest)
+ ((#((? same-group? x-builds-id) x-output-name x-output-path other-cells ...) . rest)
;; Accumulate group members of current group.
(let ((outputs (cons-output x-output-name x-output-path outputs)))
(collect-outputs repeated-builds-id repeated-row outputs rest)))
- ((#(x-builds-id x-output-name x-output-path timestamp starttime stoptime log
- status derivation job-name system nix-name repo-name branch) . rest)
+ ((#(x-builds-id x-output-name x-output-path other-cells ...) . rest)
(cons ;; Finish current group.
(finish-group)
;; Start new group.
(let ((outputs (cons-output x-output-name x-output-path '())))
- (let ((x-repeated-row (vector timestamp starttime stoptime
- log status derivation job-name system
- nix-name repo-name branch)))
+ (let ((x-repeated-row (list->vector other-cells)))
(collect-outputs x-builds-id x-repeated-row outputs rest)))))))
(define (group-outputs rows)
(match rows
(() '())
- ((#(x-builds-id x-output-name x-output-path timestamp starttime stoptime
- log status derivation job-name system
- nix-name repo-name branch) . rest)
- (let ((x-repeated-row (vector timestamp starttime stoptime
- log status derivation job-name system
- nix-name repo-name branch)))
+ ((#(x-builds-id x-output-name x-output-path other-cells ...) . rest)
+ (let ((x-repeated-row (list->vector other-cells)))
(collect-outputs x-builds-id x-repeated-row '() rows)))))
(let* ((order (if (eq? (assqx-ref filters 'order) 'build-id)