Commit graph

143 commits

Author SHA1 Message Date
Eelco Dolstra 87e4d43848 Fix the jobset unchanged check
When checking whether the jobset is unchanged, we need to compare with
the previous JobsetEval regardless of whether it had new builds.
Otherwise we'll keep adding new JobsetEval rows.
2012-03-12 20:47:30 +01:00
Eelco Dolstra 6526d4a65f hydra-build: only send email if the status differs from the previous build
This isn't perfect because it doesn't handle the case where a
previous build hasn't finished yet.  But at least it won't send mail
for old builds that fail while a newer build has already succeeded.
2012-03-12 20:47:29 +01:00
Eelco Dolstra 47f877c5bb Evaluator cleanups
* Don't use isCurrent anymore; instead look up builds in the previous
  jobset evaluation.  (The isCurrent field is still maintained because
  it's still used in some other places.)

* To determine whether to perform an evaluation, compare the hash of
  the current inputs with the inputs of the previous jobset
  evaluation, rather than checking if there was ever an evaluation
  with those inputs.  This way, if the inputs of an evaluation change
  back to a previous state, we get a new jobset evaluation in the
  database (and thus the latest jobset evaluation correctly represents
  the latest state of the jobset).

* Improve performance by removing some unnecessary operations and
  adding an index.
2012-03-12 20:47:29 +01:00
Eelco Dolstra bc82a82593 Fix a race condition in hydra-update-gc-roots
Since it read the actual roots after determining the set of desired
roots, there was a possibility that it would delete roots added by
hydra-evaluator or hydra-build while hydra-update-gc-roots was
running.  This could cause a derivation to be garbage-collected before
the build was performed, for instance.  Now the actual roots are read
first, so any root added after that time is not deleted.
2012-03-12 20:47:29 +01:00
Eelco Dolstra 29d5a02b94 Speed up hydra-update-gc-roots
The hydra-update-gc-roots script is taking around 95 minutes on our
Hydra instance (though a lot of that is I/O wait).  This patch
significantly reduces the number of database queries.  In particular,
the N most recent successful builds for each job in a jobset are now
determined in a single query.  Also, it removes the calls to
readlink().
2012-03-12 20:47:29 +01:00
Eelco Dolstra 8d65ab6158 Don't use a prepared statement for the active build steps query
Prepared statements are sometimes much slower than unprepared
statements, because the planner doesn't have access to the query
parameters.  This is the case for the active build steps query (in
/status), where a prepared statement is three orders of magnitude
slower.  So disable the use of prepared statements in this case.

(Since the query parameters are constant here, it would be nicer if we
could tell DBIx::Class to prepare a statement with those parameters
fixed.  But I don't know an easy way to do so.)
2012-03-12 20:47:29 +01:00
Eelco Dolstra 68a867da67 Merge the BuildResultInfo table into the Builds table 2012-03-12 20:47:29 +01:00
Eelco Dolstra 25334715f8 Merge the BuildSchedulingInfo table into the Builds table
This simplifies the code and improves performance since it reduces
the number of joins.
2012-03-12 20:47:29 +01:00
Eelco Dolstra 19fe4b9b4a Add hydra-init to the tarball 2012-03-05 15:35:13 +01:00
Eelco Dolstra 541238030d Provide a command ‘hydra-init’ to initialise/upgrade the database
For schema upgrades, hydra-init executes the files
src/sql/upgrade-<N>.sql, each of which upgrades the schema from
version N-1 to N.  The upgrades are wrapped in a transaction.
2012-02-28 20:16:16 +01:00
Eelco Dolstra da26294fdb Don't install hydra-create
It doesn't do anything useful for users.
2012-02-28 15:33:28 +01:00
Ludovic Courtès 1f448673f0 hydra-build: Do not send email following an abortion. 2012-02-14 11:48:44 +01:00
Eelco Dolstra a3cc2ce796 Remove redundant dot in status emails
E.g.:

  This is to let you know that Hydra build 1998534 of job patchelf:trunk:deb_ubuntu1110x86_64 is 'Success'..
2012-02-07 14:51:47 +01:00
Ludovic Courtès 5644c1c7d9 hydra-build: Add system info to the subject and extra headers. 2012-01-31 18:27:33 +01:00
Eelco Dolstra b1da85140d Fix sysbuild input type handling 2011-12-05 17:13:20 +01:00
Eelco Dolstra 3b9a62c964 Pass inputs to release expressions using -I
This means that you can now write (for instance)

  with <nixpkgs> { ... };

in release.nix, rather than

  { nixpkgs } :

  with nixpkgs { ... };
2011-12-05 13:08:43 +01:00
Eelco Dolstra 29846d7f2f Do incremental SVN checkouts
In hydra-evaluator, reuse an SVN working copy between runs (similar to
what we do with Git and other input types).  This reduces network
traffic in the common case.

Also, don't use nix-prefetch-svn.  It doesn't do anything useful.
2011-12-04 22:05:43 +01:00
Ludovic Courtès 6c4e83d454 More command renaming. 2011-12-02 15:58:26 +01:00
Eelco Dolstra be1935f66a Rename hydra_eval_jobs to hydra-eval-jobs 2011-11-30 18:14:48 +01:00
Eelco Dolstra 82d17a2d0b Rename hydra_*.pl to hydra-*
The underscores are ugly and the .pl extension is an implementation
detail that shouldn't be visible to the outside.

Also, get rid of the *.in files.  It's not really necessary to
generate them.  And I was always modifying the wrong file.
2011-11-30 18:14:48 +01:00
Eelco Dolstra 2c328e4b20 Forgot to change Nix to Nix::Store in one place 2011-11-30 17:22:31 +01:00
Eelco Dolstra c613b885f2 Use the new Nix Perl bindings 2011-11-30 15:25:28 +01:00
Rob Vermaas 41c649a2fd remove .hg-archival.txt in nix-prefetch-hg 2011-11-03 19:44:05 -04:00
Rob Vermaas ab81ce689d add nix-prefetch- scripts for now, were externals in svn 2011-10-28 22:12:51 -04:00
Eelco Dolstra 5f93e6437f * Update to Catalyst 5.9. 2011-10-07 13:45:23 +00:00
Rob Vermaas f34ec401ba fix for buildsteps starting at 0, probably something changed in catalyst 2011-09-08 22:48:38 +00:00
Eelco Dolstra 9f78a942bc 2011-08-19 16:09:14 +00:00
Ludovic Courtès dcbdd0ad26 hydra_build.pl: Honor `$build->timeout'. 2011-07-04 13:55:02 +00:00
Rob Vermaas 5d166150f9 using backquote as argument resulted in only first line as first argument to removeAsciiEscapes 2011-06-10 10:48:51 +00:00
Rob Vermaas 48b435c2de remove ascii escapes from log in tail page and emails 2011-06-10 09:53:15 +00:00
Rob Vermaas fca3019c7b qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite 2011-04-01 07:40:06 +00:00
Rob Vermaas 2849279f80 do not send email for builds with status 'aborted' 2011-03-15 12:12:56 +00:00
Rob Vermaas 03d12ca68e Hydra/57: Unknown failure -> Failed 2011-03-15 11:51:00 +00:00
Rob Vermaas 560f41a7e5 if HYDRA_CONFIG is not set, take default 2011-03-07 15:49:48 +00:00
Rob Vermaas 586f131ebd use HYDRA_DATA/hydra.conf as default location for hydra.conf 2011-03-07 15:06:32 +00:00
Rob Vermaas d4e9f5383b Hydra/56: handle failed builds with result only at build level, not buildsteps 2011-03-07 13:55:43 +00:00
Rob Vermaas 98824f2aaf hydra: nix-prefetch-bzr missing in tarball 2011-02-09 12:44:46 +00:00
Rob Vermaas 6e213fab97 hydra: add nix-prefetch-* to tarball 2011-01-14 14:11:08 +00:00
Rob Vermaas 2892c92569 move nix-prefetch-* into tarball 2011-01-14 14:04:46 +00:00
Rob Vermaas 039d1bed21 hydra: add support for succeedOnFailure feature in stdenv 2010-12-22 14:55:05 +00:00
Rob Vermaas 0cee7c0909 hydra: handle case where build to keep set to 0 2010-11-23 09:05:09 +00:00
Eelco Dolstra 91fe70522f * Doh. Remove debug statement. 2010-11-22 12:20:04 +00:00
Eelco Dolstra a93e272364 * Add a NarSize field to Hydra manifests. This allows nix-env
to predict how much disk space a package will require.
* Compute the output / closure size using the info stored in the
  Nix database (rather than doing a slow "du").
2010-11-19 15:44:20 +00:00
Eelco Dolstra 738712fca0 * Merge the GC branch. 2010-11-19 11:01:31 +00:00
Rob Vermaas dcdbb1d814 hydra: store logfile/output path/closure size 2010-11-11 11:03:50 +00:00
Rob Vermaas 753f5679cb hydra: remove HYDRA_HOME env var, not used 2010-10-08 10:45:44 +00:00
Rob Vermaas 5e0e9e058d hydra: removed need for HYDRA_BUILD_BASEURL env variable 2010-10-08 10:45:42 +00:00
Rob Vermaas c37b90ee3e hydra: use autoconf/-make 2010-09-30 14:29:15 +00:00
Rob Vermaas 38d50806b9 hydra: if evaluator sees cached build, also add the buildproducts 2010-09-07 11:29:52 +00:00
Rob Vermaas c5ceece093 hydra: moved getbuildlog 2010-09-02 08:56:29 +00:00