Commit graph

1512 commits

Author SHA1 Message Date
Eelco Dolstra e1c9e28589 Handle UTF-8 characters in eval error messages 2013-09-25 15:51:03 +02:00
Eelco Dolstra a8db329839 Warn against multiple jobs with the same name 2013-09-25 15:30:59 +02:00
aszlig da5824e11c hydra-module: Allow to specify the listen host.
It's currently possible to specify the port but not the address or
interface you want to listen on.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-09-25 14:48:13 +02:00
aszlig 0b202580ce templates: Use uri_for to reference static paths.
This commit is provided by (zsh syntax):

sed -i 's|/static[^"]*|[% c.uri_for("&") %]|;s/\[% size %\]/${size}/' **/*.tt

And the reason for this change is to make it easier to change the base
path with headers like X-Request-Base to be served within a URI prefix,
especially when behind a reverse proxy.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-09-25 14:37:18 +02:00
Eelco Dolstra a2491f76a4 Use the same start/stop time for the build steps as for the build 2013-09-25 01:00:20 +02:00
Eelco Dolstra f037a318e3 *headdesk*
DBIC::Class helpfully doesn't warn you when you're matching against
unselected columns.  So this query actually returned all builds...
2013-09-25 01:00:20 +02:00
Eelco Dolstra 2d7e106d29 Remove wacky "sysbuild" filtering
It's none of our business if a jobset wants to return a build that
uses a build for another system as an input...
2013-09-25 01:00:20 +02:00
Rob Vermaas b1e29e50a7 Only send email notification of evaluation error when the evaluation error has changed. Fixes #121. 2013-09-24 12:01:57 -04:00
Eelco Dolstra 550d6b79b1 Allow dots in jobset names (like "release-13.09") 2013-09-24 15:15:44 +02:00
Shea Levy 1a313ad566 Allow dashes in jobset input names
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-23 17:53:35 -04:00
Shea Levy 6d5a3d0580 Derivations with multiple outputs break the 'link name is store path' assumption
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-22 21:26:59 -04:00
Shea Levy c476d13586 hydra-module.nix: Make it possible to add extra config lines
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-22 19:20:09 -04:00
Shea Levy 98c9559bf2 Delay initializing the s3 client until it's needed to silence warnings
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-22 18:48:37 -04:00
Eelco Dolstra 77dbf55abb hydra-queue-runner: Tweaked the selection method
Pick the jobset that has used the smallest fraction of its share,
rather than the jobset furthest below its share in absolute terms.
This gives jobsets with a small share a quicker start (but they
will also run out of their share quicker).
2013-09-21 19:54:58 +00:00
Eelco Dolstra cf43c605cd hydra-queue-runner: Cache the lookup of time spent per jobset 2013-09-21 19:54:46 +00:00
Eelco Dolstra 4cdf1a270d hydra-queue-runner: Set the start time properly 2013-09-21 19:38:02 +00:00
Eelco Dolstra 52ce662710 hydra-queue-runner: Don't kill builds we just started 2013-09-21 20:51:43 +02:00
Eelco Dolstra accefbb798 hydra-queue-runner: Disable findBuildDependencyInQueue for now
It's way too slow.
2013-09-21 20:35:02 +02:00
Eelco Dolstra 24c757845d Fix lazy tab loading 2013-09-21 19:25:01 +02:00
Eelco Dolstra 9602499c1c hydra-evaluator: Do the actual work in a subprocess
This should get rid of the slow memory leaks exhibited by
hydra-evaluator.
2013-09-21 15:49:27 +00:00
Eelco Dolstra 4ed877360b hydra-queue-runner: Improved scheduling
Each jobset now has a "scheduling share" that determines how much of
the build farm's time it is entitled to.  For instance, if a jobset
has 100 shares and the total number of shares of all jobsets is 1000,
it's entitled to 10% of the build farm's time.  When there is a free
build slot for a given system type, the queue runner will select the
jobset that is furthest below its scheduling share over a certain time
window (currently, the last day).  Withing that jobset, it will pick
the build with the highest priority.

So meta.schedulingPriority now only determines the order of builds
within a jobset, not between jobsets.  This makes it much easier to
prioritise one jobset over another (e.g. nixpkgs:trunk over
nixpkgs:stdenv).
2013-09-21 14:57:01 +00:00
Eelco Dolstra 7efe793ee6 Fix the Darcs schema upgrade 2013-09-19 12:00:29 +00:00
Shea Levy 74388353b5 Add a plugin for backing up builds in s3
In your hydra config, you can add an arbitrary number of <s3config>
sections, with the following options:

* name (required): Bucket name
* jobs (required): A regex to match job names (in project:jobset:job
  format) that should be backed up to this bucket
* compression_type: bzip2 (default), xz, or none
* prefix: String to prepend to all hydra-created s3 keys (if this is
  meant to represent a directory, you should include the trailing slash,
  e.g. "cache/"). Default "".

After each build with an output (i.e. successful or failed-with-output
builds), the output path and its closure are uploaded to the bucket as
.nar files, with corresponding .narinfos to enable use as a binary
cache.

This plugin requires that s3 credentials be available. It uses
Net::Amazon::S3, which as of this commit the nixpkgs version can
retrieve s3 credentials from the AWS_ACCESS_KEY_ID and
AWS_SECRET_ACCESS_KEY environment variables, or from ec2 instance
metadata when using an IAM role.

This commit also adds a hydra-s3-backup-collect-garbage program, which
uses hydra's gc roots directory to determine which paths are live, and
then deletes all files except nix-cache-info and any .nar or .narinfo
files corresponding to live paths. hydra-s3-backup-collect-garbage
respects the prefix configuration option, so it won't delete anything
outside of the hierarchy you give it, and it has the same credential
requirements as the plugin. Probably a timer unit running the garbage
collection periodically should be added to hydra-module.nix

Note that two of the added tests fail, due to a bug in the interaction
between Net::Amazon::S3 and fake-s3. Those behaviors work against real
s3 though, so I'm committing this even with the broken tests.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-18 18:32:58 +02:00
Eelco Dolstra 4705af48b8 hydra-build: Hack to handle timeouts 2013-09-18 13:06:35 +00:00
Eelco Dolstra e4cbd057e2 Fix an uninitialized value warning 2013-09-18 12:51:51 +00:00
Eelco Dolstra e54b536bb7 hydra-update-gc-roots: Don't keep the most recent successful view result
Views are deprecated.
2013-09-18 11:12:33 +00:00
Eelco Dolstra 2845d46d21 hydra-update-gc-roots: Keep more evals
We now keep *all* unfinished evaluations of a jobset, in addition to
the <keepnr> most recent finished evaluations.

The main motivation is to ensure that mirror-{nixos,nixpkgs} work
properly: if building an evaluation takes too long, some of its builds
may already have been garbage-collected by the time the others finish.
2013-09-18 11:10:10 +00:00
Eelco Dolstra 3b70a807b5 Allow setting keepnr to 0 2013-09-18 11:27:37 +02:00
Eelco Dolstra c667b9112d Don't trigger evaluation of disabled jobsets 2013-09-18 11:25:52 +02:00
Eelco Dolstra c14a333062 Revive release button on eval page 2013-09-17 16:39:50 +02:00
Rob Vermaas 597fd827b1 Merge pull request #81 from mornfall/master
DARCS support
2013-09-14 06:18:48 -07:00
Eelco Dolstra 3f68076577 hydra-build: Don't send a giant query to the database
We had Postgres barfing with this error:

  DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: stack depth limit exceeded

because the ‘drvpath => [ @dependentDrvs ]’ in failDependents can
cause a query of unbounded size.  (In this specific case there was a
failure of Bison, which has > 10000 dependent derivations.)  So now we
just get all scheduled builds from the DB.
2013-09-10 11:01:29 +00:00
Eelco Dolstra 35aad40692 Kill builds that produce more than 64 MiB of log output 2013-09-10 10:33:55 +00:00
Petr Rockai 0041c336d1 DarcsInput: Avoid a chdir. 2013-09-07 14:47:49 +02:00
Petr Rockai 66f3e60e2a Add a test for darcs inputs. 2013-09-07 13:28:53 +02:00
Petr Rockai d31e4469bb Put a 5-second CPU time limit on the log processing pipeline. 2013-09-07 13:28:53 +02:00
Petr Rockai 1e1a1f0838 Also allow : (colon) in pathCompRE. 2013-09-07 13:28:53 +02:00
Petr Rockai bb38bdfe35 Allow : and + in build product filenames. 2013-09-07 13:28:53 +02:00
Petr Rockai dcf386cfed Make getDrvLogPath work with both bucketed and non-bucketed nix logs. 2013-09-07 13:28:53 +02:00
Petr Rockai bb8059e50c Add support for fetching URLs as inputs. 2013-09-07 13:28:53 +02:00
Petr Rockai 5a35912956 Add support for darcs repositories. 2013-09-07 13:28:51 +02:00
Eelco Dolstra 5078730cb5 Use evalFile() instead of parseExprFromFile() 2013-09-06 15:17:27 +00:00
Shea Levy 351a026c4e libexpr's symbol table has changed
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-06 10:58:03 -04:00
Shea Levy 788c2bebaa Not every buildstep has a defined drvpath
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-09-03 14:43:08 -04:00
Eelco Dolstra 04e6eda4c7 Remove unused function 2013-09-03 20:29:52 +02:00
Eelco Dolstra d914845ad7 Use a distinct icon for cancelled builds 2013-09-03 17:37:47 +02:00
Eelco Dolstra e8fb659d63 Fix some wellformedness issues
Also fixed some duplicate IDs reported by Mats Erik Andersson.
2013-09-03 17:35:21 +02:00
Eelco Dolstra 614f07755a Don't show logs bigger than 64 MB 2013-08-30 20:44:04 +00:00
Eelco Dolstra 6655ada236 Serve raw uncompressed logs directly 2013-08-30 18:11:03 +00:00
Eelco Dolstra fd7e37ef89 Try harder to find build logs
Due to the fixed-output derivation hashing scheme, there can be
multiple derivations of the same output path.  But build logs are
indexed by derivation path.  Thus, we may not be able to find the
log of a build or build step using its derivation.  So as a fallback,
Hydra now looks for other derivations with the same output paths.
2013-08-30 13:53:25 +00:00