Fixes <https://issues.guix.gnu.org/67502>.
Since ‘run-fibers’ binds each thread to one core by default,
‘current-processor-count’ when called from within ‘run-fibers’ on a
machine with 4 or fewer cores would always return 1.
* src/cuirass/scripts/remote-worker.scm (worker-management-thunk): Add
‘cpu-count’ parameter and use it instead of calling
‘current-processor-count’.
(cuirass-remote-worker): Call ‘current-processor-count’ outside
‘run-fibers’ and pass the result to ‘worker-management-thunk’.
Fixes a bug in 0daae8bfc9 whereby a
“danger” badge would sometimes be displayed even though the “new”
failures were not introduced by this particular evaluation.
* src/cuirass/templates.scm (evaluation-badges): Use
‘build-summary-newly-failed’ rather than
‘evaluation-summary-newly-failed’ to choose the type of badge.
This is a followup to 7f042dbc37.
* tests/database.scm ("db-get-evaluation-absolute-summary")
("db-get-evaluations-absolute-summary"): Check
‘evaluation-summary-newly-failed’.
* src/cuirass/database.scm (<build-summary>)[newly-failed]: New field.
(db-get-evaluations-build-summary): Set it.
* tests/database.scm ("db-get-evaluations-build-summary"): Test it.
* src/cuirass/http.scm (evaluation-html-page): Adjust ‘db-get-builds’
call for “newly-failed” STATUS.
* src/cuirass/templates.scm (build-eval-table): Add #:summary. Add
button when STATUS is “failed” or “newly-failed”.
(evaluation-build-table): Handle STATUS as “newly-failed”.
Pass #:summary to ‘build-eval-table’.
The failed-build counter on /eval/ID pages is now orange when there are
no new build failures, red when there are new build failures.
* src/cuirass/templates.scm (newly-failed-build-badge): New procedure.
(specifications-table): Use it instead of ‘failed-build-badge’.
(evaluation-badges): Use ‘newly-failed-build-badge’ when ABSOLUTE has
a positive ‘new-failed’.
* src/cuirass/database.scm (<evaluation-summary>)[newly-failed]: New
field.
(db-get-evaluation-summary, db-get-evaluation-absolute-summary):
Initialize it.
Fixes <https://issues.guix.gnu.org/67041>.
* src/cuirass/utils.scm (call-with-resource-from-pool): Rewrite to avoid
calling ‘put-message’ from the exception handler.
* tests/utils.scm ("resource pool, exception thrown"): New test.
This fixes a bug whereby EHOSTUNREACH would cause ‘cuirass
remote-server’ to exit.
Fixes <https://issues.guix.gnu.org/67224>.
* src/cuirass/scripts/remote-server.scm (serve-build-requests): Catch
‘zmq-error’ when calling ‘reply-worker’.
Fixes <https://issues.guix.gnu.org/66980>.
Fixes a bug whereby a worker fiber would exit due to an uncaught
exception, typically when calling ‘finish’.
* src/cuirass/scripts/remote-worker.scm (run-build): Add ‘else’ clause
in ‘guard’ form.
* Makefile.am (EXTRA_DIST): Add ‘tests/common.scm’ and ‘tests/mail.sh’.
* tests/database.scm (mailer): Use ‘search-path’ to locate ‘mail.sh’
relative to $top_srcdir.
The contrast icon was arguably misleading.
* src/cuirass/templates.scm (specifications-table): Use ‘oi-dashboard’
rather than ‘oi-contrast’ for the toggle button; clarify ‘title’.
(evaluation-info-table): Likewise.
* src/cuirass/templates.scm (evaluation-build-table): Special-case the
situation where EVALUATION is not in ‘succeeded’ state. Do not emit
build table when BUILDS is empty and EVALUATION is not in ‘succeeded’
state.
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’.