Commit Graph

185 Commits

Author SHA1 Message Date
5a35912956 Add support for darcs repositories. 2013-09-07 13:28:51 +02:00
edb88ef452 Remove unused ActiveJobs source 2013-08-20 15:22:46 +02:00
1776d9118f Rename aggregate members to constituents 2013-08-15 02:33:10 +02:00
81322de94e Show aggregate members 2013-08-15 00:30:19 +02:00
d58142b3f0 Store aggregate members in the database
For presentation purposes, we need to know what builds are part of an
aggregate build.  So at evaluation time, look at the "members"
attribute, find the corresponding builds in the eval, and create a
mapping in the AggregateMembers table.
2013-08-14 01:59:29 +02:00
452c8e36d1 Materialize the number of finished builds
The NrBuilds table tracks the value of ‘select count(*) from Builds
where finished = 0’, keeping it up to date via a trigger.  This is
necessary to make the /all page fast, since otherwise it needs to do a
sequential scan on the Builds table.
2013-08-12 20:19:10 +02:00
002ac9ef63 Merge in the first bits of the API work
The catalyst-action-rest branch from shlevy/hydra was an exploration of
using Catalyst::Action::REST to create a JSON API for hydra. This commit
merges in the best bits from that experiment, with the goal that further
API endpoints can be added incrementally.

In addition to migrating more endpoints, there is potential for
improvement in what's already been done:
* The web interface can be updated to use the same non-GET endpoints as
  the JSON interface (using x-tunneled-method) instead of having a
  separate endpoint
* The web rendering should use the $c->stash->{resource} data structure
  where applicable rather than putting the same data in two places in
  the stash
* Which columns to render for each endpoint is a completely debatable
  question
* Hydra::Component::ToJSON should turn has_many relations that have
  strings as their primary keys into objects instead of arrays

Fixes 

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-02 14:00:46 -04:00
7b5e92868b Remove unused Jobs columns
Actually, we can *almost* get rid of the Jobs table entirely...
2013-05-23 12:12:19 -04:00
507e5bb190 Drop unused "disabled" columns 2013-05-03 16:39:17 +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
45a1bb9926 Remove unnecessary parentheses in SQL query
These make SQLite 3.7.16.2 crash.

http://hydra.nixos.org/build/4815315
2013-04-29 21:38:57 +02:00
fcd511c4de Revert "Remove now-unused SystemTypes table"
This reverts commit 71d020735b.
Unfortunately there are still some cases where we need to set Hydra's
concurrency separately.  (Ideally, Hydra would start *all* queued
builds in parallel and let Nix take care of everything...)
2013-03-05 17:42:16 +01:00
71d020735b Remove now-unused SystemTypes table 2013-03-04 17:46:37 -05:00
233e485a55 Remove the BuildMachines and BuildMachinesSystemTypes tables 2013-03-04 16:32:16 -05: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
edbe531ccc On build pages, provide a link to the build's first eval 2013-02-21 18:34:34 +01:00
d8370142c2 Remove garbage from Users.pm 2013-02-21 18:20:55 +01:00
1160e17bfc Add missing files
Doh!
2013-02-14 11:53:09 +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
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
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
794602d7ce Drop unused "tag" column
It was intended for CVS inputs but never used.
2012-04-15 12:42:46 +00: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
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
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
9032c55aa6 Keep track of the database schema version
The singleton table SchemaVersion contains the current version
of the Hydra database schema.  This can be used to upgrade the
schema on the fly.

Also reran the DBIx::Class schema loader.
2011-12-05 14:29:29 +01:00
2931689dcf * Ran update-dbix. 2011-02-09 10:19:36 +00:00
dcdbb1d814 hydra: store logfile/output path/closure size 2010-11-11 11:03:50 +00:00
398993f688 hydra: add some admin for adding/enabling/etc build machines 2010-10-13 12:32:57 +00:00
f6715fa0ef * Added a status page that shows all the currently executing build steps.
* Store the system type in the BuildSteps table.
* Don't query the queue size when serving static pages.  This prevents
  two unnecessary database queries per request.
2010-08-31 15:27:46 +00:00
2a69745a88 * Store the name of the machine that performed a build step in the
BuildSteps table.
2010-08-31 14:08:59 +00:00
9d9bf8b264 hydra: make nr of build to keep configurable per jobset 2010-08-10 06:48:45 +00:00
6d028a8d43 missing file 2010-07-27 16:24:21 +00:00
5f7ebaad37 added hide feature for project/jobset 2010-06-04 14:43:28 +00:00
b25761d7b2 hydra: added missing fields to query 2010-06-03 09:17:24 +00:00
bb7f82840b Hydra: Add support for maxSilent meta attribute (also already added timeout, but not implemented the actual timeout for the build yet) 2010-05-26 08:03:59 +00:00
7a79d17a36 added newsitems, added some admin options to clear various caches. 2010-04-27 13:29:08 +00:00
1c4585dae3 * hydra: project members can do stuff that the owner can do 2010-03-10 10:02:04 +00:00
70466156e6 * In views, support selecting a job that doesn't depend on the
primary job, but is in the same jobset.
2010-03-05 17:20:04 +00:00
7daca03e78 * Store jobset evaluations in the database explicitly. This includes
recording the builds that are part of a jobset evaluation.  We need
  this to be able to answer queries such as "return the latest NixOS
  ISO for which the installation test succeeded".  This wasn't previously
  possible because the database didn't record which builds of (say)
  the `isoMinimal' job and the `tests.installer.simple' job came from
  the same evaluation of the nixos:trunk jobset.

  Keeping a record of evaluations is also useful for logging purposes.
2010-03-05 15:41:10 +00:00
ba60d69e06 missing file 2010-02-26 07:38:54 +00:00
31f68756c5 fix wrong dbix:class:loader generation 2010-02-25 10:22:03 +00:00
4dccd3c620 generated schema with new dbix class schema loader, grrrrrr 2010-02-25 09:50:04 +00:00
12edc4b8e2 * Speed up the jobstatus query a little bit. 2010-02-12 20:51:24 +00:00
d8cc0bbb5d * Make the "latest succeeded" query (used by the "latest" channel)
faster, from about 4.5s to 1.0s for the global "latest" channel.
  Note that the query is only fast if the "IndexBuildsOnJob" and
  "IndexBuildsOnJobAndIsCurrent" indices are dropped - if they exist,
  PostgreSQL will use those instead of the more efficient
  "IndexBuildsOnJobFinishedId" index.  Looks like a bug in the planner
  to me...
2010-02-12 14:49:32 +00:00
68c60b4c66 * hydra: added index, actual build time (buildstep with same outpath, so without deps) of the build 2010-02-11 12:23:46 +00:00
61ad98f982 revert change to dbix::class generated code 2010-02-05 19:41:26 +00:00