Commit Graph

208 Commits

Author SHA1 Message Date
b49e138e9c Merge pull request #3 from nbp/candidates/fetch-git
Optimize fetch-git.
2012-04-24 10:18:28 -07:00
966cc22131 Fix query for certain postgresql versions. 2012-04-22 08:30:48 +02:00
8f31935ffa Handle the case where there are no builds and no previous eval 2012-04-17 12:32:44 +02:00
ec87ad2bf2 Missing part of aaacf9eda3 2012-04-15 22:57:10 +00:00
fd50ac1d4e Store the inputs of each evaluation in the database
Achtung: this requires a schema upgrade via "hydra-init".
2012-04-15 18:36:36 +00:00
80705c8a20 hydra-init: show SQL commands being executed 2012-04-15 18:34:32 +02:00
19d9955e89 Optimize fetch-git. 2012-04-14 18:17:35 -07:00
f52ca0c588 Add a redirect to the latest view result for which the underlying evaluation has finished completely
This will be useful for the Nixpkgs channel mirror script:

  http://hydra.nixos.org/view/nixpkgs/unstable/latest-finished/channel

is the channel containing the latest, consistent, tested set of builds.
2012-04-03 17:45:03 +02:00
2c677ec71a Always record inputs passed through -I in the BuildInputs table
We currently have no way to determine if the Nix evaluator used a
specific -I input, so we need to record all of them as inputs.
2012-04-03 10:10:45 +00:00
2f9153c640 Prevent multiple builds with the same (job, outPath) tuple from being added
This happened in a pathological case in Nixpkgs: the "grub" job is
evaluated for i686-linux and x86_64-linux, but in the latter case it
returns the same derivation as in the former case.  So only one build
should be added.
2012-04-02 15:56:29 +00:00
d8f8143cc2 No wonder our disk was filling up 2012-03-26 17:13:50 +02:00
1f268d2d43 Update isCurrent properly 2012-03-13 13:09:10 +01:00
179b012a8e Open the DB using Hydra::Model::DB->new
This gets rid of the openHydraDB function and ensures that we
open the database in a consistent way.

Also drop the PostgreSQL sequence hacks.  They don't seem to be
necessary anymore.
2012-03-13 12:10:19 +01:00
13f4636436 hydra-evaluator: handle the case where there is no previous jobset eval 2012-03-12 21:13:28 +01:00
a4cda5e337 Don't use the Switch module
It was removed in Perl 5.14.
2012-03-12 20:47:30 +01:00
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
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
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
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
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
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
68a867da67 Merge the BuildResultInfo table into the Builds table 2012-03-12 20:47:29 +01:00
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
19fe4b9b4a Add hydra-init to the tarball 2012-03-05 15:35:13 +01:00
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
da26294fdb Don't install hydra-create
It doesn't do anything useful for users.
2012-02-28 15:33:28 +01:00
1f448673f0 hydra-build: Do not send email following an abortion. 2012-02-14 11:48:44 +01:00
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
5644c1c7d9 hydra-build: Add system info to the subject and extra headers. 2012-01-31 18:27:33 +01:00
b1da85140d Fix sysbuild input type handling 2011-12-05 17:13:20 +01:00
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
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
6c4e83d454 More command renaming. 2011-12-02 15:58:26 +01:00
be1935f66a Rename hydra_eval_jobs to hydra-eval-jobs 2011-11-30 18:14:48 +01:00
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
2c328e4b20 Forgot to change Nix to Nix::Store in one place 2011-11-30 17:22:31 +01:00
c613b885f2 Use the new Nix Perl bindings 2011-11-30 15:25:28 +01:00
41c649a2fd remove .hg-archival.txt in nix-prefetch-hg 2011-11-03 19:44:05 -04:00
ab81ce689d add nix-prefetch- scripts for now, were externals in svn 2011-10-28 22:12:51 -04:00
5f93e6437f * Update to Catalyst 5.9. 2011-10-07 13:45:23 +00:00
f34ec401ba fix for buildsteps starting at 0, probably something changed in catalyst 2011-09-08 22:48:38 +00:00
9f78a942bc 2011-08-19 16:09:14 +00:00
dcbdd0ad26 hydra_build.pl: Honor `$build->timeout'. 2011-07-04 13:55:02 +00:00
5d166150f9 using backquote as argument resulted in only first line as first argument to removeAsciiEscapes 2011-06-10 10:48:51 +00:00
48b435c2de remove ascii escapes from log in tail page and emails 2011-06-10 09:53:15 +00:00
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
2849279f80 do not send email for builds with status 'aborted' 2011-03-15 12:12:56 +00:00
03d12ca68e Hydra/57: Unknown failure -> Failed 2011-03-15 11:51:00 +00:00
560f41a7e5 if HYDRA_CONFIG is not set, take default 2011-03-07 15:49:48 +00:00
586f131ebd use HYDRA_DATA/hydra.conf as default location for hydra.conf 2011-03-07 15:06:32 +00:00