Commit graph

2694 commits

Author SHA1 Message Date
Eelco Dolstra d834ac9c14
Update flake.{nix,lock} 2019-06-18 18:00:40 +02:00
Eelco Dolstra 2b4658b6ea
Merge pull request #654 from nlewo/lewo-search-by-hash
Allow to search builds by hash
2019-06-13 14:36:29 +02:00
Antoine Eiche 7935cffd6b Create a pg_trgm index on builds.drvpath
The search query uses the LIKE operator which requires a sequential
scan (it can't use the already existing B-tree index). This new
index (trigram) avoids a sequential scan of the builds table when the
LIKE operator is used.

Here is the analyze of a request on the builds table with this index:

     explain analyze select * from builds where drvpath like '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%';
                                                                 QUERY PLAN
     -----------------------------------------------------------------------------------------------------------------------------------
      Bitmap Heap Scan on builds  (cost=128.00..132.01 rows=1 width=492) (actual time=0.070..0.077 rows=1 loops=1)
        Recheck Cond: (drvpath ~~ '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%'::text)
        ->  Bitmap Index Scan on indextrgmbuildsondrvpath  (cost=0.00..128.00 rows=1 width=0) (actual time=0.047..0.047 rows=3 loops=1)
              Index Cond: (drvpath ~~ '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%'::text)
      Total runtime: 0.206 ms
     (5 rows)
2019-06-06 14:28:25 +02:00
Antoine Eiche 778fc03570 Allow to search builds by hash
Currently, a full store path has to be provided to search in
builds. This patch permits to search jobs with a output path or
derivation hash.

Usecase: we are building Docker images with Hydra. The tag of the
Docker image is the hash of the image output path. This patch would
allow us to find back the build job from the tag of a running
container image.
2019-06-05 11:56:42 +02:00
Eelco Dolstra 7936a29364
hydra-eval-jobs: Use 'checks' output if there is no 'hydraJobs' output 2019-06-03 13:55:32 +02:00
Eelco Dolstra 9a8880fd28
Doh 2019-06-03 13:53:22 +02:00
Eelco Dolstra 517acb4ca8
Add some flake checks 2019-06-03 12:29:42 +02:00
Eelco Dolstra 0042183717
Fix build 2019-06-03 12:23:49 +02:00
Eelco Dolstra bc11ab22a3
Update flake.nix 2019-06-03 12:09:18 +02:00
Graham Christensen 1be7de15a8
Merge pull request #648 from danbst/pg-changes
tests: change postgresql socket dir to /tmp
2019-05-23 15:59:31 -04:00
Eelco Dolstra b7be2bf9ad Fix build against the latest flakes branch 2019-05-22 14:51:55 +02:00
Eelco Dolstra 8717d69a36 Build using the nix flake 2019-05-22 14:44:10 +02:00
Eelco Dolstra 438ddf5289
Fix error in GitlabStatus plugin
May 15 09:20:10 chef hydra-queue-runner[27523]: Hydra::Plugin::GitlabStatus=HASH(0x519a7b8)->buildFinished: Can't call method "value" on an undefined value at /nix/store/858hinflxcl2jd12wv1r3a8j11ybsf6w-hydra-0.1.2629.89fa829/libexec/hydra/lib/Hydra/Plugin/GitlabStatus.pm line 57.
2019-05-15 10:28:16 +02:00
Eelco Dolstra 89fa82930a
Create projects in enabled state 2019-05-11 00:55:26 +02:00
Eelco Dolstra f68cb7b57e
"Reproduce" action: Support flakes
No more need for a reproduction script! It just says something like

  If you have Nix installed, you can reproduce this build on your own
  machine by running the following command:

  # nix build github:edolstra/dwarffs/09c823e977946668b63ad6c88ed358b48220f124:hydraJobs.build.x86_64-linux
2019-05-11 00:53:00 +02:00
Eelco Dolstra 4ec51032ee
Jobset eval page: Show immutable flake URI 2019-05-11 00:52:06 +02:00
Eelco Dolstra ed00f0b25e
Cache flake-based jobset evaluations 2019-05-11 00:41:13 +02:00
Eelco Dolstra 30e8fe951b
Improve error message 2019-05-11 00:40:40 +02:00
Eelco Dolstra 0387787e7e
TODO 2019-05-11 00:14:18 +02:00
Eelco Dolstra 842ef9af24
hydra-eval-jobset: Support flakes 2019-05-11 00:11:38 +02:00
Eelco Dolstra f9f595cd21
Add flake configuration to the web interface 2019-05-11 00:11:38 +02:00
Eelco Dolstra 6ee6ec3bda
hydra-eval-jobs: Support flakes
E.g. 'hydra-eval-jobs ~/Dev/patchelf' is enough to evaluate patchelf -
no need to set up a $NIX_PATH, pass arguments, etc.
2019-05-11 00:11:38 +02:00
Eelco Dolstra ddcf05ac22
release.nix: Do not rely on currentSystem 2019-05-11 00:11:38 +02:00
Eelco Dolstra 2c60019910
hydra-eval-jobs: Modernize argument parser 2019-05-11 00:11:38 +02:00
Eelco Dolstra 8f3114960c
Remove the hydra-eval-jobs restart hack
It's not very effective.
2019-05-10 21:57:19 +02:00
Eelco Dolstra 80fe42e77e
Update flake.lock 2019-05-09 15:10:16 +02:00
Eelco Dolstra 950e8bef6c
Disable deprecation warnings 2019-05-08 21:22:52 +02:00
Eelco Dolstra 2ecc06e557
Replace shell.nix with a flake devShell attribute 2019-05-08 18:12:24 +02:00
Eelco Dolstra 4172b5b290
Add flake.nix 2019-05-08 13:57:51 +02:00
Kevin Quick ff64583d07
Add evaluation error status to evaluation time on project jobset tab. 2019-05-06 14:08:32 +02:00
Graham Christensen c88745140b
Merge pull request #649 from mayflower/upstream-gitlab-status
Create a gitlab status plugin
2019-04-28 08:18:03 -04:00
Graham Christensen bcb1c2916d release: bump to 19.03 2019-04-26 15:14:27 +02:00
Robin Gloster f4e7c104ff
Create a gitlab status plugin
This plugin expects as inputs to a jobset the following:
 - gitlab_status_repo => Name of the repository input pointing to that
   status updates should be POST'ed, i.e. the jobset has a git input
   "nixexprs": "https://gitlab.example.com/project/nixexprs", in which
   case "gitlab_status_repo" would be "nixexprs".
 - gitlab_project_id => ID of the project in Gitlab, i.e. in the above
   case the ID in gitlab of "nixexprs"
2019-04-11 16:40:44 +02:00
danbst 4171ab4c4f tests: change postgresql socket dir to /tmp
In https://github.com/NixOS/nixpkgs/pull/57677 default postgresql socket directory was changed
to `/run/postgresql`, which doesn't exist (and can't be created) in
Nix build environment. We'll use /tmp as socket dir explicitly then.

Fixes build failure https://hydra.nixos.org/build/91221682

Cc @aszlig @edolstra
2019-03-29 23:46:38 +02:00
Graham Christensen 0e337e6f9c
Merge pull request #644 from input-output-hk/declarative-jobset-error-message
improve the error messages when invalid declarative jobsets are defined
2019-03-21 14:25:23 -04:00
Michael Bishop c741576563
improve the error messages when invalid declarative jobsets are defined
(cherry picked from commit 7568b89a1a9da3a58a0cdddc7b5bcea7bb6209d8)
2019-03-20 15:27:37 -04:00
Graham Christensen 2c142868a0
Merge pull request #643 from input-output-hk/github-plugin-short-context-debug
allow using a shorter context and increase hydra-notify debug
2019-03-20 14:23:31 -05:00
Michael Bishop 3ad091faf3
allow using a shorter context and increase hydra-notify debug
(cherry picked from commit 1c76ad393669af2f728fd519a050f417319412a6)
2019-03-20 15:22:24 -04:00
Graham Christensen 8a41ea5f60
Merge pull request #571 from kquick/moreinfo
Additional helpful information in error messages.
2019-03-18 15:18:14 -05:00
Graham Christensen 215ca5da9c
Merge pull request #607 from nlewo/json-search
Add JSON search API endpoint
2019-03-18 15:08:32 -05:00
Kevin Quick 2e225ba7c8
Do not attempt to report dir for grab command failure if not specified. 2019-03-17 23:15:24 -07:00
Graham Christensen 0721f6623f
Merge pull request #627 from samueldr/hydra-eval-jobs/warn-max-heap-size
hydra-eval-jobs: Warn and resets maxHeapSize on bad values
2019-03-17 19:36:53 -04:00
Graham Christensen 44e7f0dece
Merge pull request #530 from pinktrink/master
Fix bad ordering in projects documentation.
2019-03-17 17:28:51 -04:00
Graham Christensen baf828a560
Merge pull request #624 from kquick/job_headers
Add job status headers (web useability for red/green colorblindness).
2019-03-17 17:24:38 -04:00
Graham Christensen 88a92256e1
Merge pull request #636 from Ma27/serve-json-for-evals-and-machines
Serialize data as JSON with `Accept: application/json`
2019-03-17 17:17:17 -04:00
Graham Christensen 21a4433fec
Merge branch 'master' into job_headers 2019-03-17 17:16:37 -04:00
Graham Christensen c8fa7ffc12
Merge pull request #629 from Ma27/fix-maintainer-notifications
hydra-eval-jobs: fix maintainer resolution
2019-03-17 17:12:55 -04:00
Graham Christensen 014e5aa10d
Merge pull request #628 from dasJ/patch-1
Support $X-Request-Base for the Logo
2019-03-17 16:22:53 -04:00
Eelco Dolstra be2791330e
Merge pull request #641 from basvandijk/fix-linux-build-on-darwin
Fix Linux build on Darwin
2019-03-15 21:33:00 +08:00
Bas van Dijk e9d032bfe9 Fix Linux build on Darwin
Without this patch running the following on MacOS:

  nix-build release.nix -A build.x86_64-linux

results in the following error during the configuration phase (note that Nix
should be configured with a x86_64-linux build machine):

  building '/nix/store/jb6ca1gmplyb69ayd43z7fb0y9npxd53-hydra-0.1.2581.8b5948f4cf12424c04df67a6eb136c9846fb2cfd.drv' on 'ssh://my-linux-build-machine'...
  ...
  checking whether /nix/store/s6bhdppx66bkgf741vk4d29hgsj1h1zp-hydra-perl-deps/bin/nix-store is recent enough... ./configure: line 16254: /nix/store/s6bhdppx66bkgf741vk4d29hgsj1h1zp-hydra-perl-deps/bin/nix-store: cannot execute binary file: Exec format error
  no
  configure: error: `/nix/store/s6bhdppx66bkgf741vk4d29hgsj1h1zp-hydra-perl-deps/bin/nix-store' doesn't support `--timeout'; please use a newer version.
  build time elapsed:  0m1.624s 0m1.774s 0m9.366s 0m6.110s
  builder for '/nix/store/jb6ca1gmplyb69ayd43z7fb0y9npxd53-hydra-0.1.2581.8b5948f4cf12424c04df67a6eb136c9846fb2cfd.drv' failed with exit code 1

This problem is that the `nix` dependency of hydra is selected from a nixpkgs
set configured with a default `system` parameter,
i.e. `builtin.currentSystem`. This means that the hydra derivation which is
build for and on Linux depends on the nix derivation build for Darwin.

The fix is to select nix from the nixpkgs set configured with a system specified
by the user.
2019-03-15 11:27:16 +01:00