Subject: bug#32300: closed (Re: bug#32300: [PATCH] database: Fix the builds limit issue.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 16 Aug 2018 21:00:03 +0000

Your bug report

#32300: Cuirass: the 'nr' filter doesn't work when builds have multiple outputs

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
32300: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32300
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#32300: [PATCH] database: Fix the builds limit issue.
From: Clément Lassieur <[email-masked]>
To: Danny Milosavljevic <[email-masked]>
Cc: [email-masked]
Date: Thu, 16 Aug 2018 22:59:39 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Hi,
>
> On Sat, 04 Aug 2018 18:10:51 +0200
> Clément Lassieur <[email-masked]> wrote:
>
>> Clément Lassieur <[email-masked]> writes:
>> 
>> > Fixes <https://bugs.gnu.org/32300>.
>> >
>> > * src/cuirass/database.scm (filters->order): New procedure.
>> > (db-get-builds): Remove FORMAT-OUTPUT, CONS-OUTPUT, COLLECT-OUTPUTS,
>> > FINISH-GROUP, SAME-GROUP?, GROUP-OUTPUTS procedures.  Remove the 'LEFT JOIN
>> > Outputs' clause.  Use DB-GET-OUTPUTS for each build that was fetched.  
>> 
>> This may be less efficient because there are more SQL queries (one per
>> output), but it's way less complicated and less buggy, so I think it's
>> worth it.
>
> Yeah, if it's still usable, I agree.
>
> But I think we shouldn't overlook the possibility of not fetching the outputs
> in the first place (at all).

Pushed.  Thank you for the review!

Clément

Subject: Cuirass: the 'nr' filter doesn't when builds have multiple outputs
From: Clément Lassieur <[email-masked]>
To: [email-masked]
Date: Sun, 29 Jul 2018 01:21:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

With, say, 'nr' = 4, the GROUP-OUTPUTS procedure in cuirass/database.scm
will transform

  0 | out   | /gnu/store/...
  1 | out   | /gnu/store/...
  1 | debug | /gnu/store/...
  2 | out   | /gnu/store/...

into

  ((#:id . 0) (#:outputs ("out"   (#:path . "/gnu/store/..."))))
  ((#:id . 1) (#:outputs ("out"   (#:path . "/gnu/store/..."))
                         ("debug" (#:path . "/gnu/store/..."))))
  ((#:id . 2) (#:outputs ("out"   (#:path . "/gnu/store/..."))))

Thus there are only 3 elements returned by the low-level DB-GET-BUILDS
procedure, while we expect 4.

This bug is visible through the API (latestbuilds, queue) and the web
interface (eval) because they use that DB-GET-BUILDS procedure.

Clément