Eelco Dolstra
639c660abf
Fix build
2020-02-15 14:54:35 +01:00
Eelco Dolstra
93ed7f81cb
flake.lock: Update
...
Flake input changes:
* Updated 'nix': 'github:NixOS/nix/d2032edb2f86e955a8a7724a27c0c3225f386500' -> 'github:NixOS/nix/eb19ff3b82240326fc0e999e09f81b6c8ed98640'
2020-02-14 23:26:56 +01:00
Graham Christensen
ae1b9face3
Merge remote-tracking branch 'origin/master' into flake
2020-02-11 12:52:46 -05:00
Graham Christensen
027668f0db
hydra.sql: add an index for slow queries in production
...
These queries used to use (jobset, project) based indexes,
and the addition of jobset_id makes most of those indexes
unusable now.
2020-02-11 12:52:28 -05:00
Graham Christensen
53896ff19b
Merge remote-tracking branch 'origin/master' into flake
2020-02-11 08:36:40 -05:00
Graham Christensen
834793468f
fixup: d'oh, make the migrations from #710 part-2 sequential
2020-02-11 08:36:14 -05:00
Eelco Dolstra
881b7449fd
Merge remote-tracking branch 'origin/master' into flake
2020-02-11 14:23:16 +01:00
Eelco Dolstra
0dbf0a361e
Merge pull request #714 from grahamc/jobset-id-pgsql-part-2
...
Jobset id pgsql part 2
2020-02-11 13:51:17 +01:00
Graham Christensen
2637a7ad76
Builds: index literally what latest-finished queries
2020-02-11 07:06:21 -05:00
Graham Christensen
f0f41eaaff
LatestSucceededForJob{,set}: Filter with jobset_id
2020-02-11 07:06:20 -05:00
Graham Christensen
66fbbd9692
Jobs.builds: Fetch via Jobs.jobset_id
2020-02-11 07:06:20 -05:00
Graham Christensen
7c71f9df28
Jobsets.builds: Fetch via Jobsets.id
2020-02-11 07:06:20 -05:00
Graham Christensen
3c392b8cd8
Jobsets.jobs: Fetch via Jobsets.id
2020-02-11 07:06:20 -05:00
Graham Christensen
8ef08f1385
Builds.jobset_id: make not-null
2020-02-11 07:06:20 -05:00
Graham Christensen
2cdcc7f188
Jobs.jobset_id: make not-null
2020-02-11 07:06:17 -05:00
Eelco Dolstra
100e09a5b3
Merge remote-tracking branch 'origin/master' into flake
...
Also update flake.lock
2020-02-10 17:58:10 +01:00
Graham Christensen
add4f610ce
Merge pull request #711 from grahamc/jobset-id-pgsql-part-1
...
jobset_id, #710 Part 1
2020-02-10 11:43:38 -05:00
Graham Christensen
c4cc72f944
hydra-init: Warn about the schema version migration
2020-02-10 11:43:03 -05:00
Graham Christensen
f69260118b
hydra-backfill-ids: create to add jobset_id values to Builds and Jobs
...
Vacuum every 10 iterations, update 10k at a time.
2020-02-10 11:43:03 -05:00
Graham Christensen
f3a561aecd
Builds: populate Builds.jobset_id in hydra-eval-jobset
2020-02-10 11:43:02 -05:00
Graham Christensen
ddf00fa627
Builds: add a nullable jobset_id foreign key to Jobsets.
...
Also, adds an explicitly named "builds" accessor to the Jobsets
Schema object, which uses the project/jobset name.
2020-02-10 11:43:02 -05:00
Graham Christensen
624f1d8d2d
Jobs: populate Jobs.jobset_id field when writing from hydra-eval-jobset
2020-02-10 11:43:02 -05:00
Graham Christensen
efa1f1d4fb
Jobs: add a nullable jobset_id foreign key to Jobsets.
...
Also, adds an explicitly named "jobs" accessor to the Jobsets
Schema object, which uses the project/jobset name.
2020-02-10 11:43:02 -05:00
Graham Christensen
e00030563b
Jobsets: add a SERIAL, unique, non-null id column
...
A postgresql column which is non-null and unique is treated with
the same optimisations as a primary key, so we have no need to
try and recreate the `id` as the primary key.
No read paths are impacted by this change, and the database will
automatically create an ID for each insert. Thus, no code needs to
change.
2020-02-10 11:42:59 -05:00
Eelco Dolstra
4a05bb36ac
Merge pull request #713 from grahamc/backport-flake-migration
...
Copy the flake migration from the flake branch
2020-02-10 17:41:46 +01:00
Graham Christensen
6fe57ab5fa
Copy the flake migration from the flake branch
...
hydra.nixos.org is already running this rev, and it should be safe to
apply to everyone else. If we make changes to this migration, we'll
need to write another migration anyway.
2020-02-09 15:21:28 -05:00
Eelco Dolstra
2b4f14963b
Merge pull request #709 from grahamc/generate-from-postgresql
...
sql: Generate models from postgresql
2020-02-06 20:18:31 +01:00
Graham Christensen
c2f932a7e3
sql: Generate models from postgresql
...
Lowercasing is due to postgresql not having case-sensitive table names.
It always technically workde before, but those table names never
existed literally.
The switch to generating from postgresql is to handle an upcoming
addition of an auto-incrementign ID to the Jobset table. Sqlite doesn't
seem to be able to handle the table having an auto incrementing ID
field which isn't the primary key, but we can't change the primary
key trivially.
Since hydra doesn't support sqlite and hasn't for many year anyway,
it is easier to just generate from pgsql directly.
2020-02-06 12:23:47 -05:00
Eelco Dolstra
ba8814a245
Fix build
2020-02-03 18:43:45 +01:00
Eelco Dolstra
d1bc950de2
Doh
2020-02-03 18:38:05 +01:00
Eelco Dolstra
f0e8e56f89
Update flake.lock
2020-02-03 18:14:06 +01:00
Eelco Dolstra
bb94677526
Merge remote-tracking branch 'origin/master' into flake
2020-02-03 17:49:01 +01:00
Eelco Dolstra
9da60e3c66
Merge pull request #708 from basvandijk/remove-logdiff-button
...
Remove the "log diff" buttons
2020-01-27 14:36:56 +01:00
Bas van Dijk
5fab5e935b
Remove the "log diff" buttons
...
because they're referencing the removed `logdiff` API.
This API was removed in 4d1816b152
.
Fixes #409
2020-01-26 21:45:38 +01:00
Eelco Dolstra
5c0c7d52a0
Merge pull request #700 from hamishmack/master
...
Fixes for macOS
2020-01-07 11:38:34 +01:00
Hamish Mackenzie
c40c887e50
Fixes for macOS
...
Building on macOS with the latest nixpkgs master and NixOS/nixpkgs#77147
fails. It seems some `std::experimental` (optional) for instance are
not available as `experimental`, but are in `std`. Also `toJSON` is
missing for `atomic< unsigned long long >`.
2020-01-07 12:38:06 +13:00
Eelco Dolstra
e7f2139e25
Build against nix-master
2019-12-30 22:49:26 +01:00
Graham Christensen
5cac40a438
Merge remote-tracking branch 'origin/master' into flake
2019-12-29 16:37:25 -05:00
Graham Christensen
d0f1bda0b8
job prometheus endpoint: drop nixname, too variable
2019-12-29 16:37:13 -05:00
Graham Christensen
d24de1b5de
Merge remote-tracking branch 'origin/master' into flake
2019-12-28 20:58:03 -05:00
Graham Christensen
64cdc3413c
job prometheus endpoint: d'oh
2019-12-28 20:57:27 -05:00
Graham Christensen
511c2db8aa
Merge remote-tracking branch 'origin/master' into flake
2019-12-28 20:22:54 -05:00
Graham Christensen
f8875f2d68
Merge pull request #699 from grahamc/job-prom
...
job: create a prometheus endpoint
2019-12-28 20:22:24 -05:00
Graham Christensen
d5445bfc1d
job: create a prometheus endpoint
...
Export the most recent stop time and exit status in
a prometheus-friendly format.
2019-12-28 16:41:49 -05:00
Eelco Dolstra
20dd0bbe6a
Merge pull request #691 from knl/fix-missing-notification-stats
...
hydra-send-stats: Cleanup removed metrics
2019-11-13 11:49:32 +01:00
Nikola Knezevic
06abfd6b2f
hydra-send-stats: Cleanup removed metrics
...
In 2946899504
these metrics got removed
due to refactoring of how notifications work.
2019-11-13 11:42:58 +01:00
Eelco Dolstra
4779757683
Update flake.lock
2019-11-08 15:45:21 +01:00
Eelco Dolstra
9e0e625bfa
Update flake.lock
2019-11-08 14:41:13 +01:00
Eelco Dolstra
4c8f600eaa
Update to latest Nix and fix compilation
2019-11-07 23:16:05 +01:00
Eelco Dolstra
1784c362ed
Simplify flake.nix
2019-11-07 18:46:32 +01:00