Previously we’d pass #f to ‘eval-summary’ for jobsets that do not have
any successful evaluation.
* src/cuirass/templates.scm (specifications-table): Correctly handle
‘spec->latest-eval-ok’ returning #f.
Previously it would only return checkouts changed compared to the
previous evaluation of that jobset.
* src/cuirass/http.scm (evaluation->json-object): Use ‘latest-checkouts’
instead of ‘evaluation-checkouts’.
* tests/http.scm (evaluations-query-result): Adjust accordingly.
Previously we’d get 500 for anything other than a symbol.
* src/cuirass/http.scm (specification->json-object): Handle build types
other than symbols describing a subset.
* src/cuirass/database.scm (db-get-evaluations-absolute-summary): Extend
SQL query and fill out all the <evaluation-summary> fields.
* tests/database.scm ("db-get-evaluation-absolute-summary"): Check ‘status’.
("db-get-evaluations-absolute-summary"): Expect three results.
Fixes a bug introduced in c445d2d642
whereby we’d call ‘evaluation-badges’ with #f as its first argument, due
to the last of a summary for LAST-EVAL.
* src/cuirass/templates.scm (specifications-table): When
LAST-EVAL-STATUS-OK? is false, call ‘broken-evaluation-badge’.
Fixes a regression introduced in
77bf78ecf7.
* src/cuirass/http.scm (url-handler): In “/search/latest” and
“/search/latest/PRODUCT-TYPE”, use symbols instead of keywords as the
second argument to ‘assoc-ref’.
* examples/random-manifest.scm (random-computed-file): Add ‘dependency’
parameter and honor it.
<top level>: Replace ‘unfold’ call with a loop; pass ‘dependency’
argument to ‘random-computed-file’.
Fixes a bug introduced in c445d2d642.
* src/cuirass/templates.scm (specifications-table)[eval-summary]:
Use the right record accessors.
Call ‘eval-summary’ on ‘last-eval’.
Commit 9e897d84ed would lead the
"set-build-successful!" test to fail when running in build environments:
In procedure symlink: No such file or directory: "/var/guix/gcroots/profiles/per-user/nixbld/cuirass/source"
This fixes this regression.
* src/cuirass/base.scm (create-build-outputs): Wrap 'register-gc-root'
in 'catch'.
Previously, exceptions raised in a test would lead Fibers to print
"Uncaught exception in task" and the test would then hang. With this
change, tests actually fail.
* tests/database.scm (with-fibers): Wrap EXP... in
'with-exception-handler'. When RESULT is an exception, rethrow it.
This procedure was introduced in
9e3e9b691c on the grounds that
'sexp->channel' in (guix channels) did not support the 'branch' field.
This was fixed in Guix commit
8f999e1ac26d939e1dfc8fbdfa9316fb412df21a (March 2021).
Furthermore, removing this procedure allows us to store channel
introductions in the database, which was not the case until now.
* src/cuirass/specification.scm (channel->sexp): Add comment.
(sexp->channel*): Remove.
* src/cuirass/database.scm (db-get-specifications): Use 'sexp->channel'.
Currently 'remote-worker' doesn't actually use this information, but i
can't hurt.
* src/cuirass/scripts/remote-server.scm (read-worker-exp): Pass #:system
to 'build-request-message'.
* src/cuirass/scripts/remote-worker.scm (run-command): Display SYSTEM in
log message.
This goes back to how the test was expressed before commit
c445d2d642. This is necessary because we
don't always get 60.
* tests/database.scm ("db-get-build-percentages"): Expect more than 50%
rather than exactly 60%.
Previously, evaluation failure might result in an '&inferior-exception'
that would be swallowed by 'n-par-for-each'. The results would be an
evaluation mark as succeeding, but with zero registered builds.
* src/cuirass/scripts/evaluate.scm (cuirass-evaluate): Use 'n-par-map'
instead of 'n-par-for-each' and keep the results. Print 'done only when
the resulting list denotes success.
The progress bar of an x86_64-linux build might be blue, that of an
i686-linux build green, and so on.
* src/cuirass/templates.scm (system->color-class): New procedure.
(workers-status): Use it to choose progress bar color class based on
system type.
The intermediate representation with keywords instead of symbols in
alists turns out to be useless.
* src/cuirass/http.scm (build->hydra-build)
(evaluation->json-object, specification->json-object)
(jobs-history->json-object): Use symbols instead of keywords in the car
of alists. Use 'scm->json-string' instead of 'object->json-string'.
* src/cuirass/http.scm (url-handler): Likewise.
* tests/http.scm (build-query-result, evaluations-query-result): Use
symbols instead of keywords.
("/build/1", "/api/latestbuilds?nr=1&jobset=guix")
("/api/evaluations?nr=1"): Use 'scm->json-string' instead of
'object->json-string'.
Instead of using alists, internal code now manipulates records. Strong
typing makes the code easier to understand and to check for correctness.
* src/cuirass/database.scm (<build>, <build-product>, <job>)
(<output>): New record types.
(db-add-output): Keep a single argument, expect an <output> record.
(db-add-build-product): Expect a <build> record and return its ID on
success.
(db-add-build-product, db-get-output, db-get-outputs)
(db-get-build-percentages): Use record accessors and constructors.
(db-add-job): Rename to...
(db-add-job-for-build): ... this. Expect records.
(db-get-jobs): Likewise. Augment query to include 'evaluation'.
(<evaluation>): New record type.
(db-get-build-dependencies/derivation, build-dependencies/id): New
procedures.
(db-register-builds): Change signature and adjust for records.
(db-get-last-status): Produce records.
(db-get-builds-by-search, db-get-builds): Likewise.
(<checkout>): New record type.
(db-get-checkouts, db-get-latest-checkout): Produce them.
(parse-evaluation): Likewise.
(<build-summary>, <evaluation-summary>): New record types.
(db-get-latest-evaluations, db-get-evaluation-summary): Produce them.
(db-get-evaluations-absolute-summary): Adjust for records.
(<dashboard>): New record type.
(db-get-dashboard): Produce it.
* src/cuirass/http.scm (build->hydra-build): Expect records.
(evaluation->json-object): Likewise.
(evaluation-html-page): Likewise.
(url-handler): Likewise.
* src/cuirass/notification.scm (build-weather-text)
(build-details-url, notification-subject, notification-text): Likewise.
* src/cuirass/rss.scm (build-details-url, build->rss-item): Likewise.
* src/cuirass/scripts/evaluate.scm (checkouts->channel-instances):
Likewise.
(user-alists->builds): New procedure.
(inferior-evaluation): Use it.
* src/cuirass/templates.scm (specifications-table, build-details)
(input-changes, evaluation-badges, evaluation-info-table)
(build-eval-table, evaluation-build-table, running-builds-table): Adjust
for records.
(workers-status): Likewise, and add 'percentages' parameter.
(machine-status, evaluation-dashboard): Adjust for records.
* src/cuirass/base.scm (set-build-successful!, build-derivation=?)
(create-build-outputs, build-packages): Likewise.
* tests/database.scm (make-dummy-build): Likewsise.
All tests use and expect records.
* tests/remote.scm: Likewise.
* tests/http.scm: Likewise.
* examples/random-manifest.scm (random-computed-file): Add
'multiple-outputs?' parameter and honor it.
(unfold): Produce 15 entries; pass 'multiple-outputs?'.
Fixes a regression introduced in
0dbd460cf1 whereby 'cuirass remote-worker'
would keep spinning and displaying "warning: low disk space" when that
condition is met.
* src/cuirass/scripts/remote-worker.scm (start-worker): Call 'sleep' on
low disk space.
Fixes a regression introduced in
de8586080e, whereby 'cuirass
remote-worker' would block forever in 'avahi-browse-service-thread'
because nobody would get the message on MANAGEMENT-CHANNEL.
* src/cuirass/scripts/remote-worker.scm (cuirass-remote-worker): Wrap
'avahi-browse-service-thread' in 'call-with-new-thread'.
* src/cuirass/http.scm (url-handler)[respond-build-not-found]: Remove.
<"dashboard">: Use 'respond-dashboard-not-found' rather than
'respond-html-eval-not-found'.
This avoids cluttering evaluation tables with zeros (zero scheduled
builds, zero failures, etc.).
* src/cuirass/templates.scm (build-counter-badge): Add the "hidden"
class when VALUE is 0.
* src/static/css/cuirass.css (.hidden): New class.
* src/cuirass/templates.scm (build-counter-badge)
(successful-build-badge, failed-build-badge, scheduled-build-badge): New
procedures.
(specifications-table, evaluation-badges): Use them rather than inline
code.