2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/guix-cuirass.git synced 2023-12-14 06:03:04 +01:00
Commit graph

552 commits

Author SHA1 Message Date
Mathieu Othacehe
e3c95014e3
database: Limit notifications to new failures and new successes. 2021-03-11 17:36:24 +01:00
Mathieu Othacehe
aabeced62a
Send notifications in a separate thread. 2021-03-11 10:27:13 +01:00
Mathieu Othacehe
e598f89445
Remove events support. 2021-03-11 10:26:36 +01:00
Mathieu Othacehe
2841bf3ba0
Remove admin section.
* src/cuirass/http.scm (url-handler): Remove admin section.
* src/cuirass/templates.scm (specifications-table): Remove optional admin
argument.
2021-03-11 08:10:51 +01:00
Mathieu Othacehe
5f830da3e3
specification: Ignore channel introduction.
* src/cuirass/specification.scm (sexp->channel): Ignore channel introduction.
2021-03-10 16:37:33 +01:00
Mathieu Othacehe
9e3e9b691c
Use our own sexp->channel procedure.
The Guix version of sexp->channel doesn't support the branch field.

* src/cuirass/specification.scm (sexp->channel): New procedure.
* src/cuirass/database.scm (db-get-specifications): Use it.
2021-03-10 16:30:28 +01:00
Mathieu Othacehe
826e2df45e
specification: channel->sexp: Add introduction support.
* src/cuirass/specification.scm (channel->sexp): Add channel introduction
support.
2021-03-10 13:48:03 +01:00
Mathieu Othacehe
fc582f5b0e
specification: Use a default build-output path.
* src/cuirass/specification.scm (<build-output>): Set a default path to "".
2021-03-10 10:02:26 +01:00
Mathieu Othacehe
463f5cd0f1
Reset database.
* src/sql/upgrade-2.sql: Remove it.
* src/sql/upgrade-3.sql: Remove it.
* src/sql/upgrade-4.sql: Remove it.
* src/sql/upgrade-5.sql: Remove it.
* Makefile.am (dist_sql_DATA): Adapt it.
2021-03-10 08:53:39 +01:00
Mathieu Othacehe
14e1335732
logging: Remove build warnings.
* src/cuirass/logging.scm (log-message): Turn into a procedure.
2021-03-10 08:33:16 +01:00
Mathieu Othacehe
d9588c0ed8
Fix admin specification creation.
* src/cuirass/http.scm (url-handler): Fix admin specification creation.
2021-03-09 19:21:27 +01:00
Mathieu Othacehe
eb060c990f
sql: Cascade deletion.
* src/schema.sql: Cascade Evaluations, Checkouts and Builds deletion.
2021-03-09 19:13:44 +01:00
Mathieu Othacehe
d521ec7bbf
Improve action button text.
* src/cuirass/templates.scm (evaluation-info-table): Improve action button text.
2021-03-09 19:05:32 +01:00
Mathieu Othacehe
21426073c1
Fix action list display.
* src/cuirass/templates.scm (evaluation-info-table): Fix action list display.
2021-03-09 19:01:29 +01:00
Mathieu Othacehe
6c5da97d46
Add evaluation retry & cancel support.
* src/cuirass/http.scm (url-handler): Add "/admin/evaluation/<id>/cancel" and
"admin/evaluation/<id>/retry" routes.
* src/cuirass/templates.scm (evaluation-info-table): Add "Cancel pending
builds" and "Retry" buttons.
2021-03-09 18:57:07 +01:00
Mathieu Othacehe
d116dc36c3
database: Add db-cancel-pending-builds!.
* src/cuirass/database.scm (db-cancel-pending-builds!): New procedure.
* tests/database.scm ("db-cancel-pending-builds!"): New test.
2021-03-09 18:45:47 +01:00
Mathieu Othacehe
70394149af
database: Add db-retry-evaluation!.
* src/cuirass/database.scm (db-retry-evaluation!): New procedure.
* tests/database.scm ("db-retry-evaluation"): New test.
2021-03-09 18:31:18 +01:00
Mathieu Othacehe
2bd6e80482
Update the Web API documentation.
* doc/cuirass.texi (Web API): Update it.
* src/cuirass/http.scm (build->hydra-build): Update it accordingly.
2021-03-09 17:02:04 +01:00
Mathieu Othacehe
265b134527
Save the default database.
* src/cuirass/database.scm (db-open): Save the default database in the
%package-database parameter.
2021-03-09 11:52:33 +01:00
Mathieu Othacehe
df39aa4821
Update documentation.
* doc/cuirass.texi: Update it.
2021-03-09 11:23:44 +01:00
Mathieu Othacehe
370ff7d8cd
Use default database parameters.
* src/cuirass/parameters.scm (%cuirass-database, %cuirass-host): New
parameters.
* src/cuirass/database.scm (db-open): Use them.
2021-03-09 07:37:29 +01:00
Mathieu Othacehe
37de70546b
Reset build timestamps on restart.
* src/cuirass/database.scm (db-restart-build!, db-restart-evaluation!): Reset
starttime and stoptime field.
2021-03-08 07:51:06 +01:00
Mathieu Othacehe
325edf2ffa
Rewrite evaluation. 2021-03-05 09:08:15 +01:00
Mathieu Othacehe
f5287dc11e
Add with-transaction.
* src/cuirass/database.scm (with-transaction): New macro.
2021-03-03 08:39:02 +01:00
Mathieu Othacehe
a5346d615e
remote: Enable core dump generation.
* src/cuirass/remote-server.scm (remote-server): Enable core dump generation.
2021-02-26 14:47:53 +01:00
Mathieu Othacehe
44df41ca7a
remote: Make sure new messages are created for each send.
* src/cuirass/remote-server.scm (zmq-start-proxy): Make sure new messages are
created for each send.
2021-02-26 12:06:46 +01:00
Mathieu Othacehe
fa191d877e
remote: Use message API.
* src/cuirass/remote-server.scm (zmq-start-proxy): Use the message API.
2021-02-26 11:39:48 +01:00
Mathieu Othacehe
e1c21224ae
remote: Use an EINTR safe message receive procedure.
* src/cuirass/remote.scm (zmq-message-receive*): New procedure.
* src/cuirass/remote-server.scm (start-fetch-worker, zmq-start-proxy): Use it.
2021-02-26 09:43:08 +01:00
Mathieu Othacehe
5f77c39f32
remote: Use copies of message contents.
* src/cuirass/remote-server.scm (zmq-start-proxy): Use copies of message
contents.
2021-02-26 09:39:22 +01:00
Mathieu Othacehe
d4acc6f566
remote: Print a warning if the poll loop is blocked.
* src/cuirass/remote-server.scm (zmq-start-proxy): Print a warning if the poll
loop is blocked for more than 5 seconds.
2021-02-26 09:35:35 +01:00
Mathieu Othacehe
d2e64f6a3d
remote: Use ZMQ message API.
* src/cuirass/remote-server.scm (start-fetch-worker): Use the message API.
2021-02-26 09:32:56 +01:00
Mathieu Othacehe
30b6dbb293
database: Ignore duplicated BuildProducts.
* src/cuirass/database.scm (db-add-build-product): Ignore duplicated
BuildProducts.
2021-02-25 09:13:47 +01:00
Mathieu Othacehe
0b19e82adc
Restart the builds on unresponsive workers.
* src/cuirass/database.scm (db-remove-unresponsive-workers): Restart the
builds that are started on unresponsive workers.
* tests/database.scm ("db-remove-unresponsive-workers"): Test it.
2021-02-24 12:42:29 +01:00
Mathieu Othacehe
370a4ad2ca
notification: Catch notifications errors.
* src/cuirass/notification.scm (notification-email, notification-mastodon):
Catch notification errors.
2021-02-24 12:10:32 +01:00
Mathieu Othacehe
76191f55c1
remote: Add log message.
* src/cuirass/remote-server.scm (run-fetch): Add log message.
2021-02-23 17:39:27 +01:00
Mathieu Othacehe
182011b60d
Keep notification text on one line.
src/cuirass/notification.scm (notification-text): Keep it on one line.
2021-02-22 16:28:16 +01:00
Mathieu Othacehe
543e26addc
Move mu-debug to parameters module.
* src/cuirass/mail.scm (mu-debug): Remove it.
* src/cuirass/utils.scm (mu-debug): Ditto.
* src/cuirass/parameters.scm (mu-debug): New variable.
* src/cuirass/remote-server.scm (start-fetch-worker): Force parameters module
load.
* tests/database.scm: Load parameters module.
2021-02-22 14:14:15 +01:00
Mathieu Othacehe
f768b53a52
Fix zabbix module.
* src/cuirass/zabbix.scm (%zabbix-uri): Remove it.
(zabbix-available?): Replace %zabbix-uri by %zabbix-url.
2021-02-22 11:57:45 +01:00
Mathieu Othacehe
27917657dd
Move mu-debug definition.
* tests/database.scm (mu-debug): Move to ...
* src/cuirass/utils.scm: ... here.
2021-02-22 11:52:24 +01:00
Mathieu Othacehe
3e65617409
Fix db-get-specifications.
* src/schema.sql: Reorder fields.
* src/cuirass/database.scm (db-get-specifications): Ditto.
2021-02-22 11:12:00 +01:00
Mathieu Othacehe
342c5edfe8
Use parameters for the Mastodon crendentials.
* src/cuirass/parameters.scm (%mastodon-instance-name, %mastodon-instance-url,
%mastodon-instance-token): New variables.
* src/cuirass/mastodon.scm (send-status): Remove "instance-name",
"instance-url" and "instance-token" parameters.
* src/cuirass/notification (notification-mastodon): Adapt accordingly.
2021-02-22 10:15:58 +01:00
Mathieu Othacehe
a0e12c382b
Make notifications field optional.
* src/cuirass/database.scm (db-add-specification): Make notifications field
optional.
2021-02-22 10:07:57 +01:00
Mathieu Othacehe
f0e0c3454f
Add parameters support.
* src/cuirass/parameters.scm: New file.
* Makefile.am (dist_pkgmodule_DATA): Add it.
* bin/cuirass.in: Add "parameters" argument.
* src/cuirass/base.scm (read-parameters): New procedure.
* src/cuirass/notification.scm (build-details-url): New procedure.
(notification-text): Use it.
* src/cuirass/rss.scm (build-details-url): New procedure.
(build->rss-item): Use it.
(rss-feed): Remove "base-url" argument.
* src/cuirass/remote-server.scm: Add "parameters" argument.
* src/cuirass/zabbix.scm (%zabbix-uri, %zabbix-uri, %zabbix-password): Remove
them.
(zabbix-request, zabbix-login): Adapt accordingly.
2021-02-22 09:05:27 +01:00
Mathieu Othacehe
f6fdb13b50
Add Mastodon support.
* src/cuirass/mastodon.scm: New file.
* Makefile.am (dist_pkgmodule_DATA): Add it.
* src/cuirass/notification.scm (notification-type): Add "mastodon".
(notification-mastodon): New procedure.
(send-notifications): Add it.
2021-02-21 10:37:11 +01:00
Mathieu Othacehe
4495e08542
Add notifications support.
* src/cuirass/mail.scm: New file.
* src/cuirass/notification.scm: New file.
* src/sql/upgrade-5.sql: New file.
* Makefile.am (dist_pkgmodule_DATA, dist_sql_DATA): Add them.
* src/schema.sql (Specifications)[notifications]: New field.
* bin/cuirass.in: Wrap inside the "with-notification" macro.
* src/cuirass/remote-server.scm (remote-server): Ditto.
* src/cuirass/database.scm (db-add-specification): Add notifications field.
(db-get-specifications): Ditto.
(db-update-build-status!): Send notifications.
* tests/mail.sh: New file.
* tests/database.scm (mu-debug, tmp-mail): New variables.
(mailer): New procedure.
(example-spec): Add an email notification.
("mail-notification"): New test case.
2021-02-21 09:55:41 +01:00
Mathieu Othacehe
aa9099e4df
Move date->rfc822-str to utils.scm.
* src/cuirass/rss.scm (date->rfc822-str): Move it to ...
* src/cuirass/utils.scm: ... here.
2021-02-21 09:15:39 +01:00
Mathieu Othacehe
422de6c3e2
Remove favicon in SVG format.
* src/static/images/icon.svg: Remove it.
* src/cuirass/http.scm (%file-white-list): Remove "images/icon.svg".
* src/cuirass/templates.scm (html-page): Remove icon.svg link.
2021-02-19 19:25:11 +01:00
Mathieu Othacehe
2ab6c4604d
Add favicon support.
* src/cuirass/http.scm (%file-white-list): Rename "logo.png" into "guix.png".
Add "icon.png" and "icon.svg".
* src/cuirass/templates.scm (html-page): Adapt it.
* src/static/images/logo.png: Rename it ...
* src/static/images/guix.png: ... into this file.
* src/static/images/icon.png: New file.
* src/static/images/icon.svg: New file.
2021-02-19 09:53:16 +01:00
Mathieu Othacehe
b200ea8947
Add a lock icon for admin actions.
* src/cuirass/templates.scm (build-details, evaluation-info-table): Add lock
icons for admin actions.
2021-02-19 09:19:09 +01:00
Mathieu Othacehe
efb140d3d5
Remove the evaluation restart dropdown arrow.
* src/cuirass/templates.scm: Remove the evaluation restart dropdown arrow.
* src/static/css/cuirass.css (no-dropdown-arrow): New rule.
2021-02-18 15:37:10 +01:00
Mathieu Othacehe
64151eee28
Add an evaluation restart button.
* src/cuirass/http.scm (url-handler): New route
"/admin/evaluation/<id>/restart".
* src/cuirass/templates.scm (evaluation-info-table): Add an evaluation restart
button.
2021-02-18 15:22:59 +01:00
Mathieu Othacehe
4a0cea2245
database: Add "db-restart-evaluation!" support.
* src/cuirass/database.scm (db-restart-evaluation!): New procedure.
* tests/database.scm (db-restart-evaluation!): New test.
2021-02-18 15:12:54 +01:00
Mathieu Othacehe
04185edba6
Allow unconditionnal build restart.
* src/cuirass/templates.scm (build-details): Allow unconditionnal build
restart.
2021-02-18 14:57:42 +01:00
Mathieu Othacehe
4e0152f7a4
Add a build restart button.
* src/cuirass/http.scm (url-handler): New route "/admin/build/<id>/restart".
* src/cuirass/template.scm (build-details): Add a "restart" button.
2021-02-18 14:53:52 +01:00
Mathieu Othacehe
31342ff80f
database: Add db-restart-build! support.
* src/cuirass/database.scm (db-restart-build!): New procedure.
* tests/database.scm (db-restart-build!): New test.
2021-02-17 19:11:38 +01:00
Mathieu Othacehe
860fffa260
remote: Set the locale only in the publish thread.
* src/cuirass/remote-server.scm (remote-server): Move the locale setup to the
publish thread.
* src/cuirass/remote-worker.scm (remote-worker): Ditto.
* src/cuirass/remote.scm (publish-server): Set the locale.
2021-02-17 17:19:27 +01:00
Mathieu Othacehe
ea01201ccd
remote: Use a default locale.
* src/cuirass/remote-server.scm (remote-server): Use a default locale.
* src/cuirass/remote-worker.scm (remote-worker): Ditto.
2021-02-17 14:23:05 +01:00
Mathieu Othacehe
a5f0a5f04d
Remove outdated commentary.
* src/cuirass/database.scm (db-register-builds): Remove commentary.
2021-02-14 15:32:49 +01:00
Mathieu Othacehe
83f33cdbb4
remote: Remove address argument. 2021-02-12 14:39:12 +01:00
Mathieu Othacehe
b191a2a5f6
Pick the first worker build.
* src/cuirass/templates.scm (machine-status): Pick the first worker build if
multiple builds are started on the same worker.
2021-02-10 18:27:06 +01:00
Mathieu Othacehe
e77a0a94fe
database: Fix db-get-build-percentage query.
* src/cuirass/database.scm (db-get-build-percentage): Consider both successful
and failing builds.
2021-02-10 18:23:41 +01:00
Mathieu Othacehe
38701970eb
remote: Discover server log-port and publish-port without Avahi.
* src/cuirass/remote.scm (zmq-server-info, zmq-worker-request-info-message):
New procedures.
* src/cuirass/remote-server.scm (%log-port, %publish-port): New parameters.
(read-worker-exp): Handle 'worker-request-info message.
(remote-server): Set the new parameters.
* src/cuirass/remote-worker.scm (start-worker): Rename "server" argument. Send
a 'worker-request-info message to discover the server log port and publish
port.
(remote-worker): Adapt it.
2021-02-10 17:37:37 +01:00
Mathieu Othacehe
5e5850533e
Add Zabbix command line argument.
* bin/cuirass.in: Add "--zabbix-uri" argument.
* src/cuirass/zabbix.scm (%zabbix-uri): Export it.
2021-02-08 13:31:28 +01:00
Mathieu Othacehe
ac98f81671
Add Zabbix support. 2021-02-08 12:26:35 +01:00
Mathieu Othacehe
7aa1d9156a
Return worker last-seen field as integer.
* src/cuirass/database.scm (db-get-worker, db-get-workers): Return last-seen
field as integer.
2021-02-07 18:16:57 +01:00
Mathieu Othacehe
eea91d9a63
remote: Swallow zlib errors.
* src/cuirass/remote.scm (swallow-zlib-error): New macro.
(send-log): Use it.
2021-02-06 09:42:54 +01:00
Mathieu Othacehe
75c44bb579
remote: Stop polling once the workers are started.
* src/cuirass/remote-worker.scm (remote-worker): Stop the avahi poll loop once
the workers are started.
2021-02-06 09:41:11 +01:00
Mathieu Othacehe
485ed9182b
Fix weather query.
* src/cuirass/database.scm (db-get-builds): Add missing parens.
2021-02-02 14:48:36 +01:00
Mathieu Othacehe
8bdc7ee535
Fix weather value.
* src/cuirass/database.scm (db-get-builds): Fix weather value.
* tests/http.scm (build-query-result): Adapt it.
2021-02-02 14:29:16 +01:00
Mathieu Othacehe
6bd940fc24
Add RSS link to the home page.
* src/cuirass/templates.scm (specifications-table): Add RSS link.
2021-02-02 14:11:55 +01:00
Mathieu Othacehe
4e98cb02dd
Add RSS link to the evaluation page.
* src/cuirass/templates.scm (evaluation-info-table): Add RSS link.
2021-02-02 14:09:35 +01:00
Mathieu Othacehe
7cf304f754
Fix RSS specification handling.
* src/cuirass/http.scm (url-handler): Pass the specification to
"db-get-builds" procedure.
2021-02-02 13:57:28 +01:00
Mathieu Othacehe
2befdc6a0d
Use a XML header for the RSS feed.
* src/cuirass/http.scm (respond-xml): New procedure.
(url-handler): Use it for the RSS feed.
2021-02-02 13:06:38 +01:00
Mathieu Othacehe
f8ddf8ca09
Add basic RSS support.
* src/cuirass/rss.scm: New file.
* Makefile.am (dist_pkgmodule_DATA): Add it.
* src/cuirass/http.scm (url-handler): Add "/events/rss" route.
2021-02-02 11:58:29 +01:00
Mathieu Othacehe
4f4d7ff7db
Move weather field to database.
* src/sql/upgrade-4.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Builds)[weather]: New field.
(Builds_weather_evaluation): New index.
* src/cuirass/database.scm (db-get-last-status): New procedure.
(db-update-build-status!): Use it and update the new weather field.
(db-get-builds): Adapt it.
* tests/http.scm (build-query-result): Ditto.
2021-02-02 11:56:28 +01:00
Mathieu Othacehe
f6662298c9
Move weather icon next to build status icon.
* src/cuirass/templates.scm (build-details): Move the weather icon.
2021-02-01 19:02:27 +01:00
Mathieu Othacehe
79b77b4377
remote: Start workers only once.
* src/cuirass/remote-worker.scm (%workers-started?): New variable.
(remote-worker): Use it to start workers only once.
2021-02-01 18:16:23 +01:00
Mathieu Othacehe
a57b066e4f
Add build history support.
* src/cuirass/database.scm (db-get-builds): Add "oldevaluation" filter.
* src/cuirass/templates.scm (build-details): Add "history" argument.
* src/cuirass/http.scm (url-handler): Adapt it.
2021-02-01 17:49:00 +01:00
Mathieu Othacehe
f9a5cbe0dd
Add weather support in build details.
* src/cuirass/templates.scm (build-details): Display weather.
2021-02-01 15:15:13 +01:00
Mathieu Othacehe
d7282c05c0
Add build weather support.
* src/cuirass/database.scm (build-weather): New macro.
(build-status->weather): New procedure.
(db-get-builds): Return the build weather using the new procedure.
* src/cuirass/http.scm (build->hydra-build): Also return the weather.
* src/cuirass/templates.scm (weather-class, weather-title): New procedures.
(build-eval-table): Display the weather.
* tests/database.scm ("db-get-build weather"): New tests.
* tests/http.scm (build-query-result): Adapt it.
2021-02-01 14:27:24 +01:00
Mathieu Othacehe
54244e6e97
database: Fix "db-update-build-status!".
* src/cuirass/database.scm (db-update-build-status): Only consider evaluations
that happened before the current one. This is useful when updating the build
status of old evaluations.
2021-02-01 12:30:38 +01:00
Mathieu Othacehe
7697735fce
database: Fix "db-get-worker".
* src/cuirass/database.scm (db-get-worker): Handle the case where no worker
were found.
2021-02-01 12:22:56 +01:00
Mathieu Othacehe
da93cb96ff
Fix SQL syntax.
* src/sql/upgrade-3.sql: Fix syntax.
2021-02-01 12:06:05 +01:00
Mathieu Othacehe
74c1a94a4d
Introduce build "last_status" field.
* src/sql/upgrade-3.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Builds)[last_status]: New field.
* src/cuirass/database.scm (db-update-build-status!): Honor it.
(db-get-builds): Return it.
* tests/database.scm ("db-update-build-status!"): New test.
2021-02-01 11:45:10 +01:00
Mathieu Othacehe
158966dca0
Fix /api/latestbuilds ordering.
Evaluations are added sequentially to database but builds are not always
registered nor performed in order. This means that a build corresponding to an
older evaluation can be returned first if it was completed last. Order by
descending evaluation id to prevent it.

* src/cuirass/database.scm (db-get-builds): Add "evaluation" order.
* src/cuirass/http.scm (url-handler): Order latestbuilds by descending
evaluation number.
2021-01-31 21:09:17 +01:00
Mathieu Othacehe
e9e0943945
Remove workers hash table.
* src/cuirass/database.scm (db-add-worker): Rename ...
(db-add-or-update-worker): ... into this new procedure.
(db-get-worker, db-remove-unresponsive-workers): New procedures.
* src/cuirass/remote-server.scm (%workers): Remove it.
(pop-build): Adapt it.
(remove-unresponsive-workers!): Remove it.
(read-worker-exp): Adapt it.
(zmq-start-proxy): Ditto.
* tests/database.scm ("db-add-worker"): Rename ...
("db-add-or-update-worker"): ... into this new test.
("db-get-worker", "db-remove-unresponsive-workers"): New tests.
2021-01-31 10:31:01 +01:00
Mathieu Othacehe
b993f3d433
Truncate long lines.
* src/cuirass/templates (workers-status): Truncate long lines.
2021-01-30 20:50:51 +01:00
Mathieu Othacehe
4370acce19
Sort workers consistently.
* src/cuirass/templates.scm (workers-status): Sort workers consistently.
2021-01-30 18:10:31 +01:00
Mathieu Othacehe
6c0298e12c
Remove left-over procedure.
* src/cuirass/templates.scm (workers-status): Remove unused "build-row"
procedure.
2021-01-30 18:02:35 +01:00
Mathieu Othacehe
5f770638bb
Fix workers display.
* src/cuirass/templates.scm (workers-status): Handle the case where multiple
builds are started on a worker.
2021-01-30 16:55:22 +01:00
Mathieu Othacehe
6838ec2eac
database: Prevent division by zero.
* src/cuirass/database.scm (db-get-build-percentage): Prevent division by zero.
2021-01-30 16:14:04 +01:00
Mathieu Othacehe
158dd2bd42
Fix build duration display.
* src/cuirass/templates.scm (build-details): Fix build duration display.
2021-01-30 16:11:50 +01:00
Mathieu Othacehe
154653b4c8
database: Fix starttime update.
* src/cuirass/database.scm (db-update-build-status!): Set starttime when the
build status is "submitted".
2021-01-30 16:10:50 +01:00
Mathieu Othacehe
7a7c26c628
Sort machines consistently.
* src/cuirass/templates.scm (workers-status): Sort machines.
2021-01-30 15:54:29 +01:00
Mathieu Othacehe
1e8d075d70
Improve workers page.
* src/cuirass/templates.scm (workers-status): Improve display.
* src/cuirass/http.scm (url-handler): Adapt it.
2021-01-30 14:24:29 +01:00
Mathieu Othacehe
213683ad27
database: Add "db-get-build-percentage".
* src/cuirass/database.scm (db-get-build-percentage): New procedure.
* tests/database.scm ("db-get-build-percentage"): New test.
2021-01-30 14:23:29 +01:00
Mathieu Othacehe
1271b11725
Add machine field to Worker table.
* src/sql/upgrade-2.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Workers): Add "machine field".
* src/cuirass/database.scm (db-get-builds): Return "worker" field.
(db-add-worker): Honor new "machine" field.
(db-get-workers): Ditto.
* src/cuirass/remote-worker.scm (remote-worker): Adapt it.
* src/cuirass/remote.scm (<worker>)[machine]: New field.
(worker-machine): New procedure.
(worker->sexp, sexp->worker): Adapt accordingly.
(generate-worker-name): Ditto.
* tests/database.scm (%dummy-worker): Add "machine" field.
2021-01-30 14:18:59 +01:00
Mathieu Othacehe
68532aee90
Fix logging.
* src/cuirass/remote-server.scm (remote-server): Have stdout/stderr
line-buffered.
* src/cuirass/remote-worker.scm (remote-worker): Ditto.
* src/cuirass/remote.scm (publish-server): Discard publish logs.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-01-28 16:16:43 +01:00
Mathieu Othacehe
dea5707750
database: Fix search pagination.
* src/cuirass/database.scm (db-get-builds-by-search): Fix pagination.
2021-01-17 19:47:54 +01:00
Mathieu Othacehe
e61e7a5ca4
Fix tests.
* tests/database.scm (db-init): Force database creation.
* tests/http.scm (db-init): Ditto.
* tests/metrics (db-init): Ditto.
2021-01-17 12:05:31 +01:00