GNU bug report logs - #50111
[PATCH] cuirass: Allow filter-only searches.

Previous Next

Package: guix-patches;

Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>

Date: Wed, 18 Aug 2021 17:38:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50111 in the body.
You can then email your comments to 50111 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50111; Package guix-patches. (Wed, 18 Aug 2021 17:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 18 Aug 2021 17:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: guix-patches <at> gnu.org
Subject: [PATCH] cuirass: Allow filter-only searches.
Date: Wed, 18 Aug 2021 10:37:39 -0700
If there are non-query search filters and there is no query, assume a
wildcard query.

* src/cuirass/database.scm (query->bind-arguments): Add a wildcard query
if there are other filters and no query.
---
Hello Guix,

I noticed that it's not possible to search on cuirass with only filters,
and no query.  So this patch allows a filter-only search, without a query.
(After reading the code I realized I could use a SQL (!) wildcard "%", but
that's not even noted on the Cuirass website.)

I haven't tested this, of course, because I don't have a cuirass instance ;)

--
Sarah
 src/cuirass/database.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 0aa3f0b..2aa99a1 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2018 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2018 Tatiana Sholokhova <tanja201396 <at> gmail.com>
 ;;; Copyright © 2019, 2020 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
 ;;;
 ;;; This file is part of Cuirass.
 ;;;
@@ -1060,7 +1061,11 @@ DELETE FROM Checkouts WHERE evaluation=" eval-id ";")))
             (if (assq key acc)
                 acc
                 (cons (cons key #f) acc)))
-          args '(#:spec #:system))))
+          (if (or (assq-ref args #:query)
+                  (null? (alist-delete #:query args)))
+              args
+              (cons '(#:query . "%") args))
+          '(#:spec #:system))))
 
 (define (db-get-build-products build-id)
   "Return the build products associated to the given BUILD-ID."
-- 
2.31.1





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Thu, 19 Aug 2021 14:49:02 GMT) Full text and rfc822 format available.

Notification sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
bug acknowledged by developer. (Thu, 19 Aug 2021 14:49:02 GMT) Full text and rfc822 format available.

Message #10 received at 50111-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Sarah Morgensen <iskarian <at> mgsn.dev>
Cc: 50111-done <at> debbugs.gnu.org
Subject: Re: bug#50111: [PATCH] cuirass: Allow filter-only searches.
Date: Thu, 19 Aug 2021 16:48:44 +0200
Hey,

Nice, applied as 082a477989cd6246a02c3e2ee661536ccc77cddb! I'll have to
update the Guix Cuirass package and deploy it on Berlin before we all
can enjoy this on https://ci.guix.gnu.org.

> I haven't tested this, of course, because I don't have a cuirass instance ;)

Note that running a small Cuirass instance using the dedicated Guix
service as described here[1] should be relatively easy if you want to
test further fixes :).

Thanks,

Mathieu

[1]: https://guix.gnu.org/manual/en/html_node/Continuous-Integration.html




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Sep 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.