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
Eelco Dolstra
a0eff6fc15
Fix machine selection
2015-06-19 17:45:26 +02:00
Eelco Dolstra
81abb6e166
Improve parsing of hydra-build-products
2015-06-19 17:20:20 +02:00
Eelco Dolstra
e13477bdf2
Robustness
2015-06-19 16:35:49 +02:00
Eelco Dolstra
f196967c43
Don't create a propagated build step to the same build
2015-06-19 15:33:37 +02:00
Eelco Dolstra
7afc61691b
Doh
2015-06-19 15:27:49 +02:00
Eelco Dolstra
133d298e26
Asynchronously compress build logs
2015-06-19 15:06:12 +02:00
Eelco Dolstra
8e408048e2
Create build step for non-top-level cached failures
...
This fixes the missing build step on failures like
http://hydra.nixos.org/build/23222231
2015-06-19 11:33:15 +02:00
Eelco Dolstra
77c8bfd392
Improve logging for aborts
2015-06-19 10:37:22 +02:00
Eelco Dolstra
8db1ae2855
Less verbosity
2015-06-18 17:43:13 +02:00
Eelco Dolstra
89b629eeb1
Fix finishing steps that are not top-level of any build
2015-06-18 17:37:35 +02:00
Eelco Dolstra
9cdbff2fdf
Handle concurrent finishing of the same build
...
There is a slight possibility that the queue monitor and a builder
thread simultaneously decide to mark a build as finished. That's fine,
as long as we ensure the DB update is idempotent (as ensured by doing
"update Builds set finished = 1 ... where finished = 0").
2015-06-18 17:12:51 +02:00
Eelco Dolstra
948473c909
Fix race between the queue monitor and the builder threads
2015-06-18 16:30:28 +02:00
Eelco Dolstra
9c03b11ca8
Simplify retry handling
2015-06-18 14:51:50 +02:00
Eelco Dolstra
e039f5f840
Create failed build steps for cached failures
2015-06-18 04:35:37 +02:00
Eelco Dolstra
92ea800cfb
Set finishedInDB in a few more places
2015-06-18 04:19:21 +02:00
Eelco Dolstra
47367451c7
hydra-queue-runner: Set isCachedBuild
2015-06-18 03:28:58 +02:00
Eelco Dolstra
8257812d0a
Acquire exclusive table lock earlier
2015-06-18 02:44:29 +02:00
Eelco Dolstra
69be3cfe93
hydra-queue-runner: Handle status queries on the main thread
...
Doing it on the queue monitor thread was problematic because
processing the queue can take a while.
2015-06-18 01:57:01 +02:00
Eelco Dolstra
a40ca6b76e
hydra-queue-runner: Improve dispatcher
...
We now take the machine speed factor into account, just like
build-remote.pl.
2015-06-18 01:52:20 +02:00
Eelco Dolstra
3855131185
hydra-queue-runner: Improve SSH flags
2015-06-18 00:50:48 +02:00
Eelco Dolstra
f57d0b0c54
hydra-queue-runner: Maintain count of active build steps
2015-06-18 00:24:56 +02:00
Eelco Dolstra
59dae60558
hydra-queue-runner: More stats
2015-06-17 22:38:12 +02:00
Eelco Dolstra
ec8e8edc86
hydra-queue-runner: Handle $HYDRA_DBI
2015-06-17 22:11:01 +02:00
Eelco Dolstra
4d9c74335d
Add forgotten file
2015-06-17 21:39:28 +02:00
Eelco Dolstra
ce9e859a9c
hydra-queue-runner: Implement --unlock
2015-06-17 21:35:20 +02:00
Eelco Dolstra
ca48818b30
Fix remote building
2015-06-17 17:28:59 +02:00
Eelco Dolstra
11be780948
Handle failure with output
2015-06-17 17:11:42 +02:00
Eelco Dolstra
b1a75c7f63
getQueuedBuilds(): Handle dependent builds first
...
If a build A depends on a derivation that is the top-level derivation
of some build B, then we should process B before A (meaning we
shouldn't make the derivation runnable before B has been
added). Otherwise, the derivation will be "accounted" to A rather than
B (so the build step will show up in the wrong build).
2015-06-17 14:46:02 +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
2da4987bc2
Don't lock the CPU
2015-06-17 11:48:38 +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
e02654b3a0
Prefer cached failure over unsupported system type
2015-06-16 18:00:39 +02:00
Eelco Dolstra
a984c0badc
Merge branch 'master' into build-ng
2015-06-15 18:21:07 +02:00
Eelco Dolstra
42e7301c08
Add status dump facility
...
Doing
$ psql hydra -c 'notify dump_status'
will cause hydra-queue-runner to dump some internal status info on
stderr.
2015-06-15 18:20:14 +02:00
Eelco Dolstra
dd104f14ea
Make the queue monitor more robust, and better debug output
2015-06-15 16:54:52 +02:00
Eelco Dolstra
147eb4fd15
Support requiredSystemFeatures
2015-06-15 16:33:50 +02:00
Eelco Dolstra
508ab7f8a2
Tweak build steps
2015-06-15 15:48:05 +02:00
Eelco Dolstra
21aaa0596b
Fail builds with previously failed steps early
2015-06-15 15:31:42 +02:00
Eelco Dolstra
c00bf7cd1a
Check non-runnable steps for unsupported system type
2015-06-15 15:13:03 +02:00
Eelco Dolstra
5019fceb20
Add a error type for "unsupported system type"
2015-06-15 15:07:04 +02:00
Eelco Dolstra
541fbd62cc
Immediately abort builds that require an unsupported system type
2015-06-15 14:51:49 +02:00
Eelco Dolstra
f9cd5adae8
Queue monitor: Get only the fields we need
2015-06-11 18:09:50 +02:00
Eelco Dolstra
c974fb893b
Support cancelling builds
2015-06-11 18:07:45 +02:00
Eelco Dolstra
c08883966c
Use PostgreSQL notifications for queue events
...
Hydra-queue-runner now no longer polls the queue periodically, but
instead sleeps until it receives a notification from PostgreSQL about
a change to the queue (build added, build cancelled or build
restarted).
Also, for the "build added" case, we now only check for builds with an
ID greater than the previous greatest ID. This is much more efficient
if the queue is large.
2015-06-11 17:41:59 +02:00
Eelco Dolstra
672bbb1c67
hydra-update-gc-roots: Get Builds and BuildOutputs in the same query
...
This greatly reduces the number of roundtrips to the database.
2015-06-11 14:10:21 +02:00
Eelco Dolstra
9989a90e99
Keep the most recent successful build of current jobs
...
Fixes #140 .
2015-06-11 14:10:21 +02:00
Eelco Dolstra
d72a88b562
Don't try to handle SIGINT
...
It just makes things unnecessarily complicated. We can just exit
without cleaning anything up, since the only thing to do is unmark
builds and build steps as busy. But we can do that by having systemd
call "hydra-queue-runner --unlock" from ExecStopPost.
2015-06-10 15:55:46 +02:00
Eelco Dolstra
a4fb93c119
Lock builds for a shorter amount of time
2015-06-10 15:36:21 +02:00
Eelco Dolstra
6d738a31bf
Keep track of failed paths in the Hydra database
...
I.e. don't use Nix's failed paths feature anymore. Easier to keep
everything in one place.
2015-06-10 14:57:16 +02:00
Eelco Dolstra
c68036f8b0
Pass ssh key
2015-06-10 14:57:07 +02:00
Eelco Dolstra
7dd1f0097e
Finish copyClosure
2015-06-09 16:03:41 +02:00
Eelco Dolstra
c93aa92563
Create BuildSteps race-free
...
If multiple threads create a step for the same build, they could get
the same "max(stepnr)" and allocate conflicting new step numbers. So
lock the BuildSteps table while doing this. We could use a different
isolation level, but this is easier.
2015-06-09 15:03:20 +02:00
Eelco Dolstra
61d4060522
Record the machine used for a build step
2015-06-09 14:57:49 +02:00
Eelco Dolstra
08633508da
Fix colspan
2015-06-09 14:42:02 +02:00
Eelco Dolstra
ca1fbdd058
Mark builds as busy
2015-06-09 14:31:43 +02:00
Eelco Dolstra
8b12ac1f6d
Basic remote building
...
This removes the need for Nix's build-remote.pl.
Build logs are now written to $HYDRA_DATA/build-logs because
hydra-queue-runner doesn't have write permission to /nix/var/log.
2015-06-09 14:21:21 +02:00
Eelco Dolstra
3a6cb2f270
Implement a database connection pool
2015-05-29 20:55:13 +02:00
Eelco Dolstra
214b95706c
On SIGINT, shut down the builder threads
...
Note that they don't get interrupted at the moment (so on SIGINT, any
running builds will need to finish first).
2015-05-29 20:02:15 +02:00
Eelco Dolstra
e778821940
Make concurrency more robust
2015-05-29 17:14:20 +02:00
Eelco Dolstra
8640e30787
Very basic multi-threaded queue runner
2015-05-29 01:31:12 +02:00
Eelco Dolstra
604fdb908f
Pass null values to libpqxx properly
2015-05-28 19:06:17 +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
Eelco Dolstra
1ab0f96079
Rename c -> hydra-eval-jobs
2015-05-26 13:58:01 +02:00
Eelco Dolstra
e003665146
Split timeSpent query into 2 separate queries, as postgresql isn't able to figure out a decent query plan. With 120k jobs in queue, this makes some queries go from 100s to 1-2s.
2015-05-01 12:28:29 +02:00
Eelco Dolstra
d9ab964203
UTF-8 fix
2015-04-14 15:20:56 +02:00
Eelco Dolstra
01cd6397cb
Better error message
2015-04-14 15:16:24 +02:00
Eelco Dolstra
5a61aefe4f
Use Nix's restricted evaluation mode
2015-04-14 15:16:00 +02:00
Eelco Dolstra
5d8a563e90
Merge pull request #204 from aszlig/tail-improvements
...
Improvements of tail-reload output
2015-04-14 12:44:36 +02:00
Eelco Dolstra
63306aaf5a
hydra-evaluator: Add some debug code
2015-04-09 17:35:04 +02:00
Eelco Dolstra
a2dc92d871
Die tabs die
2015-04-09 17:22:10 +02:00
Eelco Dolstra
9e664cf8b0
Fix not-null constraint violation inserting build step
...
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: null value in column "machine" violates not-null constraint
2015-04-07 13:34:00 +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
Rob Vermaas
91e7e6f6ab
Use DAG range to determine commits between mercurial revisions. Previously it would show also commits in other branches.
2015-03-23 13:52:06 +00:00
Eelco Dolstra
3b5e84cc73
Tweak debug output
2015-03-23 12:59:41 +01:00
Eelco Dolstra
479632efa3
Call initGC()
2015-03-19 20:16:38 +01:00
Eelco Dolstra
4c0e3e4703
Debug tweak
2015-03-18 22:03:55 +01:00
Eelco Dolstra
ad2b7646ac
Don't show missing paths in logs
2015-03-04 15:44:04 +01: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
48af914e28
When propagating failure, propagate the duration and machine
...
Previously the duration would just show as "0" and you would have to
search for the original build to get the duration.
2015-02-25 16:21:54 +01:00
Eelco Dolstra
2f946bdfd7
Render machine correctly if it doesn't contain @
2015-02-25 16:21:29 +01:00
Eelco Dolstra
9282bcb95f
Show eval input changes in deterministic order
2015-02-25 13:13:12 +01:00
Eelco Dolstra
7c048cbbcf
Allow a different state directory for hydra-server
...
This is necessary if hydra-server runs under a different uid than the
other Hydra processes.
2015-02-24 11:40:24 +01:00
Eelco Dolstra
00e03b9db5
For consistency, Use base32 hashes in manifests
2015-02-19 12:44:52 +01:00
Eelco Dolstra
69adcd4be1
Update binary cache signing to Nix 1.9
2015-02-17 20:15:37 +01:00
Eelco Dolstra
ea815d55b8
More robot exclusions
2015-01-13 13:50:13 +01:00
Eelco Dolstra
80116b648e
Exclude robots from all of /build
2015-01-13 13:45:39 +01:00
Eelco Dolstra
a12135fc51
Don't use Perl's -w flag
2014-12-12 17:39:52 +01:00
Eelco Dolstra
6a0b9a3476
hydra-build: Handle new trace messages
...
Now build step duration no longer includes network overhead (i.e.
time to copy closures to the build machine).
2014-12-12 17:20:50 +01:00
Eelco Dolstra
c0ca5489e1
Don't use given/when
...
These give warnings in Perl >= 5.18:
given is experimental at /home/hydra/src/hydra/src/lib/Hydra/Helper/CatalystUtils.pm line 241.
when is experimental at /home/hydra/src/hydra/src/lib/Hydra/Helper/CatalystUtils.pm line 242.
...
2014-12-12 11:27:17 +01:00
Shea Levy
e56e743f97
S3Backup: Create a proper nar
2014-12-10 23:06:52 -05:00
Shea Levy
208bbbb4b0
s3backup: Create temporary file in temp dir
2014-12-10 22:06:32 -05: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
9e00d98d34
Shut up some Perl 5.20 warnings
2014-11-25 00:27:52 +01:00
Eelco Dolstra
5e265e6739
Tweak blame message
2014-11-19 15:24:31 +01:00
Eelco Dolstra
7b5b434014
Fix getResponsibleAuthors
2014-11-19 15:22:30 +01:00
Eelco Dolstra
0d28e9372b
Remove dead code
2014-11-19 14:59:36 +01:00
Eelco Dolstra
2d46741840
Fix message
2014-11-19 14:52:42 +01:00
Eelco Dolstra
8523130ebb
Use Email::MIME instead of Email::Simple
...
Email::Simple cannot handle non-ASCII characters.
Fixes #191 .
2014-11-19 14:45:46 +01:00
Eelco Dolstra
41bc918382
Fix robots.txt
2014-11-18 14:55:52 +01:00
Rob Vermaas
d5db1d3bc1
Revert "Make evaluation fail with proper error when a input of type build is not available."
...
This reverts commit a1b5020562
.
2014-11-18 11:13:34 +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
Rob Vermaas
a1b5020562
Make evaluation fail with proper error when a input of type build is not available.
2014-11-18 11:00:28 +01:00
Eelco Dolstra
c503876a7e
Don't cache nix-cache-info very long
2014-11-06 15:30:24 +01:00
Eelco Dolstra
c250407f3c
Set Expires headers for Hydra's binary cache
...
This allows caching by reverse proxies.
2014-11-06 14:31:48 +01:00
Rob Vermaas
55eb55478d
Allow HipChat notification on all builds, in stead of status changes only.
2014-10-21 07:50:12 +00: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
3687c9c30b
Validate build IDs
2014-10-01 17:05:39 +02:00
Eelco Dolstra
5a7efc0469
Fix aggregate handling
2014-10-01 15:34:05 +02:00
Eelco Dolstra
3f51ac6603
Partially revert 1c20cfdf24
...
Not clear why update-dbix messed up the Jobsets and Projects
classes. This will probably happen again in the future...
2014-10-01 15:28:18 +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
f4acc9a522
Create Builds with iscurrent set
...
This should eliminate a subsequent update.
2014-09-30 15:44:09 +02:00
Eelco Dolstra
5b4de2dee6
hydra-evaluator: Reduce verbosity
2014-09-30 15:44:08 +02:00
Eelco Dolstra
09a96c642a
hydra-eval-jobs: Use JSON instead of XML
...
XML::Simple is pretty slow - reading the output for the Nixpkgs jobset
takes half a minute or so. JSON is pretty much instantaneous.
2014-09-30 15:44:08 +02:00
Eelco Dolstra
d9a5143fcb
Use partial indexes
...
There is no point in indexing rows with common column values like
"finished = 1", since those are the majority of the table. Only the
exceptions ("finished = 0") are interesting. Having smaller tables
should make updates/insertions faster.
2014-09-30 15:44:08 +02:00
Eelco Dolstra
773c7e89cf
Get rid of some obsolete indexes
2014-09-30 15:44:08 +02:00
Eelco Dolstra
1c20cfdf24
Drop the errorMsg column in the Jobs table
...
We're not using it anywhere.
2014-09-29 19:46:11 +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
01f4037d6f
hydra-eval-jobs: Don't keep track of used inputs
...
We no longer store this in the database, so it's not necessary for
hydra-eval-jobs to do this.
2014-09-25 13:38:43 +02:00
Eelco Dolstra
6284fd540d
Disallow multiple jobs with the same name
...
This has been deprecated since a8db329839
.
Issue #60 .
2014-09-24 18:12:59 +02:00
Eelco Dolstra
0d5a38a40b
Really fix hydra-eval-jobs
...
Fixes #183 .
2014-09-24 15:55:19 +02:00
Eelco Dolstra
b11cb37044
Handle derivations without a system attribute
2014-09-22 16:53:40 +02:00
Eelco Dolstra
eb2f3eb8d4
Fix build
2014-09-22 16:47:02 +02:00
Eelco Dolstra
4727165832
Use pkgconfig to find Nix
2014-09-18 12:24:05 +02:00
Eelco Dolstra
c1bf3bb0f2
hydra-eval-jobs: Add --dry-run option
2014-09-12 14:30:01 +02:00
Eelco Dolstra
748c3409b4
Don't maintain BuildInputs anymore
...
We don't need to record inputs per build anymore because we have
JobsetEvalInputs now.
2014-09-06 19:06:07 +02:00
aszlig
9c7f303255
Use mktemp for tempdir creation in prefetchers.
...
This incorporates the following two commits from <nixpkgs>:
NixOS/nixpkgs@f83af95f8a
NixOS/nixpkgs@5e7a1cf955
Hydra was the original reason why I was fixing tempdir creation in the
first place. Seeing that Hydra ships its own versions of these scripts,
we need to patch them here as well.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-29 12:40:11 +02:00
Eelco Dolstra
2f7e928f4e
Bump default silent timeout to 2 hours
2014-08-25 11:35:56 +02:00
Eelco Dolstra
d6b61f4925
More charset hackery
2014-08-23 16:39:20 +02:00
Sander van der Burg
ede4a10353
Compose release name for an evaluation if none has been defined
2014-08-23 16:20:58 +02:00
Eelco Dolstra
319e053368
Hopefully fix UTF-8 chars in Hipchat notification messages
2014-08-18 14:01:39 +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
f50066ab6f
Fix encoding of Hydra logs
2014-08-17 23:43:01 +02:00
Eelco Dolstra
a80bfceaca
Remove timeout detection hack
2014-08-17 19:26:03 +02:00
Eelco Dolstra
42b23133e8
Fix UTF-8 handling of log files
2014-08-13 18:53:29 +02:00
Eelco Dolstra
a2b27c7cf2
Preserve whitespace in string inputs
2014-08-13 17:25:08 +02:00
Eelco Dolstra
9334b84d6f
Fix registerRoot
...
Fixes #175 .
2014-08-13 16:29:00 +02:00
Eelco Dolstra
3520315fea
Fix build and handling of string inputs starting with a dash
...
Fixes #176 .
2014-08-13 16:24:26 +02:00
Eelco Dolstra
69e3aa0438
Write Hydra roots as regular files instead of symlinks
...
Note that this requires at least NixOS/Nix@1c208f2b7e .
2014-08-01 17:24:55 +02:00
Ronny Esterluss
7351752066
fixed string comparison
2014-07-31 22:18:28 +02:00
Tino Breddin
5ebc2e5419
only checkout the target branch when topgit is used
2014-07-31 22:18:28 +02:00
Ronny Esterluss
55aaf807eb
added clean command
2014-07-31 21:53:25 +02:00
Ronny Esterluss
ee840be313
forcing branch switch
2014-07-31 21:53:25 +02:00
Eelco Dolstra
6b88be040e
Make restartBuilds faster
2014-07-18 00:03:26 +02:00
Eelco Dolstra
365de86ead
Fix hydra-update-gc-roots
2014-07-16 23:20:58 +02:00