all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66384: [cuirass] /search/latest/archive fails
@ 2023-10-07  9:20 Ricardo Wurmus
  2023-10-07 10:51 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2023-10-07  9:20 UTC (permalink / raw)
  To: 66384; +Cc: ludo, othacehe

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-09 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-07  9:20 bug#66384: [cuirass] /search/latest/archive fails Ricardo Wurmus
2023-10-07 10:51 ` Ricardo Wurmus
2023-10-09 19:33   ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.