GNU bug report logs - #66384
[cuirass] /search/latest/archive fails

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Sat, 7 Oct 2023 09:25:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

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 66384 in the body.
You can then email your comments to 66384 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 ludo <at> gnu.org, othacehe <at> gnu.org, bug-guix <at> gnu.org:
bug#66384; Package guix. (Sat, 07 Oct 2023 09:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to ludo <at> gnu.org, othacehe <at> gnu.org, bug-guix <at> gnu.org. (Sat, 07 Oct 2023 09:25:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: [cuirass] /search/latest/archive fails
Date: Sat, 07 Oct 2023 11:20:15 +0200
Hi,

I noticed that queries like this now consistently fail:

    https://ci.guix.gnu.org/search/latest/archive?query=spec%3Atarball+status%3Asuccess+system%3Ax86_64-linux+guix-binary.tar.xz

This should redirect to a download URL.

I went through the code and found that the problem lies in the return
value of HANDLE-BUILDS-SEARCH-REQUEST, which does not include the ID
field for BUILDPRODUCTS:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use (cuirass database)
scheme@(guile-user)> ,m (cuirass http)
scheme@(cuirass http)> (define query (uri-decode "spec%3Atarball+status%3Asuccess+system%3Ax86_64-linux+guix-binary.tar.xz"))
scheme@(cuirass http)> (vector->list
                   (handle-builds-search-request
                    `((query . ,query)
                      (nr . 1)
                      (order . finish-time+build-id))))
2023-10-07T11:15:58 builds search request took 0.256186 seconds
$1 = (((id . 2190078) (evaluation . "827027") (jobset . "tarball") (job . "binary-tarball.x86_64-linux") (timestamp . 1696611284) (starttime . 1696611211) (stoptime . 1696611284) (derivation . "/gnu/store/icam3qbpkjhsgrglx4wsy53bsrznqvs3-guix-binary.tar.xz.drv") (buildoutputs ("out" ("path" . "/gnu/store/0yb96ks4fa6781817ala5w706f945zq4-guix-binary.tar.xz"))) (system . "x86_64-linux") (nixname . "guix-binary.tar.xz") (buildstatus . 0) (weather . -1) (busy . 0) (priority . 9) (finished . 1) (buildproducts . #(((type . "archive") (path . "/gnu/store/0yb96ks4fa6781817ala5w706f945zq4-guix-binary.tar.xz") (file-size . 108105168))))))
scheme@(cuirass http)> (define build (car $1)
)
scheme@(cuirass http)> 
(assoc-ref build 'id)
$2 = 2190078
scheme@(cuirass http)> (define products (vector->list
                                (assoc-ref build 'buildproducts)))
scheme@(cuirass http)> products
$3 = (((type . "archive") (path . "/gnu/store/0yb96ks4fa6781817ala5w706f945zq4-guix-binary.tar.xz") (file-size . 108105168)))
scheme@(cuirass http)> (define product-type "archive")
scheme@(cuirass http)> (find (lambda (product)
                                      (string=? (assoc-ref product 'type)
                                                product-type))
                                    products)
$4 = ((type . "archive") (path . "/gnu/store/0yb96ks4fa6781817ala5w706f945zq4-guix-binary.tar.xz") (file-size . 108105168))
scheme@(cuirass http)> (define product $4)
scheme@(cuirass http)> (assoc-ref product 'id)
$5 = #f
--8<---------------cut here---------------end--------------->8---

Without the ID of the build product cuirass cannot build the download
URL.

-- 
Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#66384; Package guix. (Sat, 07 Oct 2023 10:55:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 66384 <at> debbugs.gnu.org
Subject: Re: [cuirass] /search/latest/archive fails
Date: Sat, 07 Oct 2023 12:51:53 +0200
This is a consequence of commit
9b227abd29b15e7e25c54a71c524e7b26252a270, and it should be enough to fix
it like this:

--8<---------------cut here---------------start------------->8---
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 7e4fd3b..9c4c723 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -133,7 +133,8 @@
     (finished . ,(bool->int finished?))
     (buildproducts . ,(list->vector
                        (map (lambda (product)
-                              `((type . ,(build-product-type product))
+                              `((id . ,(build-product-id product))
+                                (type . ,(build-product-type product))
                                 (path . ,(build-product-file product))
                                 (file-size . ,(build-product-file-size product))))
                             (build-products build))))))
--8<---------------cut here---------------end--------------->8---


-- 
Ricardo




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Mon, 09 Oct 2023 19:35:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Mon, 09 Oct 2023 19:35:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 66384-done <at> debbugs.gnu.org
Subject: Re: [cuirass] /search/latest/archive fails
Date: Mon, 09 Oct 2023 21:33:05 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> This is a consequence of commit
> 9b227abd29b15e7e25c54a71c524e7b26252a270, and it should be enough to fix
> it like this:
>
> diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
> index 7e4fd3b..9c4c723 100644
> --- a/src/cuirass/http.scm
> +++ b/src/cuirass/http.scm
> @@ -133,7 +133,8 @@
>      (finished . ,(bool->int finished?))
>      (buildproducts . ,(list->vector
>                         (map (lambda (product)
> -                              `((type . ,(build-product-type product))
> +                              `((id . ,(build-product-id product))
> +                                (type . ,(build-product-type product))
>                                  (path . ,(build-product-file product))
>                                  (file-size . ,(build-product-file-size product))))
>                              (build-products build))))))

Fixed with commit 72a1fc58d5fe7c2b5fce04dc07fe9eaaba0f8be3.

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Nov 2023 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 281 days ago.

Previous Next


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