Commit graph

190 commits

Author SHA1 Message Date
Eelco Dolstra 906b129f6a Fix findBuildDependencyInQueue
Previously this function didn't actually have a lot of effect.  If a
build A had a dependency B, Hydra would start B first.  But on the
next scan through the queue, it would start A anyway, because of the
"busy => 0" restriction.

Now the queue runner won't start a build if a dependency is already
running.  (This is not necessarily optimal, since the build may have
other dependencies that don't correspond to a build in the queue but
could run.  One day we'll start all Hydra builds in parallel...)

Also, for performance, use computeFSClosure instead of "nix-store
-qR".  And don't bother with topological sorting because it didn't
have an effect anyway since the database returns dependencies in
arbitrary order.
2013-05-03 16:27:26 +02:00
Eelco Dolstra e96916533f Allow a per-jobset check interval
This allows checking a jobset (say) at most once a day.  It's also
possible to disable polling by setting the interval to 0.  This is
useful for jobsets that use push notification or are manually
evaluated.
2013-05-02 17:55:47 +02:00
Shea Levy adb9ad83dd hydra-evaluator: Respect triggers of disabled jobsets
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-02 11:32:25 -04:00
Ludovic Courtès bd5454d5d9 hydra-eval-guile-jobs: Use `--fresh-auto-compile'.
* src/script/hydra-eval-guile-jobs.in (main): Run `guile' with
  `--fresh-auto-compile'.
2013-04-13 18:59:42 +02:00
Eelco Dolstra b8369a6a5f Put build status in front of the notification mail subject 2013-04-02 10:40:50 +02:00
Ludovic Courtès f3aa48978e hydra-eval-guile-jobs: Allow use of the installed Guix.
* src/script/hydra-eval-guile-jobs.in: Leave GUILE_LOAD_PATH and
  GUILE_LOAD_COMPILED_PATH unchanged.
2013-03-27 00:07:57 +01:00
Ludovic Courtès 9a9f37f209 hydra-eval-guile-jobs: Adjust to multiple-output format.
This is a followup to commit
10882a1ffd ("Add multiple output
support").

* src/script/hydra-eval-guile-jobs.in (job-evaluations->sxml): Return
  several `output' tags in the body, and remove the `outPath' attribute
  of `job'.
2013-03-27 00:07:57 +01:00
Ludovic Courtès 9da89dd32b hydra-eval-guile-jobs: Adjust to <license> objects.
* src/script/hydra-eval-guile-jobs.in (job-evaluations->sxml): Output
  the license name, not the external representation of <license>
  objects.
2013-03-27 00:07:57 +01:00
Peter Simons 5ffc925ae7 hydra-queue-{runner,evaluator}: don't clutter the system log with debug messages 2013-03-26 11:03:15 +01:00
Shea Levy 152c392198 Whoops 2013-03-07 10:52:31 -05:00
Eelco Dolstra 6d131719be Respect SystemTypes if defined 2013-03-05 18:01:44 +01:00
Shea Levy d764c135ce hydra-queue-runner: Use nix.machines instead of the SystemTypes table to determine how many build jobs are allowed per system type.
Note that on machines that support multiple system types, EACH system type gets the full number of build slots, which is almost certainly not what we want.
2013-03-04 17:44:19 -05:00
Eelco Dolstra a77161e40a Allow users to edit their own settings
Also, don't use the flash anymore for going back to the referer.
2013-03-04 15:25:23 +01:00
Eelco Dolstra f51b93da03 Remove debug line 2013-02-25 21:18:29 +01:00
Eelco Dolstra 42d2015357 Support push notification of repository changes
External machines can now notify Hydra that it should check a
repository by sending a GET or PUSH request to /api/push, providing a
list of jobsets to be checked and/or a list of repository URLs.  In
the latter case, all jobsets that have any of the specified
repositories as an input will be checked.

For instance, you can configure GitHub or BitBucket to send a request
to the URL

  http://hydra.example.org/api/push?repos=git://github.com/NixOS/nixpkgs.git

to trigger evaluation of all jobsets that have
git://github.com/NixOS/nixpkgs.git as an input, or to the URL

  http://hydra.example.org/api/push?jobsets=patchelf:trunk,nixpkgs:trunk

to trigger evaluation of just the specified jobsets.
2013-02-25 21:10:32 +01:00
Eelco Dolstra ddcb9f1d5d Handle the case where a jobset has never been evaluated 2013-02-25 19:38:11 +00:00
Eelco Dolstra 24de044c55 hydra-evaluator: Always pick the jobset that hasn't been evaluated longest 2013-02-25 18:47:54 +01:00
Eelco Dolstra 10882a1ffd Add multiple output support
This requires turning the outPath columns in the Builds and BuildSteps
tables into separate tables, and so requires a schema upgrade.
2013-02-13 16:49:28 +00:00
Eelco Dolstra ecdbce1a61 Handle active build steps of aborted builds properly 2013-01-22 23:01:29 +01:00
Eelco Dolstra 30e5185acf Remove the logfile and logSize columns from the database
It's pointless to store these, since Nix knows where the logs are.
Also handle (in fact require) Nix's new log storage scheme.  Also some
cleanups in the build page.
2013-01-22 22:48:02 +01:00
Eelco Dolstra 67aefde62c Remove trailing whitespace 2013-01-22 14:41:02 +01:00
Eelco Dolstra f188fe5683 hydra-evaluator: Don't require $HYDRA_CONFIG 2013-01-22 13:19:28 +01:00
Ludovic Courtès 183078131a Capture the path to `guile', when available. 2012-10-17 16:25:49 +02:00
Ludovic Courtès f27ae1d566 Add support for Guile & Guix. 2012-10-17 16:23:00 +02:00
Rob Vermaas 90c9b5dd60 Do not send emails when build is cancelled/aborted. Also, ignore aborted/cancelled builds in comparing to previous build. 2012-08-06 00:00:07 +02:00
Eelco Dolstra 2ab4c7d597 Update queryPathInfo calls 2012-07-18 23:14:45 +02:00
Rob Vermaas a2f56ce574 * Read logs using logContents function in stead of handling it everywhere separately. 2012-06-26 12:00:18 +02:00
Rob Vermaas b591c443b0 Keep builds of disabled jobsets that are not hidden. Fixes #18. 2012-05-11 09:11:07 +02:00
Eelco Dolstra 854513be8e I should test first 2012-04-30 17:57:13 +02:00
Eelco Dolstra dcc570f454 Set the build status properly for failing local builds
If a build has ‘preferLocalBuilds = true’ (or we're not using remote
building), and the build has a non-permanent failure, then the build
status should be "Aborted" rather than "Failed".  This is denoted by
an exit status of 100 from nix-store.
2012-04-30 17:15:35 +02:00
Rob Vermaas 4a1a2203ac I should sleep... grmbl 2012-04-26 09:37:48 +02:00
Rob Vermaas 3c465c3661 Revert nix-prefetch-git changes merged in earlier from Merge request #3, which broke git describe functionality used in GNU jobsets. 2012-04-26 09:31:00 +02:00
Rob Vermaas b49e138e9c Merge pull request #3 from nbp/candidates/fetch-git
Optimize fetch-git.
2012-04-24 10:18:28 -07:00
Rob Vermaas 966cc22131 Fix query for certain postgresql versions. 2012-04-22 08:30:48 +02:00
Eelco Dolstra 8f31935ffa Handle the case where there are no builds and no previous eval 2012-04-17 12:32:44 +02:00
Eelco Dolstra ec87ad2bf2 Missing part of aaacf9eda3 2012-04-15 22:57:10 +00:00
Eelco Dolstra 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
Eelco Dolstra 80705c8a20 hydra-init: show SQL commands being executed 2012-04-15 18:34:32 +02:00
Nicolas Pierron 19d9955e89 Optimize fetch-git. 2012-04-14 18:17:35 -07:00
Eelco Dolstra 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
Eelco Dolstra 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
Eelco Dolstra 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
Eelco Dolstra d8f8143cc2 No wonder our disk was filling up 2012-03-26 17:13:50 +02:00
Eelco Dolstra 1f268d2d43 Update isCurrent properly 2012-03-13 13:09:10 +01:00
Eelco Dolstra 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
Eelco Dolstra 13f4636436 hydra-evaluator: handle the case where there is no previous jobset eval 2012-03-12 21:13:28 +01:00
Eelco Dolstra a4cda5e337 Don't use the Switch module
It was removed in Perl 5.14.
2012-03-12 20:47:30 +01:00
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