Commit graph

2557 commits

Author SHA1 Message Date
Joel Rivera af2f8122e3 Allow to configure the timeout value for the GitInput plugin in different places.
1. From the hydra configuration file.

    The configuration is loaded from the "git-input" block.
    Currently only the "timeout" variable is been looked up in the file.

    <git-input>
      # general timeout
      timeout = 400
      <input-name>
        # specific timeout for a particular input name
        timeout = 400
      </input-name>

      # use quotes when the input name has spaces
      <"foot with spaces">
        # specific timeout for a particular input name
        timeout = 400
      </"foo with spaces">
    </git-input>

2. As an argument in the input value after the repo url and branch (and after the deepClone if is defined)
   "timeout=<value>"

The preference on which value is used:

 1. input value
 2. Block with the name of the input in the <git-input> block
 3. "timeout" inside the <git-input> block
 4. Default value of 600 seconds. (original hard-coded value)

The code is generalized for more values to be configured, it might be too much
for a single value on a single plugin.
2017-04-13 19:10:53 -05:00
Shea Levy fed37ea640 nix-prefetch-git: Only remove .git, not e.g. .gitkeep (#454) 2017-04-12 21:08:04 +02:00
Eelco Dolstra 468b048fa2
Revert "Move build logic for the core hydra package into its own default.nix."
This reverts commit 949e5865c6. This
makes release.nix harder to read/maintain IMHO. There already is a Nix
expression for Hydra in Nixpkgs that can be used for this purpose.
2017-04-12 13:10:01 +02:00
Shea Levy 949e5865c6 Move build logic for the core hydra package into its own default.nix.
This allows users to build hydra using a normal mkDerivation, package overrides, etc.
2017-04-11 13:07:46 -04:00
Eelco Dolstra a0376a92e5
Add dependency on nix-perl
Fixes #459.
2017-04-11 15:48:22 +02:00
Eelco Dolstra c2c2633e50
Fix link to cached build log
Fixes #462.
2017-04-11 14:25:48 +02:00
Eelco Dolstra 433b94ee68
Fix Mercurial diff
It only showed the log messages of $rev1 and $rev2. Now it shows the
range $rev1::$rev2, excluding $rev1.
2017-04-11 13:39:54 +02:00
Eelco Dolstra 585d3274e3
Better error message if jobset doesn't evaluate to an attrset 2017-04-11 13:01:15 +02:00
Shea Levy 7e3f12fe10 Merge branch 'decl-project-remote-store' 2017-04-10 11:36:41 -04:00
Domen Kožar 81fee456c2
fix #425: parsable config by hydra-queue-runner 2017-04-10 14:59:58 +02:00
Eelco Dolstra 426aea1236
hydra-queue-runner: Allow multiple concurrent daemon connections 2017-04-06 18:50:53 +02:00
Eelco Dolstra 5810042a3b
Periodically clear Store's path info cache
Otherwise the queue runner can consider paths as valid that have been
garbage-collected since the first time it queried them.
2017-04-06 17:20:23 +02:00
Eelco Dolstra 8364f4ec70
Upload log files to the right location
We were mixing up builds and steps. So for example

  https://cache.nixos.org/log/2w66a98iqbjdppc5s2b8qvhi3gprvy45-freecell-solver-4.8.0.drv

at the moment contains the log for
/nix/store/442r9d5ihbcpgq8q9dhijhvhlmplzp96-perl-namespace-autoclean-0.28.drv
because the latter is a step in http://hydra.nixos.org/build/51300420.
Oops.
2017-04-06 13:05:30 +02:00
Eelco Dolstra fec895a642
hydra-server: Support logs in S3 2017-04-05 17:55:56 +02:00
Eelco Dolstra 4f11cf45dc
Fix build cancellation
We nowadays ignore SIGINT, so the sshd child process inherited this
and ignored SIGINT as well.
2017-04-05 11:01:57 +02:00
Shea Levy a738f826e8 declarative projects: Pull jobset spec build from the remote store
Fixes #443
2017-04-01 10:38:49 -04:00
Richard Zetterberg 3e0ee24b87 Adds documentation for the external API (#441)
Documents all the endpoints that can be used to retrieve data from
the API without authenticating.

Authentication and manipulating data with the API is not documented.
2017-04-01 11:20:49 +02:00
Will Dietz 90870f1416 NixExprs.pm: encode default.nix as utf-8 to fix missing chars/data. (#455)
cc #254
2017-04-01 11:18:51 +02:00
Eelco Dolstra 147ba3ca31
Set proper charset on log files 2017-03-31 18:00:08 +02:00
Shea Levy ec1c8efd43 Merge branch 'eval-no-build-hook' 2017-03-30 13:19:37 -04:00
Eelco Dolstra 8771f7f913 Merge pull request #382 from shlevy/cached-build-notifications
Send BuildFinished notifications on cached build results.
2017-03-29 18:52:20 +02:00
Eelco Dolstra 57bc0eaead
hydra-queue-runner: Limit concurrent database connections
Adding a 96-core aarch64 build machine to the build farm caused the
potential number of database connections to increase a lot, so we
started hitting the Postgres connection limit.
2017-03-21 11:53:46 +01:00
Shea Levy 3b5fd2d857 hydra-eval-jobs: Disable the build hook.
For some reason this causes an unexpected EOF when doing import-from-derivation.
2017-03-20 12:57:05 -04:00
Eelco Dolstra 150228d7de
Upload build logs to the binary cache 2017-03-15 16:59:57 +01:00
Eelco Dolstra 7e6486e694
Move log compression to a plugin 2017-03-15 16:59:57 +01:00
Eelco Dolstra 285754aff6
hydra-evaluator improvements
* The "Jobset" page now shows when evaluations are in progress (rather
  than just pending).

* Restored the ability to do a single evaluation from the command line
  by doing "hydra-evaluator <project> <jobset>".

* Fix some consistency issues between jobset status in PostgreSQL and
  in hydra-evaluator. In particular, "lastCheckedTime" was never
  updated internally.
2017-03-15 16:59:57 +01:00
Eelco Dolstra 242ea8009f
hydra-evaluator: Don't use the "timeout" command
"timeout" does not propagate PR_SET_PDEATHSIG, so it prevents
hydra-eval-jobset from being killed when hydra-evaluator quits.
2017-03-15 16:59:56 +01:00
Eelco Dolstra d1afb42f12
Supress debug message 2017-03-15 16:59:56 +01:00
Eelco Dolstra 73900e9f5f Fix std::stoi exception 2017-03-08 15:07:52 +01:00
Eelco Dolstra edebdf33f0
hydra-queue-runner: Handle SIGINT 2017-03-03 12:41:00 +01:00
Eelco Dolstra 500c27e4d5
Add hydra.conf option "nar_buffer_size" to configure memoryTokens limit
It defaults to half the physical RAM.
2017-03-03 12:37:27 +01:00
Eelco Dolstra 7c3e5c99c0
Include nix/config.h 2017-03-03 12:33:22 +01:00
Rob Vermaas fd754d678e
Do not trigger eval on jobset change when check interval is 0 (disabled). 2017-02-23 09:15:26 +00:00
Eelco Dolstra 9f6afb3375
Lock paths in the scm cache
This is necessary now that hydra-evaluator runs multiple evaluations
in parallel, to prevent corruption of Git/Mercurial clones.
2017-02-21 18:12:52 +01:00
Eelco Dolstra 52753e49c2
hydra-evaluator: Handle SIGINT
This makes "systemctl stop hydra-evaluator" work promptly again.
2017-02-21 17:54:31 +01:00
Eelco Dolstra 81ac547d2b
Move most of AddBuilds to hydra-eval-jobset
Having this stuff in a separate module is a remnant of the time when
hydra-server could add builds to the queue directly. This is no longer
the case.
2017-02-21 17:20:48 +01:00
Eelco Dolstra 7081f97f3a
Pedantry: CLOCK_REALTIME -> CLOCK_MONOTONIC 2017-02-21 16:17:17 +01:00
Eelco Dolstra 53b1f7da64 Decrease memoryTokens 2017-02-03 14:44:52 +01:00
Eelco Dolstra a366f362e1 Use latest nixUnstable 2017-02-03 14:39:18 +01:00
Renzo Carbonara 63d8c8d631 Revert "Sort inputs table" (#448)
This reverts commit c103163825.

Fixes #412 #445
2017-01-30 18:20:08 +01:00
Renzo Carbonara de55303197 Fix SQL syntax for migration 50. It failed with PostgreSQL 9.4. (#416) 2016-12-09 18:18:17 +01:00
Eelco Dolstra 8a120006f0
Fix version test 2016-12-08 16:03:50 +01:00
Eelco Dolstra 9989e6c0f4
Get exact build start/stop times from the remote 2016-12-07 16:10:21 +01:00
Eelco Dolstra f6081668dc
Allow determinism checking for entire jobsets
Setting

  xxx-jobset-repeats = patchelf:master:2

will cause Hydra to perform every build step in the specified jobset 2
additional times (i.e. 3 times in total). Non-determinism is not fatal
unless the derivation has the attribute "isDeterministic = true"; we
just note the lack of determinism in the Hydra database. This will
allow us to get stats about the (lack of) reproducibility of all of
Nixpkgs.
2016-12-07 15:57:13 +01:00
Eelco Dolstra 8bb36e79bd
Support testing build determinism
Builds can now specify the attribute "isDeterministic = true" to tell
Hydra to build with build-repeat > 0. If there is a mismatch between
rounds, the step / build fails with a suitable status.

Maybe this should be a meta attribute, but that makes it invisible to
hydra-queue-runner, and it seems reasonable to make a claim of
mandatory determinism part of the derivation (since e.g. enabling this
flag should trigger a rebuild).
2016-12-06 17:46:06 +01:00
Eelco Dolstra d0ad3fd806
Revert "Remove the global channel"
This reverts commit 2f6c2f5622.

This unintentionally also removed /all, which is actually somewhat
useful.
2016-12-06 14:25:09 +01:00
phile314-isska cf12356572 Document ssmtp for email notifications. (#426) 2016-11-29 15:27:53 +01:00
Leonid Onokhov 8758d719c6 Remove logfile.css from templates (#428)
It is no longer used, and causes unnecessary 404s
2016-11-29 15:26:04 +01:00
Leonid Onokhov 96dc9ccecb Document how to serve hydra behind reverse proxy (#423) 2016-11-24 16:10:50 +01:00
Eelco Dolstra 2f6c2f5622
Remove the global channel
It's useless and it makes it very easy to kill the server by fetching
/channel/latest/closure.
2016-11-17 18:17:02 +01:00