| Commit message (Expand) | Author | Age | Files | Lines |
| * | Add support for multiple inputs.•••* Makefile.am (dist_sql_DATA): Add src/sql/upgrade-1.sql.
* bin/cuirass.in (show-help, %options, main): Remove the LOAD-PATH option that
was used afterwards as %GUIX-PACKAGE-PATH.
* bin/evaluate.in (absolutize, input-checkout, spec-source, spec-load-path,
spec-package-path, format-checkouts): New procedures.
(%not-colon): Remove variable.
(main): Take the load path, package path and PROC from the checkouts that
result from the inputs. Format the checkouts before sending them to the
procedure. Remove the LOAD-PATH argument.
* doc/cuirass.texi (Overview, Database schema): Document the changes.
* examples/{guix-jobs.scm, hello-git.scm, hello-singleton.scm,
hello-subset.scm, random.scm}: Adapt to the new specification format.
* examples/guix-track-git.scm (package->spec): Rename to PACKAGE->INPUT.
(package->git-tracked): Replace FETCH-REPOSITORY with FETCH-INPUT and handle
the new format of its return value.
* examples/random-jobs.scm (make-random-jobs): Rename RANDOM to CHECKOUT.
Rename the checkout from 'random (which is a specification) to 'cuirass (which
is a checkout resulting from an input).
* src/cuirass/base.scm (fetch-repository): Rename to fetch-input. Rename SPEC
to INPUT. Return a checkout object instead of returning two values.
(evaluate): Take a list of CHECKOUTS and COMMITS as arguments, instead of
SOURCE. Remove TOKENIZE and LOAD-PATH. Pass the CHECKOUTS instead of the
SOURCE to "evaluate". Remove %GUIX-PACKAGE-PATH. Build the EVAL object
instead of getting it from "evaluate".
(compile?, fetch-inputs, compile-checkouts): New procedures.
(process-specs): Fetch all inputs instead of only fetching one repository.
The result of that fetching operation is a list of CHECKOUTS whose COMMITS are
used as a STAMP.
(%guix-package-path, set-guix-package-path): Remove them.
* src/cuirass/database.scm (db-add-input, db-get-inputs): New procedures.
(db-add-specification, db-get-specifications): Adapt to the new specification
format. Add/get all inputs as well.
(db-add-evaluation): Rename REVISION to COMMITS. Store COMMITS as space
separated commit hashes.
(db-get-builds): Rename REPO_NAME to NAME.
(db-get-stamp): Rename COMMIT to STAMP. Return #f when there is no STAMP.
(db-add-stamp): Rename COMMIT to STAMP. Deal with DB-GET-STAMP's new return
value.
(db-get-evaluations): Rename REVISION to COMMITS. Tokenize COMMITS.
* src/cuirass/utils.scm (%non-blocking): Export it.
* src/schema.sql (Inputs): New table that refers to the Specifications table.
(Specifications): Move input related fields to the Inputs table. Rename
REPO_NAME to NAME. Rename ARGUMENTS to PROC_ARGS. Rename FILE to PROC_FILE.
Add LOAD_PATH_INPUTS, PACKAGE_PATH_INPUTS and PROC_INPUT fields that refer to
the Inputs table.
(Stamps): Rename REPO_NAME to NAME.
(Evaluations): Rename REPO_NAME to NAME. Rename REVISION to COMMITS.
(Specifications_index): Replace with Inputs_index.
* src/sql/upgrade-1.sql: New file.
* tests/database.scm (example-spec, make-dummy-eval, sqlite-exec): Adapt to
the new specifications format. Rename REVISION to COMMITS.
* tests/http.scm (evaluations-query-result, fill-db): Idem.
| Clément Lassieur | 2018-07-16 | 2 | -24/+39 |
| * | database: Call a specification 'jobset' instead of 'project'.•••This removes the possibility to filter specifications by branch, because
branches were previously called 'jobset'. But it doesn't matter because later
on, specifications will have as many branches as inputs. And people should
filter by specification name instead.
* doc/cuirass.texi (Build Information, Latest builds): Remove 'jobset',
replace 'project' with 'jobset'.
* src/cuirass/http.scm (build->hydra-build): Idem.
* tests/database.scm (db-get-builds): Idem.
* tests/http.scm (build-query-result, /api/latestbuilds?nr=1&jobset=guix,
/api/latestbuilds?nr=1&jobset=gnu): Idem.
* src/cuirass/database.scm (db-format-build, db-get-builds): Don't associate
builds with branches (which were called 'jobset' afterwards).
(db-get-builds): Remove the #:project filter.
| Clément Lassieur | 2018-07-14 | 2 | -10/+8 |
| * | http: Add /api/evaluations route.•••* src/cuirass/database.scm (db-get-evaluations): New exported procedure.
* src/cuirass/http.scm (url-handler): Add /api/evaluations route.
* tests/http.scm ("http"): Add /api/evaluations test route.
| Mathieu Othacehe | 2018-04-19 | 1 | -3/+25 |
| * | database: Add 'db-get-pending-derivations'.•••* src/cuirass/database.scm (db-get-pending-derivations): New procedure.
* tests/database.scm ("database")["db-get-pending-derivations"]: New test.
| Ludovic Courtès | 2018-04-05 | 1 | -0/+23 |
| * | database: 'db-get-builds' honors 'status+submission-time' ordering again.•••Fixes a regression introduced in
1bab5c4e56eb1849edc2cf0b23d433aeb2cac421 whereby the
'status+submission-time' order would no longer be honored.
As a result, /api/queue would return the queue ordered by build IDs,
making it largely useless.
* src/cuirass/database.scm (db-get-builds): Remove 'order' and rename
'order-column-name' to 'order'. Add case for 'status+submission-time'.
* tests/database.scm ("database")["db-get-builds"]: Move below
"db-update-build-status!" test. Add case for the
'status+submission-time' order.
| Ludovic Courtès | 2018-03-29 | 1 | -34/+40 |
| * | database: Make 'db-add-derivation' idempotent.•••* src/cuirass/database.scm (db-add-derivation): Catch 'sqlite-error and
handle SQLITE_CONSTRAINT_PRIMARYKEY.
(SQLITE_CONSTRAINT_UNIQUE): New variable.
* tests/database.scm ("database")["db-add-derivation"]: Add extra call to
'db-add-derivation'.
| Ludovic Courtès | 2018-02-14 | 1 | -0/+1 |
| * | database: Use argument binding in 'db-get-builds' queries.•••That makes it safe from SQL injection.
* src/cuirass/database.scm (db-get-builds): Rewrite to use question
marks in SQL queries and binding through '%sqlite-exec'.
* tests/database.scm ("database")["db-get-builds"]: Exercise 'WHERE'
clauses.
| Ludovic Courtès | 2018-02-08 | 1 | -0/+5 |
| * | database: 'db-update-build-status!' keeps stoptime unchanged when nothing new.•••* 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!'.
| Ludovic Courtès | 2018-02-08 | 1 | -0/+5 |
| * | database: Use 'sqlite-bind' to avoid SQL injection.•••* 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>
| Danny Milosavljevic | 2018-02-08 | 1 | -1/+5 |
| * | http: Reject methods other than GET.•••* src/cuirass/http.scm (url-handler): Check whether REQUEST's method is
'GET, and return 405 if not.
| Ludovic Courtès | 2018-01-26 | 1 | -0/+4 |
| * | http: Run test within 'run-fibers'.•••* tests/http.scm ("http")["cuirass-run"]: Run server with 'run-fibers'.
| Ludovic Courtès | 2018-01-26 | 1 | -1/+5 |
| * | http: Adjust test to include #:derivation.•••This is a followup to commit c89c117c12792cbc4996035feb670c2535dcb105.
* tests/http.scm (build-query-result): Add #:derivation.
| Ludovic Courtès | 2018-01-25 | 1 | -0/+1 |
| * | database: 'db-update-build-status!' takes a #:log-file parameter.•••* 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.
| Ludovic Courtès | 2018-01-24 | 1 | -4/+7 |
| * | http: Implement /api/queue.•••* 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.
| Ludovic Courtès | 2018-01-23 | 1 | -36/+65 |
| * | database: Add 'db-update-build-status!'.•••* 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.
| Ludovic Courtès | 2018-01-23 | 1 | -0/+25 |
| * | tests: Fix malformed Emacs local variable line.•••* tests/database.scm: Add missing "eval:".
| Ludovic Courtès | 2018-01-23 | 1 | -1/+1 |
| * | http: /build/N/log/raw redirects to /log.•••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.
| Ludovic Courtès | 2018-01-07 | 1 | -22/+8 |
| * | database: Extend and test 'db-get-builds'.•••* 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.
| Ludovic Courtès | 2018-01-07 | 1 | -4/+63 |
| * | cuirass: add Hydra compatible HTTP API.•••* 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.
| Mathieu Othacehe | 2017-09-08 | 1 | -25/+190 |
| * | cuirass: Store new information in database to prepare 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.
| Mathieu Othacehe | 2017-09-08 | 1 | -1/+1 |
| * | database: 'db-add-build' is now idempotent.•••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.
| Ludovic Courtès | 2017-08-26 | 1 | -0/+10 |
| * | repo: Remove dead code.•••* 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.
| Mathieu Othacehe | 2017-07-06 | 1 | -81/+0 |
| * | utils: Remove useless procedures.•••* 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).
| Mathieu Othacehe | 2017-07-01 | 1 | -15/+0 |
| * | repo: remove git-repo.•••* 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).
| Mathieu Othacehe | 2017-07-01 | 1 | -32/+0 |
| * | tests: Compare JSON objects instead of JSON strings.•••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.
| Ludovic Courtès | 2017-05-10 | 1 | -15/+46 |
| * | repo: Add <repo> record datatype.•••* 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.
| Mathieu Lirzin | 2016-12-28 | 1 | -0/+113 |
| * | maint: Move examples from 'tests' to 'examples' directory.•••* 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.
| Mathieu Lirzin | 2016-12-16 | 6 | -618/+0 |
| * | db: Forbid inserting the same specification twice.•••* 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.
| Mathieu Lirzin | 2016-11-17 | 1 | -2/+1 |
| * | tests: Track Cuirass' git.•••* 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>
| Jan Nieuwenhuizen | 2016-09-23 | 2 | -0/+274 |
| * | base: Support tracking of a Guix package's git.•••* 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>
| Jan Nieuwenhuizen | 2016-09-23 | 1 | -1/+2 |
| * | tests: database: Use 'test-group-cleanup'.•••* tests/database.scm: Use 'test-group-cleanup'.
| Mathieu Lirzin | 2016-08-28 | 1 | -33/+27 |
| * | tests: http: Reformat expected result.•••* tests/http.scm ("spec->json-string"): Make expected result more
readable.
| Mathieu Lirzin | 2016-08-03 | 1 | -7/+14 |
| * | Add (cuirass http) module.•••* src/cuirass/http.scm: New file.
* tests/http.scm: Likewise.
* Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
* configure.ac: Check for (json) module.
| Mathieu Lirzin | 2016-07-31 | 1 | -0/+33 |
| * | utils: Add 'alist?' procedure.•••* src/cuirass/utils.scm (alist?): New procedure.
* tests/utils.scm ("alist?"): New test.
| Mathieu Lirzin | 2016-07-30 | 1 | -0/+10 |
| * | schema: Evaluations: Add 'revision' column.•••* src/schema.sql (Evaluations): Add 'revision' column.
* src/cuirass/database.scm (db-add-evaluation): Adapt.
All callers changed.
| Mathieu Lirzin | 2016-07-30 | 1 | -6/+6 |
| * | tests: Add missing test group statements.•••* tests/base.scm: Add missing 'test-begin' and 'test-end'.
* tests/database.scm: Likewise.
* tests/ui.scm: Likewise.
* tests/utils.scm: Likewise.
| Mathieu Lirzin | 2016-07-27 | 4 | -0/+16 |
| * | schema: Separate "Derivations" from "Evaluations".•••* 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.
| Mathieu Lirzin | 2016-07-27 | 1 | -13/+10 |
| * | database: Remove "db-add-build-log" test.•••* tests/database/scm ("db-add-build-log"): Delete.
| Mathieu Lirzin | 2016-07-27 | 1 | -9/+0 |
| * | tests: Add 'hello-singleton' specification example.•••* tests/hello-singleton.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
| Mathieu Lirzin | 2016-07-27 | 1 | -0/+33 |
| * | cuirass: Use database to store specifications. | Mathieu Lirzin | 2016-07-25 | 1 | -0/+18 |
| * | gnu-system: license->alist: Allow list in license field. | Mathieu Lirzin | 2016-07-25 | 1 | -3/+6 |
| * | schema: Separate 'Evaluations' from 'Builds'.•••Adapt src/cuirass/database.scm and its tests.
| Mathieu Lirzin | 2016-07-25 | 1 | -6/+15 |
| * | database: sqlite-exec: Return every rows.•••Export it. Add a test.
| Mathieu Lirzin | 2016-07-25 | 1 | -0/+10 |
| * | Move '%program-name' to (cuirass ui) module. | Mathieu Lirzin | 2016-07-25 | 2 | -12/+31 |
| * | gnu-system: Add 'license->alist' procedure. | Mathieu Lirzin | 2016-07-14 | 1 | -3/+10 |
| * | Remove redundancies in the specification examples. | Mathieu Lirzin | 2016-07-14 | 2 | -37/+36 |
| * | gnu-system: Use 'specification->package' when possible. | Mathieu Lirzin | 2016-07-14 | 1 | -19/+14 |
| * | Remove unnecessary (cuirass job) module. | Mathieu Lirzin | 2016-07-13 | 1 | -1/+0 |
| * | Evaluate derivations in a separate process.•••This fixes a bug where different Guix branches gave the same
derivations.
| Mathieu Lirzin | 2016-07-13 | 4 | -97/+87 |
| * | Add guix-jobs.scm specification file. | Mathieu Lirzin | 2016-07-04 | 1 | -0/+40 |