Commit graph

651 commits

Author SHA1 Message Date
Eelco Dolstra 2dc9b9e32a Don't show "localhost" as machine for cached failed build steps 2015-09-11 14:12:07 +02:00
aszlig 99cbe06b0d
channel-contents: Fix display of last paragraph.
The last paragraph states about package installation of the "following"
jobs, but it only applies to generic channels, so let's only display it
there.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:39:55 +02: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 f1dd08afc8
build.tt: Fix reference to build.ischannel.
It's actually lower-case _despite_ the spelling in the SQL file(s),
because the schema auto-generator from DBIx::Class doesn't take it into
account because it's working on SQLite and the latter seems to ignore
case.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:39:55 +02:00
aszlig d1de12cac1
product-list: Handle channel along with "file".
We want to have contents and detauls of channel expressions as well and
we already have that in product.type == file, so why not reuse the same
for the channel expression?

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:38:45 +02:00
aszlig c9aadd8b7d
Jobset.pm: Factor out build->eval mapping.
We now have a searchBuildsAndEvalsForJobset, which creates such a
mapping for us, so we don't need to duplicate code in jobs_tab and
channels_tab.

Also, we're going to use this for the overview of a particular channel
as well, so it makes sense to put it in CatalystUtils instead of
directly in Jobset.pm.

Instead of eval->jobs, it's now eval->builds, because it's really an
aggregate over the builds schema, rather than the job schema.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:38:45 +02:00
aszlig ed361a0145
Build.pm: Don't get isChannel using buildproducts.
We now have a column for that, so no need for counting rows which was a
bit inefficient anyway, because we only would have needed the first row
in the result.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:38:44 +02:00
aszlig a235de3ad7
Make channels a product type instead of subtype.
Now we can provide different channel expressions for one particular
channel build. Not sure yet how this would be useful, but I found it
more appropriate to use a type instead of a subtype of "file".

This should get us consistent with the provious commit.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:12:13 +02:00
aszlig f6bb8afc30
Show build products on aggregates with channels.
This is to get a bit more consistency among channel builds but doesn't
do a radical change on the display. Ideally we may want to have a
channel overview with all the constituents and a small help showing how
the user can add the channel.

Unfortunately, this also introduces an inconsistency: We previously used
the *subtype* "channel", but now we're expecting "channel" as the type
of the product, so we need to change this for the channels overview as
well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:12:12 +02:00
aszlig 7b60aed5ed
jobset: Add a new "channels" tab.
It's very similar to "jobs" and the code is pretty much the same, except
that we don't do filtering on it. At least it doesn't waste space for a
filter option when there are usually WAY less channel jobs than ordinary
jobs.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:08:24 +02:00
aszlig 19e7114f0e
Add channel as a product type.
Currently I'm using a (not very well) downscaled version of the NixOS
logo, so we want to replace it by a proper image ASAP.

Other than that, the idea is to have something like this in
hydra-build-products:

file channel $out/channel.tar.bz2

Right now of course, it's only displayed at the corresponding builds, so
we might want to have aggregates on all channels for a project, jobset
or maybe even single jobs?

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:08:24 +02:00
Eelco Dolstra c1dd3fe4be Machine status page: Show disabled machines and some machine stats 2015-09-09 16:51:43 +02:00
Eelco Dolstra 08739a2a5a Allow bumping an entire evaluation to the front of the queue
This is mostly useful if we need to prioritize (say) a nixos-stable
eval that has some critical security bug fix.
2015-08-10 18:57:59 +02:00
Eelco Dolstra eb13007fe6 Allow build to be bumped to the front of the queue via the web interface
Builds now have a "Bump up" action. This will cause the queue runner
to prioritise the steps of the build above all other steps.
2015-08-10 16:19:47 +02:00
Eelco Dolstra 52ec971154 Don't render machine name if not applicable to step 2015-08-10 12:54:56 +02:00
Eelco Dolstra 90c462a222 Merge remote-tracking branch 'origin/master' into build-ng
Conflicts:
	hydra-module.nix
2015-08-04 14:30:22 +02:00
Eelco Dolstra 4d26546d3c Add support for tracking custom metrics
Builds can now emit metrics that Hydra will store in its database and
render as time series via flot charts. Typical applications are to
keep track of performance indicators, coverage percentages, artifact
sizes, and so on.

For example, a coverage build can emit the coverage percentage as
follows:

  echo "lineCoverage $pct %" > $out/nix-support/hydra-metrics

Graphs of all metrics for a job can be seen at

  http://.../job/<project>/<jobset>/<job>#tabs-charts

Specific metrics are also visible at

  http://.../job/<project>/<jobset>/<job>/metric/<metric>

The latter URL also allows getting the data in JSON format (e.g. via
"curl -H 'Accept: application/json'").
2015-07-31 00:57:30 +02:00
aszlig 36cbdd1bd8
common.tt: Properly generate URL for /api/scmdiff.
If Hydra isn't hosted on https://example.com/ but something like
https://example.com/hydra/, the URL for /api/scmdiff would have ended up
on /api/scmdiff rather than /hydra/api/scmdiff.

This is because we didn't use the URI resolver from the controller,
hence we're using it now to build up the whole URL including the query
string.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-07-22 12:00:15 +02:00
Eelco Dolstra 62b1b095ad Handle IP addresses as machine names 2015-07-21 01:54:24 +02:00
Rob Vermaas fbd48f5684 Make cloning of jobsets work again.
(cherry picked from commit 706551453800fb3a4bb3d8b681dad157a8cea98b)
2015-07-14 09:07:10 +00:00
Eelco Dolstra 5919e911db Don't show how long a machine has been idle
Without an index on (machine, stoptime desc), this requires a
sequential scan. And adding a whole index for this seems
overkill. (Possibly the queue runner could maintain this info more
efficiently.)
2015-07-10 15:41:57 +02:00
Eelco Dolstra b09f7e0989 Add page showing latest build steps 2015-07-10 15:41:57 +02:00
Eelco Dolstra dd4f6e695e Merge branch 'master' into build-ng 2015-07-06 17:17:51 +02:00
Eelco Dolstra ccf6e6062c Store full Mercurial revision hashes 2015-07-06 17:17:17 +02:00
Eelco Dolstra 309ef5baa9 Merge branch 'master' into build-ng 2015-07-06 15:57:09 +02:00
Eelco Dolstra b03de925cb Allow a jobset to be created from an evaluation
Fixes #150.
2015-07-06 15:56:20 +02:00
Eelco Dolstra ae52fc7f61 Remove display of queue runner log file (it no longer exists) 2015-07-02 00:18:33 +02:00
Eelco Dolstra 85a1ce99c9 Only include Persona JS when Persona is enabled 2015-07-01 14:24:18 +02:00
Eelco Dolstra 7e6135a8c6 Don't repeat links to build step logs
Hydra only stores the last log for a particular derivation, so only
show log links for the last one.
2015-06-30 00:27:31 +02:00
Eelco Dolstra 11be780948 Handle failure with output 2015-06-17 17:11:42 +02:00
Eelco Dolstra c6d504edbb Handle SSH hosts without a @ 2015-06-17 13:49:18 +02:00
Eelco Dolstra 745efce828 hydra-queue-runner: Implement timeouts
Also, keep track of timeouts in the database as a distinct build
status.
2015-06-17 13:32:33 +02:00
Eelco Dolstra b91a616520 Automatically retry aborted builds
Aborted builds are now put back on the runnable queue and retried
after a certain time interval (currently 60 seconds for the first
retry, then tripled on each subsequent retry).
2015-06-17 11:45:20 +02:00
Eelco Dolstra 508ab7f8a2 Tweak build steps 2015-06-15 15:48:05 +02:00
Eelco Dolstra 5019fceb20 Add a error type for "unsupported system type" 2015-06-15 15:07:04 +02:00
Eelco Dolstra 08633508da Fix colspan 2015-06-09 14:42:02 +02:00
Eelco Dolstra dc446c3980 Start of single-process hydra-queue-runner 2015-05-28 17:39:29 +02:00
Eelco Dolstra ff8cb93fe7 reproduce.tt: Wrap script to prevent problems piping into bash 2015-05-26 17:11:29 +02:00
Eelco Dolstra c32a244bd7 reproduce.tt: Add --print-flags option
Useful when scripting stuff (e.g. if you want to do a nix-instantiate
instead of a nix-build).
2015-05-26 16:36:08 +02:00
Eelco Dolstra f5ecb7a81a reproduce.tt: Use -I instead of $NIX_PATH 2015-05-26 16:07:00 +02:00
Eelco Dolstra b8a0956443 reproduce.tt: Add option to fetch but not build 2015-05-26 16:01:37 +02:00
Eelco Dolstra 91ecee0e5d Fix reproduce script 2015-05-26 15:54:38 +02:00
aszlig 7a48ad375a
plain-reload: Scroll down at document load.
When visiting the tail-reload page, for a short amount of time the
"unscrolled" version is shown. To circumvent that, let's scroll down
immediately at the first possibility to fill the gap between the loading
of the document and the first AJAX request coming in.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-03 00:00:27 +02:00
aszlig c251598241
plain-reload: Constrain tail output to 50 lines.
There are quite a lot of build outputs which have lines with a length
exceeding the width of the taillog <pre/> and thus visually produce more
lines than 50. This causes the tail "box" to change height frequently
and to get to the bottom you need to scroll down.

We now set a fixed line-height to 120% of the font size and cap the
maximum height based on that value (50 * 1.2 = 60). It's probably not
nice to override the line-height, but max-lines is currently only
available using browser-specific property names. But after all it's just
for the tail output, if people complain about the line-height, we can
still change it :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-02 17:29:48 +02:00
aszlig be051bcadc
plain-reload.tt: Properly escape tail content.
We're just implicitly escaping the tail content by not using .load() but
explicitly setting the text content using .text(), so that escaping
isn't needed on our side.

This should get rid of a few formatting errors and possibly XSS if
someone manages to place JS code in the tail of a build and manages to
lurk a user to that tail output.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-02 16:55:59 +02:00
Eelco Dolstra aec0a35114 Fix duplicate row-link 2015-03-24 14:31:27 +01:00
Rob Vermaas 125dd80dd8 Respect hideJobset in renderBuildListBody. 2015-03-24 08:38:40 +00:00
Rob Vermaas cad82493b0 Restore build and eval IDs. 2015-03-23 15:11:38 +00:00
Eelco Dolstra 522bcea8fc Hide build IDs from build lists
Like eval IDs, build IDs don't convey useful information.

Also, make the job name link to the build rather than the job. When
people click on a build, they expect to go to the build page, not the
job page.
2015-02-26 13:28:14 +01:00
Eelco Dolstra 62805dd73c Queue: Remove the scheduling priority
Scheduling is mostly based on jobset shares these days. So showing and
sorting by priority just wastes space and gives the incorrect
impression that Hydra executes builds in the order shown on the queue
page.
2015-02-26 13:16:25 +01:00
Eelco Dolstra 7f6faee08a Show some eval stats 2015-02-26 13:11:33 +01:00
Eelco Dolstra f835ae492f Likewise remove eval IDs from eval lists 2015-02-26 13:06:53 +01:00
Eelco Dolstra c04c8c2bf1 Jobset job tab: Show eval date rather than eval ID
Eval IDs carry no useful information, so it's better to show the date
of the eval. If the date is recent, a relative date is given (e.g. "3h
ago").
2015-02-26 13:01:01 +01:00
Eelco Dolstra fa1e043526 Make input value wider
Fixes #187.
2015-02-25 17:42:47 +01:00
Eelco Dolstra adc72d2409 Record which build a failed build step was propagated from 2015-02-25 16:42:32 +01:00
Eelco Dolstra 2f946bdfd7 Render machine correctly if it doesn't contain @ 2015-02-25 16:21:29 +01:00
Domen Kožar 8de15ce38d make sure status images always display for a list of builds 2014-12-03 13:54:22 +01:00
Eelco Dolstra 0d28e9372b Remove dead code 2014-11-19 14:59:36 +01:00
Rob Vermaas fd36d79581 Fix Changes section on build page. Now shows the changes of the first evaluation a build was part of compared to the previous one. Also separated previous builds from the changes section, as that was confusing sometimes. 2014-11-18 11:00:28 +01:00
Eelco Dolstra aad3a11eca Build page: Show output / closure sizes 2014-10-07 18:12:00 +02:00
Eelco Dolstra 83d4930101 Reorder 2014-10-07 17:16:41 +02:00
Eelco Dolstra 52ec8abf97 Update flot to 0.8.3 2014-10-07 13:35:31 +02:00
Eelco Dolstra dfe5325490 Scale the Y axis to the visible points 2014-10-07 13:10:10 +02:00
Eelco Dolstra 1b12daa032 Move the build time chart to the job page 2014-10-07 12:59:09 +02:00
Eelco Dolstra 0bb027e633 Move the store path size chart to the job page
The history is a property of the job, not individual builds.
2014-10-07 11:53:17 +02:00
Eelco Dolstra 5f474b252c Add a chart to the job pages showing the closure size over time 2014-10-07 11:23:15 +02:00
Eelco Dolstra 9b38b5f134 Remove the longDescription field
It's not useful and takes up a lot of space.
2014-09-30 15:44:09 +02:00
Eelco Dolstra beb94d5fb3 Machine status page: Add link to build step 2014-09-25 20:24:55 +02:00
Eelco Dolstra 2054759fdf Status page: Show running builds rather than build steps
The active build steps list was redundant, because the "Machine
status" page also shows them. So instead show active builds.
2014-09-25 20:17:33 +02:00
Eelco Dolstra 23a9fea26c Remove the ability to add multiple jobset input alternatives
Now each jobset input has exactly one value. (Actually, adding
multiple values was already broken, so all this does is clean up the
UI...)
2014-09-25 16:43:17 +02:00
Eelco Dolstra c28e7ac692 Fix XML wellformedness 2014-09-25 16:06:07 +02:00
Eelco Dolstra b04c8adbd5 build.tt: Show jobset eval inputs instead of build inputs
We're not recording build inputs anymore, so we now just show all
inputs of the build's first evaluation.
2014-09-25 14:49:09 +02:00
Eelco Dolstra 2ffceef875 Tweak 2014-08-17 23:54:12 +02:00
Eelco Dolstra 28b528c1ab Ensure proper escaping of /build/.../contents pages 2014-08-17 23:43:22 +02:00
Eelco Dolstra a2b27c7cf2 Preserve whitespace in string inputs 2014-08-13 17:25:08 +02:00
Eelco Dolstra affec8881d Remove support for views
They're replaced by aggregates, which are declarative, faster, and
have a better interface.
2014-04-23 23:22:44 +02:00
Eelco Dolstra be63c50560 Show whether a job still exists
In the dashboard and on the job page, indicate whether the job appears
in the latest jobset eval. That way, the user gets some indication if
a job has accidentally disappeared (e.g. due to an evaluation error).
2014-04-08 18:50:37 +02:00
Shea Levy d087aeb0d9 Fix adding jobset inputs 2014-03-06 08:22:59 -05:00
Shea Levy 024a5e7d75 edit-jobset.tt: Retain old inputs with dashes in their name
Fixes #149
2014-03-06 07:50:49 -05:00
Your Name 421950aede Use minutes in build history charts. 2014-02-28 09:16:45 +00:00
Eelco Dolstra 8dcef7702f Add jobset/job menus on buid log pages 2014-02-26 11:49:28 +01:00
Eelco Dolstra 73a0cb57c5 Jobset evals page: Don't show nrFailed if it's zero 2014-02-18 11:08:12 +01:00
Hydra d4d9896f9f Re-add the history tab (store size and build time), now as lazy-loaded tab on build page. 2014-01-28 11:55:19 +01:00
Eelco Dolstra 2398f2ce49 Spelling fix 2014-01-15 16:09:02 +01:00
Rob Vermaas 1d392f64c6 Fix typo. 2014-01-10 15:20:19 +01:00
Rob Vermaas bd7b6fc401 Allow Hydra to run as a private instance by requiring a login.
Use the following in your hydra.conf to make your instance a
private Hydra instance (public is the default):

  private 1

Currently, this will not allow you to use the API, channels
and the binary cache when running in private mode. We will add
solutions for these functionalities later.
2014-01-10 11:04:28 +01:00
Eelco Dolstra 7b35e4d0de Add a link to the latest finished eval of a jobset 2013-11-11 14:49:39 +01:00
Eelco Dolstra a0fdf8d2ba Use local copy of the Persona sign in button 2013-11-06 22:20:57 +01:00
Eelco Dolstra 60e7e4fbe9 Remove obsolete/broken timeline feature 2013-11-06 15:20:30 +01:00
Eelco Dolstra df1a33c63f Fix layout at all page sizes 2013-11-06 14:50:21 +01:00
Eelco Dolstra b44baf3746 Add a flag to enable Persona support
It's disabled by default.  To enable, add the following to hydra.conf:

  enable_persona = 1
2013-11-06 14:38:36 +01:00
Eelco Dolstra d118a575e1 Use page-header on the front page 2013-11-06 14:11:56 +01:00
Eelco Dolstra 8928c35ecd Slight layout tweak 2013-11-06 14:07:43 +01:00
Eelco Dolstra 63100b0ee8 Merge branch 'master' into persona 2013-11-06 12:35:36 +01:00
Eelco Dolstra 27a740d4b1 Don't show an empty projects list 2013-11-06 12:15:11 +01:00
Eelco Dolstra a0b58b6b62 Fix typo that caused empty news item to show up 2013-11-06 12:15:11 +01:00
aszlig cfd4843290 topbar: Include "Create project" in menu.
For users who only have the "create-projects" role, actually display the
item in the menu as the only option.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-11-05 17:03:31 +01:00
aszlig f6a83bcc5b user: Fix spelling of create-projects role.
This actually is right in the manual but displayed incorrectly on the
web interface.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-11-05 17:03:31 +01:00
Eelco Dolstra 8a0200edd2 Doh 2013-11-05 16:13:09 +01:00
Eelco Dolstra ae85d2df23 Add a "My jobsets" tab to the dashboard 2013-11-05 16:05:29 +01:00