all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cuirass evaluate
@ 2017-07-08  9:15 Mathieu Othacehe
  2017-07-10 15:12 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Othacehe @ 2017-07-08  9:15 UTC (permalink / raw)
  To: guix-devel


Hi,

Now that Cuirass uses (guix git), I'm trying to robustify specification
evaluation. Currently Cuirass calls a binary called "evaluate" to get a
job list from a specification.

I don't like the idea of this extra "evaluate" script because :

* We have to give evaluate almost all arguments given to Cuirass
  (load-path, package-path, cachedir, spec, database).
* The script is made available for the user but it's very unclear how to
  call it. The help says : "Usage evaluate FILE" which is wrong (5
  arguments are expected).

So my question is, is this a strong requirement to have a separate
script to parse specification, or can I put this stuff back in main
Cuirass program ?

Thanks,

Mathieu

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

* Re: cuirass evaluate
  2017-07-08  9:15 cuirass evaluate Mathieu Othacehe
@ 2017-07-10 15:12 ` Ludovic Courtès
  2017-07-11 17:17   ` Mathieu Othacehe
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-10 15:12 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: guix-devel

Hi Mathieu,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> Now that Cuirass uses (guix git), I'm trying to robustify specification
> evaluation. Currently Cuirass calls a binary called "evaluate" to get a
> job list from a specification.
>
> I don't like the idea of this extra "evaluate" script because :
>
> * We have to give evaluate almost all arguments given to Cuirass
>   (load-path, package-path, cachedir, spec, database).
> * The script is made available for the user but it's very unclear how to
>   call it. The help says : "Usage evaluate FILE" which is wrong (5
>   arguments are expected).
>
> So my question is, is this a strong requirement to have a separate
> script to parse specification, or can I put this stuff back in main
> Cuirass program ?

It’s a requirement because the evaluation process has side effects on
the Guile that runs it; for instance, it loads tons of modules in it.
Also, the evaluation process may need to load modules that have the same
name as currently-loaded modules, but different content—and Guile
supports only one module with a given name.

That said, this program should be moved to $libexecdir/cuirass/VERSION.

HTH,
Ludo’.

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

* Re: cuirass evaluate
  2017-07-10 15:12 ` Ludovic Courtès
@ 2017-07-11 17:17   ` Mathieu Othacehe
  2017-07-12  9:39     ` Mathieu Othacehe
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Othacehe @ 2017-07-11 17:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Hi Ludo,

> It’s a requirement because the evaluation process has side effects on
> the Guile that runs it; for instance, it loads tons of modules in it.

Ok thanks for the explanation.

I just sent a patch to add minimal error checking on "evaluate" errors.

Mathieu

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

* Re: cuirass evaluate
  2017-07-11 17:17   ` Mathieu Othacehe
@ 2017-07-12  9:39     ` Mathieu Othacehe
  2017-07-17 13:32       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Othacehe @ 2017-07-12  9:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Hi Ludo,

A cuirass question :

In src/cuirass/base.scm, you wrote the following comment :

--8<---------------cut here---------------start------------->8---
  ;; Register the results in the database.
  ;; XXX: The 'build-derivations' call is blocking so we end updating the
  ;; database potentially long after things have been built.
--8<---------------cut here---------------end--------------->8---

How would it be possible to be notified when a build succeeds, to update
the database asap ?

Thanks,

Mathieu

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

* Re: cuirass evaluate
  2017-07-12  9:39     ` Mathieu Othacehe
@ 2017-07-17 13:32       ` Ludovic Courtès
  2017-07-20 14:47         ` Mathieu Othacehe
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-17 13:32 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: guix-devel

Hi,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> A cuirass question :
>
> In src/cuirass/base.scm, you wrote the following comment :
>
>   ;; Register the results in the database.
>   ;; XXX: The 'build-derivations' call is blocking so we end updating the
>   ;; database potentially long after things have been built.
>
> How would it be possible to be notified when a build succeeds, to update
> the database asap ?

Unfortunately, the current daemon protocol makes it hard to get such
notifications, unless you parse its output (the “@ build-succeeded”
lines) like I did in ‘wip-ui’.

Perhaps we’ll have to do this parsing anyway, or just change the
protocol altogether and have a “channel” mechanism like SSH to multiplex
the number of communication channels on one connection.  reepca, if you
read this, that’s something to keep in mind.  :-)

Alternately, Cuirass could also periodically call ‘valid-path?’ for all
the outputs of the pending builds (in a separate thread; note that the
daemon connection cannot be shared among threads.)

HTH,
Ludo’.

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

* Re: cuirass evaluate
  2017-07-17 13:32       ` Ludovic Courtès
@ 2017-07-20 14:47         ` Mathieu Othacehe
  2017-07-25 21:27           ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Othacehe @ 2017-07-20 14:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Hi Ludo,

> Unfortunately, the current daemon protocol makes it hard to get such
> notifications, unless you parse its output (the “@ build-succeeded”
> lines) like I did in ‘wip-ui’.
>
> Perhaps we’ll have to do this parsing anyway, or just change the
> protocol altogether and have a “channel” mechanism like SSH to multiplex
> the number of communication channels on one connection.  reepca, if you
> read this, that’s something to keep in mind.  :-)
>
> Alternately, Cuirass could also periodically call ‘valid-path?’ for all
> the outputs of the pending builds (in a separate thread; note that the
> daemon connection cannot be shared among threads.)

Ok, the solution you implemented in wip-ui seems viable.

For now I'm implementing basic web API in cuirass :

* api/build/:build
* build/:build/log/raw
* api/latestbuilds

This allows emacs-guix to query cuirass as per hydra. The "queue" api
will be implementable when we will support build start/stop/failure
detection.

Thanks,

Mathieu

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

* Re: cuirass evaluate
  2017-07-20 14:47         ` Mathieu Othacehe
@ 2017-07-25 21:27           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-25 21:27 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: guix-devel

Hello,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> Unfortunately, the current daemon protocol makes it hard to get such
>> notifications, unless you parse its output (the “@ build-succeeded”
>> lines) like I did in ‘wip-ui’.
>>
>> Perhaps we’ll have to do this parsing anyway, or just change the
>> protocol altogether and have a “channel” mechanism like SSH to multiplex
>> the number of communication channels on one connection.  reepca, if you
>> read this, that’s something to keep in mind.  :-)
>>
>> Alternately, Cuirass could also periodically call ‘valid-path?’ for all
>> the outputs of the pending builds (in a separate thread; note that the
>> daemon connection cannot be shared among threads.)
>
> Ok, the solution you implemented in wip-ui seems viable.
>
> For now I'm implementing basic web API in cuirass :
>
> * api/build/:build
> * build/:build/log/raw
> * api/latestbuilds
>
> This allows emacs-guix to query cuirass as per hydra. The "queue" api
> will be implementable when we will support build start/stop/failure
> detection.

Sounds good.  Let us know if you stumble upon other issues.

Thanks,
Ludo.’

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

end of thread, other threads:[~2017-07-25 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-08  9:15 cuirass evaluate Mathieu Othacehe
2017-07-10 15:12 ` Ludovic Courtès
2017-07-11 17:17   ` Mathieu Othacehe
2017-07-12  9:39     ` Mathieu Othacehe
2017-07-17 13:32       ` Ludovic Courtès
2017-07-20 14:47         ` Mathieu Othacehe
2017-07-25 21:27           ` Ludovic Courtès

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.