With commit 55af0f70c0, GC roots created
by ‘cuirass remote-worker’ would no longer be deleted (unless it’s
running on the same machine as ‘cuirass remote-server’).
* src/cuirass/scripts/remote-worker.scm (cuirass-remote-worker): Add
call to ‘spawn-gc-root-cleaner’.
* src/cuirass/base.scm (delete-old-gc-roots): Add #:check-database? and
honor it.
(spawn-gc-root-cleaner): Likewise.
Previously, it was possible for the user to call the returned thunk
before ‘build-derivations’ had completed, thereby getting #f (the
initial value of ‘result’). This made no sense because
‘build-derivations’ always returns #t or raises an exception.
This situation could happen in ‘cuirass remote-worker’ if the
corresponding ‘cuirass remote-server’ process disappeared in the middle
of a build, because ‘send-logs’ would return early, leading the finish
thunk of ‘build-derivations&’ to be called before build completion.
This change uses a channel to enforce synchronization with the thread
that calls ‘build-derivations’.
Partly fixes <https://issues.guix.gnu.org/66692>.
* src/cuirass/store.scm (build-derivations&): Use
‘with-exception-handler’ and ‘put-message’ in the thread. Use
‘get-message’ instead of ‘atomic-box-ref’ in the finalization procedure.
Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* src/cuirass/remote.scm (sockaddr->string): New procedure, moved from…
(receive-logs): … here.
(send-log): Print the zlib error when it occurs. Print the peer’s
address upon invalid handshake.
* src/cuirass/templates.scm (build-details): Add link to /build/ID/log.
(build-eval-table, build-search-results-table, running-builds-table):
Link to /build/ID/log.
* src/cuirass/http.scm (evaluation-html-page): Define ‘checkout-changes’
and pass it to ‘evaluation-build-table’.
* src/cuirass/templates.scm (checkout-table): Add #:changes parameter
and honor it.
(evaluation-build-table): Add #:checkout-changes parameter and pass it
on to ‘checkout-table.
(evaluation-dashboard): Define ‘checkout-changes’ and pass it to
‘checkout-table’.
This is a followup to 55af0f70c0.
* src/cuirass/store.scm (%gc-root-ttl): Remove.
* src/cuirass/scripts/register.scm (cuirass-register): Remove references
to ‘%gc-root-ttl’.
* src/cuirass/scripts/remote-server.scm (%options): Warn about ‘--ttl’
having no effect. Remove reference to ‘%gc-root-ttl’.
* src/cuirass/scripts/remote-worker.scm (%options): Warn about ‘--ttl’
having no effect. Remove reference to ‘%gc-root-ttl’.
There could potentially be cases where it would return a succeeding
build.
* src/cuirass/database.scm (db-get-first-build-failure):
Add (status . failed) filter.
In commit df606ce452, we were showing the
checkouts of the evaluation of the previous build. However, that’s
typically much older than checkouts of the previous evaluation, which
are known to have led to the same successful build.
* src/cuirass/http.scm (url-handler): In “/build/ID/details”, compute
‘previous-checkouts’ based on the previous evaluation.
The goal is to make it easier to find the origin of a build failure.
* src/cuirass/templates.scm (build-details): Add #:channels,
#:checkouts, #:previous-checkouts, and #:first-failure.
[build-failure-info]: New procedure.
Use it.
(checkout-change-table): New procedure.
* src/cuirass/http.scm (url-handler): In “/build/ID/details”, pass extra
arguments to ‘build-details’.
* TODO: Update.
This is a follow-up to commit 0b63c3b698.
* doc/cuirass.texi (Triggering an Evaluation): Fix URL in example.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Previously, ‘maybe-remove-expired-cache-entries’ would periodically
delete old GC roots, regardless of whether there were still builds
queued for them. This approach addresses that.
Partly fixes <https://issues.guix.gnu.org/54447>.
* src/cuirass/base.scm (derivation-queued?, delete-old-gc-roots)
(spawn-gc-root-cleaner): New procedures.
* src/cuirass/scripts/register.scm (cuirass-register): Call
‘spawn-gc-root-cleaner’.
* src/cuirass/store.scm (gc-roots, gc-root-expiration-time): Remove.
(register-gc-roots): Remove call to ‘maybe-remove-expired-cache-entries’.
This is a followup to 103a6ec27b.
* src/cuirass/http.scm (url-handler): Remove ‘catch 'system-error’ for
“/download” handler since ‘respond-file’ cannot possibly throw to
'system-error. Add explicit ‘file-exists?’ call instead.
This should prevent GC roots from being evicted when they are in fact
still used by recent evaluations.
See <https://issues.guix.gnu.org/54447>.
* src/cuirass/store.scm (register-gc-root): Add call to ‘utime’ upon EEXIST.
Fixes a bug whereby inactive jobsets would not get a corresponding
actors. Consequently, marking them as “active” in the database and/or
modifying their spec via the web UI wouldn’t have any effect.
* src/cuirass/base.scm (jobset-monitor): Check whether SPEC is active,
and if not, wait for an ‘update-spec’ message.
(jobset-registry): Pass #:filter-inactive? #f.
Fixes a regression introduced in c445d2d642.
Fixes <https://issues.guix.gnu.org/66384>.
* src/cuirass/http.scm (build->hydra-build): Include product id in
"buildproducts" field.
* src/cuirass/remote.scm (receive-logs)[sockaddr->string]: New
procedure.
[read-log]: Add ‘address’ parameter and use it for logging. Add clause
for EOF.
This fixes a bug whereby the POSIX thread running the notification fiber
would be stuck in waitpid(2) while waiting for the mailer invoked by
‘mu-message-send’ to complete.
* src/cuirass/notification.scm (spawn-notification-fiber): Wrap
‘send-email*’ call in ‘non-blocking’.
Fixes a bug introduced in c445d2d642 where
<checkout> records would end up being passed to ‘scm->json’.
* src/cuirass/http.scm (jobs-history->json-object): Pass checkouts
through ‘checkout->json-object’.
* tests/http.scm ("/api/jobs/history"): New test.