mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2023-12-14 06:03:04 +01:00
database: Document the pitfalls of ‘db-get-checkouts’.
* src/cuirass/base.scm (latest-checkouts): Improve docstring. * src/cuirass/database.scm (db-get-checkouts): Add docstring.
This commit is contained in:
parent
7a9194b15e
commit
a057228492
|
@ -640,8 +640,9 @@ OUTPUTS, a list of <build-output> records."
|
|||
(apply latest-channel-instances args)))
|
||||
|
||||
(define (latest-checkouts spec eval-id)
|
||||
"Return the latest checkouts for the EVAL-ID evaluation of the SPEC
|
||||
specification."
|
||||
"Return the complete list of checkouts used for the EVAL-ID evaluation of
|
||||
SPEC (as opposed to 'db-get-checkouts', which only returns checkouts that
|
||||
different from the previous evaluation of SPEC)."
|
||||
(let ((name (specification-name spec))
|
||||
(channels (specification-channels spec)))
|
||||
(map (lambda (channel)
|
||||
|
|
|
@ -1613,6 +1613,12 @@ SELECT id FROM pending_dependencies WHERE deps = 0 LIMIT 1;"))
|
|||
(directory checkout-directory))
|
||||
|
||||
(define (db-get-checkouts eval-id)
|
||||
"Return the list of checkouts *changed* in EVAL-ID.
|
||||
|
||||
For example, if channel A moved from one commit to another, triggering
|
||||
EVAL-ID, then channel A is returned. But perhaps EVAL-ID also depends on
|
||||
channels B and C, which are not returned here because they haven't changed
|
||||
compared to the previous evaluation of this jobset."
|
||||
(with-db-worker-thread db
|
||||
(let loop ((rows (exec-query/bind
|
||||
db "SELECT revision, channel, directory FROM Checkouts
|
||||
|
|
Loading…
Reference in a new issue