| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
* src/cuirass/database.scm (db-update-build-status!): And "AND status != ?"
in SQL queries.
* tests/database.scm ("database")["db-update-build-status!"]: Add call
to 'db-update-build-status!'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/cuirass/database.scm (%sqlite-exec): Remove.
(sqlite-exec): Turn back into a procedure. Use 'sqlite-bind'. Add
'normalize' procedure and use it.
(db-add-specification, db-add-derivation, db-get-derivation)
(db-add-evaluation, db-add-build, db-update-build-status!)
(db-get-build, db-get-stamp, db-add-stamp): Use question marks in SQL
queries.
* src/cuirass/base.scm (build-packages)[register]: Make #:log
non-false.
* tests/database.scm (make-dummy-job): Add #:job-name, #:system,
#:nix-name, and #:eval-id. This is necessary because 'sqlite-bind'
would now translate #f to a real NULL (before it would translate to the
string "#f"...), and would thus report violations of the non-NULL
constraint.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
|
|
|
| |
* src/cuirass/http.scm (url-handler): Check whether REQUEST's method is
'GET, and return 405 if not.
|
|
|
|
| |
* tests/http.scm ("http")["cuirass-run"]: Run server with 'run-fibers'.
|
|
|
|
|
|
| |
This is a followup to commit c89c117c12792cbc4996035feb670c2535dcb105.
* tests/http.scm (build-query-result): Add #:derivation.
|
|
|
|
|
|
| |
* src/cuirass/database.scm (sqlite-exec): Use (ice-9 format).
(db-update-build-status!): Add #:log-file parameter and honor it.
* tests/database.scm ("database")["db-update-build-status!"]: Test it.
|
|
|
|
|
|
|
|
| |
* src/cuirass/http.scm (url-handler): Add /api/queue handler.
* tests/http.scm ("http"): Add a BUILD2 and DERIVATION2, and rename
BUILD and DERIVATION accordingly.
("/build/2", "/build/2/log/raw"): Rename to /42.
("/api/queue?nr=100"): New test.
|
|
|
|
|
|
|
|
|
| |
* src/cuirass/database.scm (build-status): Add 'scheduled' and
'started'.
(db-add-build): Make sure #:timestamp, #:starttime, #:stoptime, and
#:status are integers.
(db-update-build-status!): New procedure.
* tests/database.scm ("database")["db-update-build-status!"]: New test.
|
|
|
|
| |
* tests/database.scm: Add missing "eval:".
|
|
|
|
|
|
|
|
|
|
|
| |
This moves log handling responsibility to 'guix publish'.
* src/cuirass/http.scm (handle-log-request): Remove.
(url-handler): Change /log/raw URI handler to return 302 to /log/OUTPUT.
* tests/http.scm (log-file-name): Remove, and remove code to create and
delete it.
("fill-db"): Change #:log value.
("/build/1/log/raw"): Expect 302.
|
|
|
|
|
|
|
|
|
|
| |
* src/cuirass/database.scm (db-get-builds): Make 'order' a separate
filter. Add 'format-limit-clause'. Reverse OUTPUTS.
* tests/database.scm (make-dummy-eval, make-dummy-derivation)
(make-dummy-build): New procedures.
(with-temporary-database): New macro.
("database"): Use 'make-dummy-build'.
("db-get-builds"): New test.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/cuirass.texi (Sections)[Web API]: New section describing the HTTP API.
* src/cuirass/http.scm (spec->json-string): Move it to utils.scm and rename it
object->json-string.
(object->json-scm): Move it utils.scm.
(handle-*-request): New helpers procedures.
(request-parameters): New procedure to parse a request query.
(url-handler): Add new API's.
* src/cuirass/utils.scm (object->json-scm, object->json-string): Exported
procedures moved from http.scm.
* tests/http.scm: Add various tests on new HTTP API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
integration.
* bin/evaluate.in (fill-job): New procedure.
(main): Use it to fill informations (nix-name, system) that will later be
added to database.
* doc/cuirass.texi (Database)[Derivation]: Add system and nix_name fields.
(Database)[Builds]: Add id, status, timestamp, starttime and stoptime
fields. Remove output field.
(Database)[Outputs]: New table describing the build outputs.
* src/cuirass/base.scm (build-packages): Add new fields to build object before
adding it to database.
* src/cuirass/database.scm (db-get-build, db-get-builds): New procedures to get
a build by id from database and a list of builds using filter parameters
respectively.
* src/schema.sql (Outputs) : New table.
(Derivations): Add system and nix_name columns.
(Builds): Remove output column and add id, status, timestamp, starttime and
stoptime columns.
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes <https://bugs.gnu.org/28094>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
* src/cuirass/database.scm (SQLITE_CONSTRAINT)
(SQLITE_CONSTRAINT_PRIMARYKEY): New variables.
(db-add-build): Catch 'sqlite-error, and swallow
SQLITE_CONSTRAINT_PRIMARYKEY errors.
* tests/database.scm ("db-add-build"): New test.
|
|
|
|
|
|
|
|
| |
* Makefile.am (dist_pkgmodule_DATA): Remove repo.scm,
(TESTS): Remove repo.scm.
* build-aux/guix.scm (package)[disable-repo-tests]: Remove phase.
* src/cuirass/repo.scm: Remove.
* tests/repo.scm: Remove.
|
|
|
|
|
|
|
|
|
|
|
| |
* src/cuirass/utils.scm (mkdir-p, make-user-module,
call-with-temporary-directory, with-directory-excursion): Remove because
already defined in guix.
* tests/utils (with-directory-excursion): Remove associated test.
* src/cuirass/base.scm: Use (guix build utils) to provide procedure removed
from (cuirass utils).
* bin/evaluate.in: Ditto.
* bin/cuirass.in: Use "make-user-module" provided by (guix ui).
|
|
|
|
|
|
|
| |
* src/cuirass/repo.scm (git-repo): Remove it.
* tests/repo.scm: Remove related tests.
git-repo is not used and it's usecases will be covered by (guix git).
|
|
|
|
|
|
|
| |
This fixes a test failure with Guile 2.2.
* tests/http.scm (hash-table-keys, hash-table=?): New procedures.
("spec->json-string"): Use it to compare the JSON objects.
|
|
|
|
|
|
|
| |
* src/cuirass/utils.scm (call-with-temporary-directory): New procedure.
* src/cuirass/repo.scm: Use it. New file.
* tests/repo.scm: New tests.
* Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/gnu-system.scm: Moved from 'tests' directory.
* examples/guix-jobs.scm: Likewise.
* examples/guix-track-git.scm: Likewise.
* examples/hello-git.scm: Likewise.
* examples/hello-singleton.scm: Likewise.
* examples/hello-subset.scm: Likewise.
* Makefile.am (EXTRA_DIST): Adapt.
* README <Example>: Likewise.
|
|
|
|
|
|
|
|
| |
* src/schema.sql (Specifications): Make 'repo_name' the primary key.
(Stamps, Evaluations): Adapt.
* src/cuirass/database.scm (db-get-specifications): Likewise.
(db-add-specification): Ignore if SPEC has already been added.
* tests/database.scm (example-spec): Adapt.
|
|
|
|
|
|
|
|
|
|
|
| |
* guix.scm: New file; specify Guix package.
* guix/ci.scm: New file; expose to Guix.
* build-aux/pre-inst-env.in: Add it to GUIX_PACKAGE_PATH.
* bin/evaluate.in (main): Lookup proc using name specified by #:proc.
* tests/guix-track-git.scm: New file.
* tests/hello-git.scm: Test it.
Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
* src/schema.sql (Specifications): Add no_compile_p column.
* src/cuirass/database.scm (db-add-specification)
(db-get-specifications): Handle #:no-compile? property.
* tests/database.scm (example-spec): Adapt.
* src/cuirass/base.scm (process-specs): Skip compilation if #:no-compile?.
Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
|
|
|
|
| |
* tests/database.scm: Use 'test-group-cleanup'.
|
|
|
|
|
| |
* tests/http.scm ("spec->json-string"): Make expected result more
readable.
|
|
|
|
|
|
|
| |
* src/cuirass/http.scm: New file.
* tests/http.scm: Likewise.
* Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
* configure.ac: Check for (json) module.
|
|
|
|
|
| |
* src/cuirass/utils.scm (alist?): New procedure.
* tests/utils.scm ("alist?"): New test.
|
|
|
|
|
|
| |
* src/schema.sql (Evaluations): Add 'revision' column.
* src/cuirass/database.scm (db-add-evaluation): Adapt.
All callers changed.
|
|
|
|
|
|
|
| |
* tests/base.scm: Add missing 'test-begin' and 'test-end'.
* tests/database.scm: Likewise.
* tests/ui.scm: Likewise.
* tests/utils.scm: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/schema.sql (Derivations): New table.
(Evaluations): Remove 'derivation' and 'job_name' columns. Add 'id'
column.
* src/cuirass/database.scm (db-add-evaluation): Adapt.
(db-get-derivation, db-add-derivation): New procedures.
(evaluation-exists?, db-get-evaluation): Delete.
* bin/evaluate.in (main): Adapt.
* tests/database.scm ("sqlite-exec"): Likewise.
("db-add-derivation", "db-get-derivation"): New tests.
("db-add-evaluation", "db-get-evaluation"): Delete.
|
|
|
|
| |
* tests/database/scm ("db-add-build-log"): Delete.
|
|
|
|
|
| |
* tests/hello-singleton.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
|
| |
|
| |
|
|
|
|
| |
Adapt src/cuirass/database.scm and its tests.
|
|
|
|
| |
Export it. Add a test.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This fixes a bug where different Guix branches gave the same
derivations.
|
| |
|
|
|
|
| |
This calls were using its previous name 'job-name'.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|