Skip to content
Snippets Groups Projects
This project is mirrored from https://git.savannah.gnu.org/git/guix/guix-cuirass.git/. Pull mirroring updated .
  1. Apr 06, 2018
    • Ludovic Courtès's avatar
      evaluate: Really pass arguments like Hydra. · 38d367d7
      Ludovic Courtès authored
      * bin/evaluate.in (main): Use SPEC's #:name as a key in ARGS.
      * examples/random-jobs.scm (make-random-jobs): Adjust accordingly.
      38d367d7
    • Ludovic Courtès's avatar
      base: Let sqlite handle deduplication of the list of pending derivations. · 074b9d02
      Ludovic Courtès authored
      Previously we would make a SQL query that would return many build jobs,
      and then call 'delete-duplicates' on that.  This was extremely wasteful
      because the list of returned by the query was huge leading to a heap of
      several tens of GiB on a big database, and 'delete-duplicates' would
      lead to more GC and it would take ages.
      
      Furthermore, since 'delete-duplicates' is written in C as of Guile
      2.2.3, it is uninterruptible from Fiber's viewpoint.  Consequently, the
      kernel thread running the 'restart-builds' fiber would never schedule
      other fibers, which could lead to deadlocks--e.g., since fibers are
      scheduled on a circular shuffled list of kernel threads, once every N
      times, a web server fiber would be sent to that kernel thread and not be
      serviced.
      
      * src/cuirass/base.scm (shuffle-jobs): Remove.
      (shuffle-derivations): New procedure.
      (spawn-builds): Take a list of derivations instead of a list of jobs.
      (restart-builds): Remove 'builds' parameter.  Remove 'delete-duplicates'
      call.  Remove done/remaining partitioning.
      (build-packages): Adjust to pass 'spawn-builds' a list of derivations.
      * bin/cuirass.in (main): Remove computation of PENDING.  Remove second
      parameter in call to 'restart-builds'.
      074b9d02
    • Ludovic Courtès's avatar
      database: Add 'db-get-pending-derivations'. · fc24ca2e
      Ludovic Courtès authored
      * src/cuirass/database.scm (db-get-pending-derivations): New procedure.
      * tests/database.scm ("database")["db-get-pending-derivations"]: New test.
      fc24ca2e
  2. Apr 05, 2018
  3. Apr 03, 2018
    • Ludovic Courtès's avatar
      utils: Add critical sections. · f090c0f4
      Ludovic Courtès authored
      * src/cuirass/utils.scm (make-critical-section)
      (call-with-critical-section): New procedures.
      (with-critical-section): New macro.
      * src/cuirass/http.scm (with-database-access): Remove.
      (handle-build-request, handle-builds-request, url-handler): Use
      'with-critical-section' instead of 'with-database-access'.
      (run-cuirass-server): Remove 'spawn-fiber' call.  Use
      'make-critical-section' instead.
      f090c0f4
  4. Apr 02, 2018
    • Ludovic Courtès's avatar
      base: Do not resort to Coreutils' "chmod". · 543709fb
      Ludovic Courtès authored
      * src/cuirass/base.scm (make-writable-copy)[chmod+w]: New procedure.
      Replace 'system*' call with 'file-system-fold' call.
      543709fb
    • Ludovic Courtès's avatar
      base: Make a writable copy of the checkout only when #:no-compile? is false. · 2fe7ff87
      Ludovic Courtès authored
      This avoids copying things back and forth.
      
      * src/cuirass/base.scm (fetch-repository): Add #:writable-copy?
      parameter.  Call 'make-writable-copy' when it's true.
      (copy-repository-cache): Remove.
      (make-writable-copy): New procedure.
      (evaluate): Add 'source' parameter and pass it to the 'evaluate' program.
      (process-specs): Define 'compile?'.  Pass #:writable-copy? to
      'fetch-repository'.  Remove call to 'copy-repository-cache'.  Remove
      computation of the checkout directory name.  Pass CHECKOUT to 'evaluate'.
      * bin/evaluate.in (main): Replace 'cachedir' with 'source'.  Remove
      computation of the checkout directory name.
      2fe7ff87
  5. Mar 29, 2018
    • Ludovic Courtès's avatar
      database: 'db-get-builds' honors 'status+submission-time' ordering again. · 8eefd246
      Ludovic Courtès authored
      Fixes a regression introduced in
      1bab5c4e 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.
      8eefd246
    • Ludovic Courtès's avatar
      http: Process client connections really concurrently, again. · 8bdde878
      Ludovic Courtès authored
      This reinstates c47dfdf8 and fixes the
      issues that led to the revert in
      b71f0cdc.
      
      Before that, 'run-server' would force sequential processing of client
      requests one after another.
      
      * src/cuirass/http.scm (run-cuirass-server): Rewrite to use its own loop
      instead of 'run-server'.  Spawn a database fiber.
      (with-database-access): New macro.
      (handle-build-request): Expect 'db-channel' and use 'with-database-access'.
      (handle-builds-request): Likewise.
      (url-handler): Likewise.
      8bdde878
  6. Mar 28, 2018
  7. Mar 25, 2018
  8. Mar 20, 2018
  9. Mar 18, 2018
    • Ludovic Courtès's avatar
      http: Correctly set #:timestamp for non-finished builds. · 787969c9
      Ludovic Courtès authored
      Fixes a regression introduced in
      f083282f, whereby we'd return 0 as the
      timestamp for everything in /api/queue.
      
      * src/cuirass/http.scm (build->hydra-build): Make 'finished?' a
      Boolean.  Move 'bool->int' call in #:finished definition.
      787969c9
    • Ludovic Courtès's avatar
      base: Catch errors in the 'process-build-log' handler. · 2096ebe6
      Ludovic Courtès authored
      Previously, when an exception was raised from
      'handle-build-event' (e.g., a "database is locked" error), we'd throw,
      thereby leaving PORT open and we'd never read from it again.  Thus, the
      corresponding 'guix-daemon' process would eventually get stuck in a
      'write' call to that socket, and its build processes would stall.
      
      * src/cuirass/base.scm (exception-reporter): New procedure.
      (spawn-builds): Use it.
      2096ebe6
  10. Mar 02, 2018
  11. Mar 01, 2018
  12. Feb 27, 2018
  13. Feb 20, 2018
  14. Feb 15, 2018
  15. Feb 14, 2018
  16. Feb 10, 2018
  17. Feb 09, 2018
Loading