Commit graph

603 commits

Author SHA1 Message Date
Eelco Dolstra 30823078c4 Merge branch 'custom-channels' of https://github.com/aszlig/hydra 2015-10-16 17:00:29 +02:00
Eelco Dolstra 8e8e31ce86 Re-implement log size limits
The old queue runner already had this. However, we now store "log
limit exceeded" as a separate status code in the database.
2015-10-06 17:35:08 +02:00
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