Commit Graph

293 Commits

Author SHA1 Message Date
f762d111f1 If a build step fail, immediately fail all queued builds that depend on it
This prevents unnecessary work, but it's mostly a refactoring to
support combining notification emails.
2013-05-03 18:30:13 +02:00
507e5bb190 Drop unused "disabled" columns 2013-05-03 16:39:17 +02:00
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
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
adb9ad83dd hydra-evaluator: Respect triggers of disabled jobsets
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-02 11:32:25 -04:00
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
ccbe75781b hydra-queue-runner: don't clutter the system log with debug message
Avoid the frequently printed

  hydra-queue-runner[10293]: system type `x86_64-linux': 2 active, 2 allowed, starting 0 builds

message. That information is only interesting when some build are
actually started.
2013-04-11 10:56:40 +02:00
b8369a6a5f Put build status in front of the notification mail subject 2013-04-02 10:40:50 +02:00
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
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
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
5ffc925ae7 hydra-queue-{runner,evaluator}: don't clutter the system log with debug messages 2013-03-26 11:03:15 +01:00
152c392198 Whoops 2013-03-07 10:52:31 -05:00
6d131719be Respect SystemTypes if defined 2013-03-05 18:01:44 +01:00
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
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
f51b93da03 Remove debug line 2013-02-25 21:18:29 +01:00
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
ddcb9f1d5d Handle the case where a jobset has never been evaluated 2013-02-25 19:38:11 +00:00
24de044c55 hydra-evaluator: Always pick the jobset that hasn't been evaluated longest 2013-02-25 18:47:54 +01:00
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
ecdbce1a61 Handle active build steps of aborted builds properly 2013-01-22 23:01:29 +01:00
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
67aefde62c Remove trailing whitespace 2013-01-22 14:41:02 +01:00
f188fe5683 hydra-evaluator: Don't require $HYDRA_CONFIG 2013-01-22 13:19:28 +01:00
183078131a Capture the path to `guile', when available. 2012-10-17 16:25:49 +02:00
f27ae1d566 Add support for Guile & Guix. 2012-10-17 16:23:00 +02:00
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
2ab4c7d597 Update queryPathInfo calls 2012-07-18 23:14:45 +02:00
a2f56ce574 * Read logs using logContents function in stead of handling it everywhere separately. 2012-06-26 12:00:18 +02:00
b591c443b0 Keep builds of disabled jobsets that are not hidden. Fixes #18. 2012-05-11 09:11:07 +02:00
854513be8e I should test first 2012-04-30 17:57:13 +02:00
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
4a1a2203ac I should sleep... grmbl 2012-04-26 09:37:48 +02:00
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
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