Commit graph

57 commits

Author SHA1 Message Date
Eelco Dolstra fd463ff403
Remove nix-install-package support
'nix-install-package' no longer exists in Nix 1.12.

Closes #268.
2018-01-15 14:27:58 +01:00
Eelco Dolstra 62c6cca937
Make one-click installs work for binary cache stores
This requires setting binary_cache_public_uri in hydra.conf.
2017-10-18 14:09:28 +02:00
Eelco Dolstra bc60fccf78
Remove remaining references to store_mode etc. 2017-10-18 12:23:07 +02:00
Eelco Dolstra e7655fdcbc Fix latest-finished 2016-03-02 18:06:20 +01:00
Eelco Dolstra 8b4f90b0d4 .nixpkgs: Drop obsolete manifest URI 2016-03-02 15:24:23 +01:00
Eelco Dolstra b6d2c6f03a Further fix for the channel regression 2015-11-02 14:58:23 +01:00
aszlig 20b412224e ListBuilds: Fix legacy channel URLs.
Regression introduced by 1fdc258de0.

The commit introduced a channel/custom PathPart which uses the new
custom channel expressions, but I forgot to remove CaptureArgs, so the
URL really is channel/latest/ignored-value.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: Peter Simons <simons@cryp.to>
2015-11-02 14:51:42 +01:00
aszlig db0ef9e49b
Tie custom channels into channel-contents.tt.
We should now get an overview and help text on how to add a particular
channel and also a bit of information about the builds that are required
for a channel to get upgraded.

Right now we only select the latest successful build in the latest
successful evaluation, so if someone wants to have more information about
which channel has failed, (s)he still has to look at the "Channels" tab
of the jobset.

We can make this more fancy at some later point if this is really
needed, because right now we're only interested in the latest build,
because it's the only thing necessary to deliver the channel contents.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:39:55 +02:00
aszlig 1fdc258de0
ListBuilds: Simplify nix channel dispatcher.
We only allow channel/latest anyway, so it really doesn't make sense to
explicitly specify this in the PathPart and provide other dispatcher
once we have more than just "latest", which greatly simplifies the
dispatch tree.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:38:44 +02:00
Eelco Dolstra 66b8c1a9e0 Return 410 Gone (rather than 500) if an output is no longer available 2014-02-26 11:38:02 +01:00
Eelco Dolstra 0ec03aa0f4 Handle builds with multiple outputs correctly in Hydra channels 2013-10-07 17:06:17 +02:00
Eelco Dolstra c7a039bd05 Remove the Errors page
The same info is readily available under the most recent jobset eval
page.
2013-10-03 15:00:28 +02:00
Eelco Dolstra 64d617a6b2 Remove already disabled jobstatus code 2013-10-03 14:56:07 +02:00
Eelco Dolstra 58a6fdc5ed Remove the job status pages
They're mostly redundant since there is a faster "jobs" tab on
the jobset pages now.  The only thing the latter lacks is the
ability to see status change times, but those are quite expensive
to compute, and are visible on build pages if you really need them.
2013-08-28 17:40:51 +02:00
Eelco Dolstra bef263c930 Add a ‘latest-finished’ action
It redirects to the latest successful build from a finished
evaluation.  This is mostly useful for the Nixpkgs/NixOS mirroring
script, which need the latest finished evaluation in which some
aggregate job (such as ‘tested’ in NixOS) succeeded.
2013-08-12 22:17:04 +02:00
Eelco Dolstra 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
Shea Levy f231c23b75 Only serialize JSON and HTML, not the C::C::REST defaults
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-26 14:25:25 -04:00
Shea Levy 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 NixOS/hydra#98

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-02 14:00:46 -04:00
Eelco Dolstra 5e5b344527 Make latest/latest-for more efficient
Getting all matching rows from the database is expensive.
2013-05-23 12:18:38 -04:00
Eelco Dolstra 57b2bb0674 Let Builds.timestamp refer to the time the build was added
Previously, for scheduled builds, "timestamp" contained the time the
build was added to the queue, while for finished builds, it was the
time the build finished.  Now it's always the former.
2013-05-23 10:45:49 -04:00
Eelco Dolstra 85e3f69cdd Remove debug statement 2013-02-20 18:22:06 +01:00
Eelco Dolstra 4e67665b7f Builds page: Remove redundant tab titles 2013-02-14 13:23: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 67aefde62c Remove trailing whitespace 2013-01-22 14:41:02 +01:00
Eelco Dolstra aa28ffe3a8 Die tabs die 2013-01-22 14:09:37 +01:00
Eelco Dolstra aa8bf564e2 Set the Content-Type properly 2012-08-01 18:00:55 +00:00
Eelco Dolstra 13688e364f Add a binary-cache-url file to channels to advertise the binary cache URL 2012-08-01 16:31:25 +00:00
Eelco Dolstra 662cdf0421 Add support for viewing jobset evaluations 2012-04-02 16:11:22 +02:00
Eelco Dolstra 2d1cf73974 Speed up channel processing
In particular the /pkg action is now O(lg n) instead of O(n) in the
number of packages in the channel, and listing the channel contents
no longer requires calling isValidPath() on all packages.

Derivations (and thus build time dependencies) are no longer included
in the channel, because they're not GC roots.  Thus they could
disappear unexpectedly.
2012-03-12 20:47:30 +01:00
Eelco Dolstra 07b3dffd20 Reduce I/O in build listings by only fetching required columns
Columns such as "longDescription" can be large, so fetching them
when they're not needed is wasteful.
2012-03-12 20:47:30 +01:00
Eelco Dolstra 68a867da67 Merge the BuildResultInfo table into the Builds table 2012-03-12 20:47:29 +01:00
Eelco Dolstra c8d572a0dc Remove the "all" channel
The "all" channel fundamentally doesn't scale, because it needs
to fetch N builds from the database (where N is potentially a very
large number), then check whether they are still valid.  And it's
not very useful anyway.
2011-11-30 12:07:47 +01:00
Eelco Dolstra 69e9a91bcb Fix a huge performance regression in the jobstatus page
The renderBuildStatusIcon function was looking at the
resultInfo and schedulingInfo of each build, causing
a SQL query for every build in the result.
2011-11-29 19:55:49 +01:00
Rob Vermaas 822ca9c29e hydra: in jobstatus pages, allow maintainer query argument to show only the packages you are maintaining 2010-09-08 06:37:19 +00:00
Eelco Dolstra e35f0005e6 * Move NARs from the NixChannel controller to the Root controller and
drop the "/nix/store".  I.e. instead of

    http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest/nar/nix/store/99djmii6l4yw9gn07zxqabh8z58pp84c-libmspack-0.0.20040308alpha.drv 

  we now have

    http://hydra.nixos.org/nar/99djmii6l4yw9gn07zxqabh8z58pp84c-libmspack-0.0.20040308alpha.drv 

  The main reason is that this is much faster, since we don't need to
  get all the channel data (which isn't used anyway for NAR
  generation).  This speeds up downloading a NAR from the Nixpkgs
  channel by > 2 seconds.

* Drop "Hydra::View::" from view names to get rid of an ugly warning.
2010-06-22 12:00:19 +00:00
Eelco Dolstra 6dd53655a5 * Omitting the template name doesn't work everywhere. 2010-02-09 15:51:33 +00:00
Eelco Dolstra 6c35801173 * Shut up a harmless warning about an uninitialised variable. 2010-02-09 14:10:16 +00:00
Eelco Dolstra 9409d20f39 * Make the "all" page faster by not doing four identical `select
count(*) ...' queries.  The reason for this is that

    my $nrBuilds = scalar($c->stash->{allBuilds}->search({finished => 1}));

  doesn't return an integer, but some magical code reference that when
  evaluated performs the query and returns an integer.  So every use
  of $nrBuilds in all.tt caused another query.  OTOH using ...->count
  causes only one query.

  However count(*) still involves a full table scan, so it's still
  suboptimal.
2010-02-09 14:08:45 +00:00
Eelco Dolstra 045d921f7d * Argh. 2010-02-05 20:24:20 +00:00
Eelco Dolstra a22946abe7 * When a store path has disappeared for some reason,
../nix/<storepath> should return a HTTP error.  Otherwise,
  mirror-channel.pl will happily mirror the error page.
2010-02-05 20:08:41 +00:00
Rob Vermaas 67f468e0a3 - adapted ui for hydra, more in line with nixos.org website 2010-01-07 14:25:12 +00:00
Eelco Dolstra dd12113eb2 * Pass the page number in the URI query string. 2009-10-15 12:59:55 +00:00
Eelco Dolstra 16f2d003b2 * In the last succeeded / job status queries, use the Builds.isCurrent
column instead of Jobs.active.
2009-10-07 15:45:17 +00:00
Eelco Dolstra 05c7989c3e * Don't show platforms that are not included in the current jobset. 2009-10-02 17:11:28 +00:00
Eelco Dolstra b1289533e6 * More database hackery. 2009-07-09 15:26:55 +00:00
Eelco Dolstra fa364fa333 * PostgreSQL compatibility. 2009-07-09 15:08:39 +00:00
Eelco Dolstra 1aec78014d * In the job status and error pages, show when the status of a job
last changed.
2009-07-09 14:48:15 +00:00
Eelco Dolstra 469893cd4a * The "latest" channel shouldn't contain inactive jobs. 2009-04-25 11:41:46 +00:00
Eelco Dolstra d6bd9bab5f * Job status / error pages: show only active jobs. 2009-04-15 14:50:15 +00:00
Eelco Dolstra 28fde34b9c 2009-04-09 15:09:00 +00:00