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
17e8759efe
Optimize Jobs table. 2021-04-14 15:05:00 +02:00
Mathieu Othacehe
f97bf6b75f
worker: Fix REQUEST_PERIOD read.
* src/cuirass/scripts/remote-worker (%request-period): Fix period read.
2021-04-14 12:00:11 +02:00
Mathieu Othacehe
29dc6015a8
templates: Round build percentages.
* src/cuirass/templates.scm (specifications-table): Round percentages.
2021-04-12 12:28:04 +02:00
Mathieu Othacehe
427d3662e3
http: Fix typo.
* src/cuirass/http.scm (url-handler): Fix typo.
2021-04-12 11:25:34 +02:00
Mathieu Othacehe
4d6ec11021
http: Fix error on /eval/id/dashboard.
* src/cuirass/http.scm (url-handler): Handle unknown evaluation id on
"/eval/id/dashboard" route.
2021-04-12 09:44:32 +02:00
Mathieu Othacehe
d601fe0e4c
Fix Jobs Builds foreign key.
* src/sql/upgrade-6.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
2021-04-09 11:32:53 +02:00
Mathieu Othacehe
3dc6cf78b2
Add missing Jobs primary key.
* src/sql/upgrade-5.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
2021-04-09 10:15:30 +02:00
Mathieu Othacehe
7542d626dc
Add the evaluations absolute build summary.
* src/cuirass/database.scm (db-get-evaluations-absolute-summary): New
procedure.
* src/cuirass/http.scm (url-handler): Pass the evaluation absolute summary to
"evaluation-info-table".
* src/cuirass/templates.scm (evaluation-info-table): Adapt it.
* src/static/css/cuirass.css (job-abs): New section.
* tests/database.scm ("db-get-evaluations-absolute-summary"): New test.
2021-04-09 09:27:32 +02:00
Mathieu Othacehe
d3d1f384a4
Fix display glitches.
* src/cuirass/templates.scm (specifications-table): Fix glitches.
* src/static/css/cuirass.css (job-val): New section.
* doc/cuirass.texi: Update it.
2021-04-08 15:42:07 +02:00
Mathieu Othacehe
152f7a6884
Add support for new build types.
* src/cuirass/specification.scm (%build-types): Add 'images, 'system-tests and
'tarball support.
* doc/cuirass.texi (Specifications): Adapt it.
2021-04-08 15:41:17 +02:00
Mathieu Othacehe
d86c4edee7
Add specification period support.
* src/sql/upgrade-4.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Specifications)[period]: New field.
* src/cuirass/base.scm (process-specs): Honor the specification period.
* src/cuirass/database.scm (db-get-time-since-previous-build): Rename it into ...
(db-get-time-since-previous-eval): ... this new procedure.
* src/cuirass/specification.scm (<specification>)[period]: New field.
(specification->sexp, sexp->specification): Adapt accordingly.
* src/cuirass/templates.scm (specification-edit): Ditto.
* tests/database.scm ("db-get-time-since-previous-build"): Remame it into ...
("db-get-time-since-previous-eval"): ... this new procedure.
2021-04-08 15:37:43 +02:00
Mathieu Othacehe
245d0b5e5a
Add a jobs toggle button.
* src/cuirass/database.scm (db-get-specifications-summary): Return the latest
evaluation.
* src/cuirass/templates.scm (specifications-table): Add a monitor and a toggle
button.
2021-04-08 13:49:02 +02:00
Mathieu Othacehe
0ba0786741
Add specification job summary.
* src/cuirass/database.scm (db-get-specifications-summary): New procedure.
* tests/database.scm ("db-get-specifications-summary"): New test.
* src/cuirass/templates.scm (specifications-table): Add a summary argument.
* src/cuirass/http.scm (url-handler): Adapt it.
2021-04-08 11:56:37 +02:00
Mathieu Othacehe
2c3440de5c
Use the Build id as Jobs foreign key.
Join Build and Jobs tables using the build id instead of the build derivation
to speed queries.

* src/sql/upgrade-3.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Jobs)[derivation]: Replace it by ...
[build]: this new column.
* src/cuirass/database.scm (db-add-job, db-get-jobs): Adapt them.
2021-04-08 10:49:41 +02:00
Mathieu Othacehe
065dbea573
Add a spinner to dashboard page.
* src/cuirass/templates.scm (evaluation-dashboard): Add a spinner.
2021-04-08 09:17:20 +02:00
Mathieu Othacehe
11c34ae2b8
Update Bootstrap to v4.2.1.
* src/static/css/bootstrap.css: Update it.
2021-04-08 09:17:01 +02:00
Mathieu Othacehe
1b35a77856
Fix job insertion with existing outputs.
Different derivations may result in a same build output. If a job registers a
derivation D2 with the output O1, Cuirass may already have processed another
derivation D1 with the same O1 output.

In that case, the new job must point to the D1 derivation and not the D2
derivation, for which no build will be triggered.

* src/cuirass/database.scm (db-add-job): Fix it.
* tests/database.scm ("db-register-builds same-outputs", "db-get-jobs
same-outputs"): New tests.
2021-04-07 15:04:23 +02:00
Mathieu Othacehe
7b018bd2c2
Fix dasboard margin.
* src/static/css/cuirass.css (content-fixed-margin): Add flex property.
2021-04-07 12:23:00 +02:00
Mathieu Othacehe
ec0be96407
Add dashboard display.
* src/cuirass/http.scm (url-handler): New "/eval/id/dashboard" route.
* src/cuirass/templates.scm (evaluation-dashboard): New procedure.
* src/static/css/cuirass.css (content-fixed-margin, dashboard, div.tooltip):
New sections.
2021-04-07 11:47:48 +02:00
Mathieu Othacehe
63ce1c940b
Add d3.js support.
* src/static/js/d3.v6.min.js: New file.
* Makefile.am (dist_js_DATA): Add it.
* src/cuirass/http.scm (%file-white-list): Add it.
* src/cuirass/templates.scm (html-page): Add it.
2021-04-06 15:27:58 +02:00
Mathieu Othacehe
bba1311478
Add jobs support.
Each evaluation registration produces a list of new jobs. Until now, only the
jobs which build outputs were not stored in the "Outputs" table were added to
the "Builds" table.

It means that Cuirass looses track of the job list associated to a given
evaluation.  This is problematic to provide the overall build status of an
evaluation or to find the evaluation providing the best build coverage.

Add a new "Jobs" table that stores the job list of each evaluation.  Also add
a new "/api/jobs" API to consult it.

* src/sql/upgrade-2.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Jobs): New table.
* src/cuirass/database.scm (db-add-job, db-get-jobs): New procedures.
(db-register-builds): Call db-add-job.
* src/cuirass/http.scm (url-handler): New "/api/jobs" route.
* tests/database.scm ("db-get-jobs", "db-get-jobs names"): New tests.
* doc/cuirass.texi (Web API, Database): Document it.
2021-04-06 15:18:55 +02:00
Mathieu Othacehe
c52b4c5354
css: Remove horizontal padding.
* src/static/css/cuirass.css (.content): Remove horizontal padding.
2021-03-29 13:37:52 +02:00
Mathieu Othacehe
eb94e7da6a
Add a footer margin. 2021-03-27 10:42:46 +01:00
Mathieu Othacehe
7c5b788029
Improve footer display. 2021-03-27 10:38:36 +01:00
Mathieu Othacehe
a0d42b171f
Add a footer.
* src/cuirass/templates.scm (html-page): Add a footer.
* src/static/css/cuirass.css (body, footer): New sections.
2021-03-26 21:45:03 +01:00
Mathieu Othacehe
ff3f25d287
http: Rename respond-gzipped-file.
* src/cuirass/http (respond-gzipped-file): Rename it to ...
(respond-compressed-file): ... this new procedure. Add support for bzip2
compressed files.
(url-handler): Adapt it.
2021-03-26 13:57:39 +01:00
Mathieu Othacehe
d5724217d9
base: Record the log file.
* src/cuirass/base.scm (handle-build-event): Add a store argument and use it
to record the log file.
(spawn-builds): Adapt it.
2021-03-26 13:56:47 +01:00
Mathieu Othacehe
a6e7d85610
base: Remove unused argument.
* src/cuirass/base.scm (set-build-successful!): Remove log argument.
2021-03-26 13:55:37 +01:00
Vincent Legoll
eb5786a2ea
css: Set the search box z-index.
* src/static/css/cuirass.css (#search): Set z-index to 1.
2021-03-26 09:06:38 +01:00
Mathieu Othacehe
f5a2eeae18
Fix single checkout update.
When a new evaluation is triggered by a single channel update, the
matching specification can have other channels that are not updated. In that
case, "db-get-checkouts" will only return the checkout corresponding to the
channel update.

This cause "channel-instances->profile" to fail this way:

In guix/channels.scm:
   911:32  3 (channel-instances->derivation _)
   871:36  2 (channel-instances->manifest (#<<channel-instance> cha?>))
    759:6  1 (channel-instance-derivations (#<<channel-instance> ch?>))
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
ERROR:
  1. &message: "'guix' channel is lacking"
  2. &fix-hint: "Make sure your list of channels\ncontains one channel named @code{guix} providing the core of Guix."
  3. &error-location: #<<location> file: "guix/channels.scm" line: 557 column: 18>

Introduce a db-get-latest-checkout procedure that returns the last checkout of
a given channel. Use it to request the checkouts of all the channels before
creating the profile.

* src/cuirass/database.scm (db-get-latest-checkout): New procedure.
* tests/database.scm ("db-get-latest-checkout"): New test.
* src/cuirass/scripts/evaluate.scm (latest-checkouts): New procedure.
(cuirass-evaluate): Use it.
2021-03-25 17:42:09 +01:00
Mathieu Othacehe
c3a9e9c79f
Add pagination button on evaluation page. 2021-03-25 11:48:42 +01:00
Mathieu Othacehe
1ed9360108
Add table order buttons. 2021-03-25 10:31:38 +01:00
Mathieu Othacehe
6a46e6bf65
remote: Do not compress substitutes. 2021-03-23 16:57:39 +01:00
Mathieu Othacehe
48f630f9f7
Add builds per machine metric table. 2021-03-23 09:54:07 +01:00
Mathieu Othacehe
f6008378be
Add builds count per machine metric. 2021-03-22 19:40:31 +01:00
Mathieu Othacehe
2efa062a4a
Update copyrights. 2021-03-22 18:31:41 +01:00
Mathieu Othacehe
b645f4eb0c
Add remote building tests. 2021-03-22 18:29:07 +01:00
Mathieu Othacehe
43d29317d9
Use a single Cuirass binary. 2021-03-22 18:29:06 +01:00
Mathieu Othacehe
9fbf6991fa
Add build parameter edition field. 2021-03-21 15:52:49 +01:00
Mathieu Othacehe
9d8fe4ca8a
Use notifications and outputs from the existing specification. 2021-03-20 17:46:11 +01:00
Mathieu Othacehe
2eda35bf68
Remove send events binary.
This is superseeded by the notification system.
2021-03-14 20:48:25 +01:00
Mathieu Othacehe
c89c33d3b0
Add channels build type support.
* src/cuirass/specification.scm (%build-types): Add 'channels support.
2021-03-14 19:44:52 +01:00
Mathieu Othacehe
6a3174ddbb
Fix specification creation. 2021-03-12 18:35:08 +01:00
Mathieu Othacehe
659e7479e5
Fix workers status page. 2021-03-12 17:33:29 +01:00
Mathieu Othacehe
6438742f99
Improve worker status page queries. 2021-03-12 17:07:52 +01:00
Mathieu Othacehe
8379c803dc
Add form validation. 2021-03-12 10:53:05 +01:00
Mathieu Othacehe
5c9003b41d
Fix build products creation. 2021-03-12 08:35:56 +01:00
Mathieu Othacehe
b24d55e368
Add specification creation and edition pages. 2021-03-11 19:31:35 +01:00
Mathieu Othacehe
82b8f825d8
Turn db-add-specification into db-add-or-update-specification. 2021-03-11 19:30:58 +01:00
Mathieu Othacehe
bd8af796d8
Add build types list. 2021-03-11 17:37:47 +01:00