* 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.
Fixes a bug whereby the sender ID bytevector returned by
‘receive-message’ could be modified behind our back (when the C msg
object is reclaimed) by the time it is passed as #:recipient to
‘send-message’.
As a result, ‘zmq-send’ would be passed an invalid peer ID and would
thus silently drop the message; the other end, ‘cuirass remote-worker’,
would wait for a reply to its ‘worker-request-work’ message that would
never come, thus remaining idle forever.
The bug has been there most likely forever, though it might have become
more frequent with the refactoring in
445198e2a0.
Thanks to Nicolas Dandrimont for putting me on the right track!
* src/cuirass/remote.scm (receive-message): Call ‘bytevector-copy’ on
the result of ‘zmq-message-content’.
* src/cuirass/scripts/remote-server.scm (zmq-start-proxy): Set
ZMQ_ROUTER_MANDATORY on BUILD-SOCKET.
Fixes a regression introduced in
8fa6bcf1b9.
* src/cuirass/base.scm (jobset-registry): Honor SPEC’s period when it is
non-zero, passing it to ‘spawn-jobset-monitor’.
This is a followup to c4743b5472.
* src/cuirass/database.scm (with-db-worker-thread): Rename to…
(with-db-connection): … this.
Adjust users.
* src/cuirass/metrics.scm: Likewise.
That way, the /api/queue endpoint returns something that matches actual
scheduling.
* src/cuirass/database.scm (db-get-builds): Adjust ordering for
‘status+submission-time’.
Previously, build jobs would use the default #:max-build-jobs
and #:build-cores specified by guix-daemon. This would typically lead
each worker to use as many cores as available, leading to unreasonable
over-commitment.
With this change, each worker is assigned a fraction of the build cores.
Because it’s a static policy, it may lead to resource waste, but avoids
the problem mentioned above.
* src/cuirass/scripts/remote-worker.scm (run-build): Add #:parallelism
and pass it to ‘set-build-options*’.
(run-command): Add #:parallelism and pass it to ‘run-build’.
(start-worker): Add #:parallelism and pass it to ‘run-command’.
(worker-management-thunk): Pass #:parallelism to ‘start-worker’.
* src/cuirass/remote.scm (set-build-options*): Add #:build-cores and
pass it to ‘set-build-options’, along with #:max-build-jobs.