Commit graph

1869 commits

Author SHA1 Message Date
Eelco Dolstra 19b52e907f Add action to restart all failed builds in an eval 2015-10-28 15:04:12 +01:00
Eelco Dolstra b9ebd38edf Fix restarting builds
Failed paths were not cleared because the $builds query becomes empty
as soon as the "finished" flag has been cleared. So this needs to be
done last.
2015-10-28 14:54:54 +01:00
Eelco Dolstra bbe1fb2f9f Ignore non-existence of IndexBuildsOnFinishedBusy
Apparently for some reason not all Hydra installations had this
index. Another -1 for non-declarative schema definition languages.
2015-10-28 14:09:45 +01:00
Eelco Dolstra 4d1816b152 Remove obsolete Builds columns and provide accurate "Running builds"
This removes the "busy", "locker" and "logfile" columns, which are no
longer used by the queue runner. The "Running builds" page now only
shows builds that have an active build step.
2015-10-27 15:37:17 +01:00
Eelco Dolstra 9fb91460e3 Restart jobset evals efficiently
Fixes

  DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: stack depth limit exceeded
  HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate. [for Statement "UPDATE Builds SET busy = ?, finished = ?, iscachedbuild = ?, locker = ? WHERE ( ( id = ? OR id = ? OR ...
2015-10-27 13:43:19 +01:00
Eelco Dolstra 53c80d9526 getQueuedBuilds(): Periodically stop to handle priority bumps
Previously, priority bumps could take a long time to get noticed if
getQueuedBuilds() was busy processing zillions of queue
additions. (This was made worse by the reintroduction of substitute
checking.)
2015-10-22 17:00:46 +02:00
Eelco Dolstra 71bf7e02d5 Use nix::willBuildLocally() 2015-10-21 15:44:29 +02:00
Eelco Dolstra 30823078c4 Merge branch 'custom-channels' of https://github.com/aszlig/hydra 2015-10-16 17:00:29 +02:00
Eelco Dolstra 4759323514 Tweak 2015-10-16 16:59:07 +02:00
dantheho 8ecd84c160 Fix schema update for schedulingShares 2015-10-16 16:58:37 +02:00
aszlig 92e85f05e2
hydra.sql: Make isChannel a not null column.
We have this set in upgrade-42.sql, so it's better to stay consistent
with the basic SQL file to avoid problems with new Hydra installations.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: Eelco Dolstra <eelco.dolstra@logicblox.com>
2015-10-14 21:37:30 +02:00
Eelco Dolstra 1a92f971d4 Restart: Clear failed dependencies 2015-10-09 15:39:41 +02:00
Eelco Dolstra 3fa3e6414c Fix "Use of uninitialized value $mode" 2015-10-09 15:06:57 +02:00
Eelco Dolstra ca58e97691 Prevent inputs from being garbage collected during evaluation
There is still a tiny window between the calls to nix-prefetch-* and
addTempRoot. This could be eliminated by adding a "-o" option to
nix-prefetch-*, or by not using those scripts at all (and use
addToStore directly).
2015-10-09 12:50:23 +02:00
Eelco Dolstra d959afebe1 Store unset descriptions etc. as nulls 2015-10-08 12:37:56 +02:00
Eelco Dolstra 4b31b23c04 Handle attrsets in meta.license (i.e. lib.licenses) 2015-10-08 11:56:30 +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 82504fe010 hydra-queue-runner: Use substitutes
This allows Hydra to use binaries from available binary caches. It
makes the queue monitor thread quite a bit slower, so if you don't
want to use binary caches, it's better to add "--option
build-use-substitutes false" to the hydra-queue-runner invocation.

Fixed #243.
2015-10-05 14:57:44 +02:00
Eelco Dolstra ae2cc61be6 Fix hydra.queue.machines.total stat
This was broken by the fact that "machines" now also contains
removed/disabled machines.
2015-09-22 12:59:19 +02:00
Eelco Dolstra f8141fdc98 Set propagatedFrom for cached failed build steps 2015-09-11 15:55:26 +02:00
Eelco Dolstra 2dc9b9e32a Don't show "localhost" as machine for cached failed build steps 2015-09-11 14:12:07 +02:00
Eelco Dolstra aea1ed7445 hydra-evaluator: Fix error handling in fetching inputs
This caused bogus "cannot find the input containing the job
expression" errors.
2015-09-11 13:49:46 +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 8b4f51f657
Channel.pm: Actually deliver channel expressions.
So this is the final part which is needed in order to be able to deliver
custom channels, everything else is now just polishing.

We do this by simply redirecting to the build product download URL and
we use binary_cache_url the same way as in NixChannel.pm.

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 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
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 ba7402ed6c
Jobset.pm: Don't show channels in "Jobs" tab.
Now that we have our dedicated "Channels" tab, there is no need anymore
to show redundant information.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:36:38 +02:00
aszlig 8f7486cd9c
Jobset.pm: Detect channels by isChannel attribute.
We now no longer need that additional join of the build outputs and can
solely use the isChannel column of the Builds table to determine whether
it's a channel build.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:36:38 +02:00
aszlig 06b76ab275
Add isChannel column and meta attribute.
This is to properly separate channels from regular jobs and also make
sure that we can always iterate on them, no matter whether the build has
failed. The reason why we were not able to do this until now was because
we were iterating on the build products, and whenever some constituent
of a channel job has failed, we didn't get a build output.

So whenever there is a meta.isHydraChannel, we can now properly
distinguish it from the other jobs.

I still don't have any clue, why "make -C src/sql update-dbix" without
*any* modifications tries to create additional schema definitions. But
I've checked the md5sums of the existing schema definitions and they
don't seem to match, so it seems that they already have been tampered
with.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-10 17:36:38 +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 6075ac6fed Remove localhost hack 2015-09-09 16:50:59 +02:00
Eelco Dolstra ee9bf7ace7 Account steps with preferLocalBuild as a separate system type
They will show up in machineTypes as (e.g.) x86_64-linux:local instead
of x86_64-linux. This is to prevent the Hydra provisioner from
creating machines for steps that are supposed to be executed locally.
2015-09-02 13:42:25 +02:00
Eelco Dolstra 7e954aff03 Keep machine stats even when a machine is removed from the machines file
This is important for the Hydra provisioner, since it needs to be able
to see whether a disabled machine still has jobs running on it.
2015-09-02 13:31:47 +02:00
Eelco Dolstra 2d116d758a Return JSON for /eval 2015-09-02 13:13:55 +02:00
Eelco Dolstra 4f018b0612 Include the eval IDs in the JSON /build result 2015-09-02 12:57:58 +02:00
Eelco Dolstra 2b9bf7526d hydra-send-stats: Keep track of the number of machines 2015-08-27 12:05:06 +02:00
Eelco Dolstra 2a7fbd57cc Allow the machines file to specify host public keys
It's easier for the Hydra provisioner to put host public keys in the
machines file than to separately manage the known_hosts file
(especially when the provisioner runs on a different machine).
2015-08-26 13:43:02 +02:00
Eelco Dolstra 88d7eb5247 Remove double entry for localhost on machines status page 2015-08-26 13:01:45 +02:00
Eelco Dolstra 7aa52517e9 Support multiple machines files
This is primarily useful for the Hydra provisioner, which can write
its machines to another file than /etc/nix/machines.
2015-08-25 15:34:53 +02:00
Eelco Dolstra 7a654259ff Wake the dispatcher when the machines file has changed 2015-08-17 15:48:10 +02:00
Eelco Dolstra 092d60735b Keep track of wait time per system type
I.e., how much time the currently runnable steps per system type have
been waiting. This is useful for deciding whether to provision more
machines.
2015-08-17 15:45:44 +02:00
Eelco Dolstra 99bfc37764 Don't abort steps that have an unsupported system type
This is necessary because the required system type can become
available later (e.g. by being provisioned by the
auto-scaler). However, in the future, we may want to fail steps if
they have been unsupported for more than a certain amount of time.
2015-08-17 15:10:41 +02:00
Eelco Dolstra ea1eb2e3fb Keep track of requiredSystemFeatures in the machine stats
For example, steps that require the "kvm" feature may require a
different kind of machine to be provisioned. This can also be used to
require performance-sensitive tests to run on a particular kind of
machine, e.g., by setting requiredSystemFeatures to something like
"ec2-i2.8xlarge".
2015-08-17 14:37:57 +02:00
Eelco Dolstra a6e3cb53b9 Use /usr/bin/env to find perl
This is nicer in nix-shell.
2015-08-17 14:18:20 +02:00
Eelco Dolstra d571e44b86 Keep stats for the Hydra auto scaler
"hydra-queue-runner --status" now prints how many runnable and running
build steps exist for each machine type. This allows additional
machines to be provisioned based on the Hydra load.
2015-08-17 13:50:41 +02:00
Eelco Dolstra b0c8eecd37 Merge branch 'build-ng' 2015-08-12 20:32:48 +02:00
Eelco Dolstra 62cd9d18b6 Check for a valid number of shares 2015-08-12 15:36:55 +02:00
Eelco Dolstra 006d105f93 Fix syntax error 2015-08-12 14:53:34 +02:00
Eelco Dolstra d4759c1da2 hydra-queue-runner: Detect changes to the scheduling shares 2015-08-12 13:17:56 +02:00
Eelco Dolstra 2e3899ed27 Don't set Expires header for logs of unfinished builds/steps 2015-08-12 12:22:14 +02:00
Eelco Dolstra 576dc0c120 For completeness, re-implement meta.schedulingPriority 2015-08-12 12:05:43 +02:00
Eelco Dolstra b7965df928 Load the queue in order of global priority 2015-08-11 02:14:34 +02:00
Eelco Dolstra 97f11baa8d Revive jobset scheduling
(I.e. taking the jobset scheduling share into account.)
2015-08-11 01:31:56 +02:00
Shea Levy 1705ca41e7 Remove unneeded camelcase 2015-08-10 13:59:22 -04:00
Shea Levy 163e696813 Copy-paste error 2015-08-10 13:52:40 -04:00
Shea Levy 882b6b3377 Pass a build's drv path as a store path 2015-08-10 13:48:09 -04:00
Shea Levy ce5ffa9fba Only pass the drv path if it is still valid 2015-08-10 13:47:39 -04: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 27182c7c1d Start steps in order of ascending build ID 2015-08-10 16:19:47 +02:00
Shea Levy 2a240e458e Pass along drvPath and outputName for inputs that are previous builds.
This allows importing the .drv and getting the same store paths as if the
input had been passed in as nix expressions defining a proper derivation.
2015-08-10 08:02:10 -04:00
Eelco Dolstra 52ec971154 Don't render machine name if not applicable to step 2015-08-10 12:54:56 +02:00
Eelco Dolstra 593850b956 Fix potential race in dispatcher wakeup 2015-08-10 12:54:55 +02:00
Eelco Dolstra 6a1c950e94 Unindent 2015-08-10 11:33:22 +02:00
Eelco Dolstra f21b88e388 Remove superfluous check 2015-08-07 04:20:34 +02:00
Eelco Dolstra f1fbf8c605 Fix race in finishing builds that have been cancelled 2015-08-07 04:18:48 +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
Shea Levy 7b7f189b3e Whoops, misread signature 2015-08-04 08:12:24 -04:00
Shea Levy a5b986cf33 Only pass the first value of each input in the inputs argument
Multiple alts are on their way out
2015-08-04 08:10:47 -04:00
Shea Levy 4d967dd17a hydra-eval-jobs: Pass all inputs as 'inputs' arg.
If there is no input named 'inputs', hydra-eval-jobs now passes in a set
of lists, where each attribute corresponds to an input defined in the
jobset specification and each list element is a different input alt, as
an argument named 'inputs'.

Among other things, this allows for generic hydra expressions to be
shared amongst projects with similar structures but different sets of
specific inputs.
2015-08-04 07:54:24 -04:00
Shea Levy d450d08929 buildInputToString: Use inputType attribute instead of type attribute 2015-08-04 06:50:04 -04:00
Eelco Dolstra 6f04299411 Allow downloading file by filename
For instance, instead of

  http://.../build/3770911/download/4/source.tar.gz

you can get

  http://.../build/3770911/download/source.tar.gz

This is useful when file names are constant across builds but product
numbers are not.
2015-07-31 17:50:22 +02:00
Shea Levy 07634e8862 buildInputToString: Pass along the input's type and urr 2015-07-31 09:47:44 -04:00
Eelco Dolstra ff3f5eb4d8 Fix remote building on Nix 1.10 2015-07-31 03:41:55 +02:00
Eelco Dolstra 5b9a288123 Workaround for RemoteStore not supporting cmdBuildDerivation yet 2015-07-31 03:39:20 +02:00
Eelco Dolstra 706746d4bf Fix build 2015-07-31 01:45:16 +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
Eelco Dolstra 9afaf322b3 Use latest DBIx::Class::Schema::Loader 2015-07-30 16:55:11 +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 c18fb0ad74 Temporarily disable machines after a connection failure 2015-07-21 15:58:47 +02:00
Eelco Dolstra 7e026d35f7 Split hydra-queue-runner.cc more 2015-07-21 15:14:17 +02:00
Eelco Dolstra 5370be9f52 hydra-queue-runner: Use cmdBuildDerivation
See 1511aa9f48 and eda2f36c2a.
2015-07-21 01:54:24 +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 3ded87329d Keep track of how many threads are waiting 2015-07-10 19:10:14 +02:00
Eelco Dolstra 06d75699a7 Fix restarting a build 2015-07-10 16:56:53 +02:00
Eelco Dolstra 7f865a30d5 hydra-evaluator: Fix input change check
Because inputs were processed in random order by inputsToArgs, the
inputs hash could be different every time, leading to unnecessary
re-evaluations.
2015-07-10 16:44:06 +02:00
Eelco Dolstra 3e7bbec40b hydra-evaluator: Send statistics to statsd 2015-07-10 16:40:50 +02: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 3bb9e17e5c IndexJobsetEvalsOnJobsetId: Only index jobsets with new builds 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 0da08df4eb Stream logs if possible and remove size limit 2015-07-08 19:05:17 +02:00
Eelco Dolstra d8acaf2181 Index BuildSteps on propagatedFrom
This significantly speeds up deleting Builds, since it removes the
need for a sequential scan on BuildSteps.
2015-07-08 12:12:44 +02:00
Eelco Dolstra bbee81efae Use triggers for all notifications on Builds table changes 2015-07-08 12:05:32 +02:00
Eelco Dolstra 89fb723ace Notify the queue runner when a build is deleted 2015-07-08 11:43:35 +02:00
Eelco Dolstra 95c4294560 Allow cancelling builds marked as busy
Note that if there are active build *steps*, this won't cancel them.
2015-07-07 14:08:46 +02:00
Eelco Dolstra 35b7c4f82b Allow only 1 thread to send a closure to a given machine at the same time
This prevents a race where multiple threads see that machine X is
missing path P, and start sending it concurrently. Nix handles this
correctly, but it's still wasteful (especially for the case where P ==
GHC).

A more refined scheme would be to have per machine, per path locks.
2015-07-07 14:06:48 +02:00
Eelco Dolstra 16696a4aee Namespace cleanup 2015-07-07 10:29:43 +02:00
Eelco Dolstra 63745b8e25 Move buildRemote() into State 2015-07-07 10:25:33 +02:00
Eelco Dolstra df29527531 Refactor 2015-07-07 10:17:21 +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 b85e9ef1cd Support using Git revisions as branch names 2015-07-06 15:56:24 +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 dffb629b8a Unify Hydra's NixOS module with the one used for hydra.nixos.org
In particular, the queue runner and web server now run under different
UIDs.
2015-07-02 01:01:44 +02:00
Eelco Dolstra 3e0f5f664a GitInput plugin: Don't clone during getCommits
This doesn't work if hydra-queue-runner has no write access to the scm
directory, and in any case races with the evaluator.
2015-07-02 00:44:40 +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 e35b704d80 Drop the 5 minute minimum interval between triggered evals 2015-07-01 14:45:39 +02:00
Eelco Dolstra 85a1ce99c9 Only include Persona JS when Persona is enabled 2015-07-01 14:24:18 +02:00
Eelco Dolstra 3c665dac82 Remove superfluous HYDRA_LOGO environment variable 2015-07-01 11:34:19 +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 2ece42b2b9 Support preferLocalBuild
Derivations with "preferLocalBuild = true" can now be executed on
specific machines (typically localhost) by setting the mandary system
features field to include "local". For example:

  localhost x86_64-linux,i686-linux - 10 100 - local

says that "localhost" can *only* do builds with "preferLocalBuild =
true". The speed factor of 100 will make the machine almost always win
over other machines.
2015-06-30 00:20:19 +02:00
Eelco Dolstra 008d610467 getQueuedBuilds(): Don't catch errors while loading a build from the queue
Otherwise we never recover from reset daemon connections, e.g.

  hydra-queue-runner[16106]: while loading build 599369: cannot start daemon worker: reading from file: Connection reset by peer
  hydra-queue-runner[16106]: while loading build 599236: writing to file: Broken pipe
  ...

The error is now handled queueMonitor(), causing the next call to
queueMonitorLoop() to create a new connection.
2015-06-26 21:06:35 +02:00
Eelco Dolstra f5e5a1b96e Don't wake up the queue runner for cached evals 2015-06-26 20:59:14 +02:00
Eelco Dolstra 401f5bdce2 Add a unit for hydra-send-stats 2015-06-26 15:24:12 +02:00
Eelco Dolstra 9a041f9a36 Restart builds failed due to unsupported system type 2015-06-26 11:28:38 +02:00
Eelco Dolstra 2f4676bd97 JSONObject doesn't handle 64-bit integers 2015-06-25 16:59:48 +02:00
Eelco Dolstra c54a04688e Fix email sender address when notification_sender is not set 2015-06-25 16:49:01 +02:00
Eelco Dolstra c6fcce3b3b Moar stats 2015-06-25 16:47:39 +02:00
Eelco Dolstra 18a3c3ff1c Update "make check" for the new queue runner
Also, if the machines file contains an entry for localhost, then run
"nix-store --serve" directly, without going through SSH.
2015-06-25 16:47:39 +02:00
Eelco Dolstra 32210905d8 Automatically reload $NIX_REMOTE_SYSTEMS when it changes
Otherwise, you'd have to restart the queue runner to add or remove
machines.
2015-06-25 16:47:25 +02:00
Eelco Dolstra 1a0e1eb5a0 More stats 2015-06-24 13:19:27 +02:00
Eelco Dolstra 3f8891b6ff Fix incorrect debug message 2015-06-23 17:53:15 +02:00
Eelco Dolstra 62219adaf3 Send queue runner stats to statsd
This is currently done by a separate program that periodically
calls "hydra-queue-runner --status". Eventually, I'll do this
in the queue runner directly.

Fixes #220.
2015-06-23 14:56:43 +02:00
Eelco Dolstra af5cbe97aa createStep(): Cache finished derivations
This gets rid of a lot of redundant calls to readDerivation().
2015-06-23 03:25:31 +02:00
Eelco Dolstra 681f63a382 Typo 2015-06-23 02:15:11 +02:00
Eelco Dolstra 524ee295e0 Fix sending notifications in the successful case 2015-06-23 02:13:06 +02:00
Eelco Dolstra 4db7c51b5c Rate-limit the number of threads copying closures at the same time
Having a hundred threads doing I/O at the same time is bad on magnetic
disks because of the excessive disk seeks. So allow only 4 threads to
copy closures in parallel.
2015-06-23 01:49:14 +02:00
Eelco Dolstra a317d24b29 hydra-queue-runner: Send build notifications
Since our notification plugins are written in Perl, sending
notification from C++ requires a small Perl helper named
‘hydra-notify’.
2015-06-23 00:14:49 +02:00
Eelco Dolstra 5312e1209b Keep per-machine stats 2015-06-22 17:11:17 +02:00
Eelco Dolstra d06366e7cf Remove obsolete comment 2015-06-22 16:59:50 +02:00
Eelco Dolstra e069ee960e Doh 2015-06-22 16:58:40 +02:00
Eelco Dolstra e32ee3d5b9 Remove hydra-build and the old hydra-queue-runner 2015-06-22 15:43:15 +02:00
Eelco Dolstra 41ba7418e2 hydra-queue-runner: More stats 2015-06-22 15:34:33 +02:00
Eelco Dolstra 62b53a0a47 Guard against concurrent invocations of hydra-queue-runner 2015-06-22 14:24:03 +02:00
Eelco Dolstra fbd7c02217 Periodically dump/log status 2015-06-22 14:15:43 +02:00
Eelco Dolstra 4f4141e1db Add command ‘hydra-queue-runner --status’ to show current status 2015-06-22 14:06:44 +02:00
Eelco Dolstra 44a2b74f5a Keep track of the number of build steps that are being built
(As opposed to being in the closure copying stage.)
2015-06-22 11:23:00 +02:00
Eelco Dolstra fed71d3fe9 Move "created" field into Step::State 2015-06-22 11:07:52 +02:00
Eelco Dolstra 90a08db241 hydra-queue-runner: Fix assertion failure 2015-06-22 10:59:07 +02:00
Eelco Dolstra d744362e4a hydra-queue-runner: Fix segfault sorting machines by load
While sorting machines by load, the load of a machine
(machine->currentJobs) can be changed by other threads. If that
happens, the comparator is no longer a proper ordering, in which case
std::sort() can segfault. So we now make a copy of currentJobs before
sorting.
2015-06-21 16:21:42 +02:00