Commit Graph

2713 Commits

Author SHA1 Message Date
5ae8b54d25 README.md: Link to the latest manual
(cherry picked from commit 455611b0b4e97290a858687142805babc9929673)
2020-03-13 21:33:22 +01:00
be0ec2d223 Remove style.css
https://github.com/NixOS/nix/issues/3392
2020-03-13 16:17:48 +01:00
123bee1db5 Restore job type checking 2020-03-04 15:16:26 +01:00
69a6f3448a Fix calling job functions
Fixes #718.
2020-03-04 15:16:04 +01:00
3cc1deb125 Merge pull request #721 from grahamc/one-by-one
hydra-evaluator: add a 'ONE_AT_A_TIME' evaluator style
2020-03-04 08:44:43 +01:00
e6e4aa54c0 Merge pull request #722 from grahamc/fix-declarative-jobsets
Fix declarative jobsets due to `nix` command being hidden
2020-03-04 08:41:13 +01:00
994430b94b treewide: allow nix command 2020-03-03 22:52:20 -05:00
117b9ecef1 Nix.pm: readNixFile: pass «--experimental-features nix-command»
Declarative jobsets were broken by the Nix update, causing
nix cat-file to break silently.

This commit restores declarative jobsets, based on top of a commit
making it easier to see what broke.
2020-03-03 22:36:21 -05:00
113a312f67 handleDeclarativeJobsetBuild: handle errors from readNixFile 2020-03-03 22:32:13 -05:00
5fae9d96a2 hydra-evaluator: add a 'ONE_AT_A_TIME' evaluator style
In the past, jobsets which are automatically evaluated are evaluated
regularly, on a schedule. This schedule means a new evaluation is
created every checkInterval seconds (assuming something changed.)

This model works well for architectures where our build farm can
easily keep up with demand.

This commit adds a new type of evaluation, called ONE_AT_A_TIME, which
only schedules a new evaluation if the previous evaluation of the
jobset has no unfinished builds.

This model of evaluation lets us have 'low-tier' architectures.

For example, we could now have a jobset for ARMv7l builds, where
the buildfarm only has a single, underpowered ARMv7l builder.
Configuring that jobset as ONE_AT_A_TIME will create an evaluation
and then won't schedule another evaluation until every job of
the existing evaluation is complete.

This way, the cache will have a complete collection of pre-built
software for some commits, but the underpowered architecture will
never become backlogged in ancient revisions.
2020-03-03 19:28:44 -05:00
eaa65f51f4 hydra-evaluator: make the logic of the scheduler easier to read 2020-03-03 18:17:21 -05:00
eb5873ae53 Fix build 2020-02-20 11:19:45 +01:00
c642f787ee hydra-eval-jobs: Parallelize
(cherry picked from commit be8eb9d00d)
2020-02-20 10:28:58 +01:00
adf61e5cf8 Fix build
(cherry picked from commit 639c660abf)
2020-02-20 10:26:45 +01:00
5308e514ad Fix nlohmann_json dependency 2020-02-20 10:26:18 +01:00
e4f5156c41 Build against nix-master
(cherry picked from commit e7f2139e25)
2020-02-20 10:24:04 +01:00
b790a00729 Disable deprecation warnings
(cherry picked from commit 950e8bef6c)
2020-02-20 10:22:21 +01:00
2a50daa377 Update aggregate handling
(cherry picked from commit cf961ac893)
2020-02-20 10:13:39 +01:00
15187b059b Remove hydra-eval-guile-jobs
This hasn't been used in a long time (Guix uses its own CI system),
and it probably doesn't work anymore.

(cherry picked from commit 23c9ca3e94)
2020-02-20 09:58:12 +01:00
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
834793468f fixup: d'oh, make the migrations from #710 part-2 sequential 2020-02-11 08:36:14 -05:00
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
2637a7ad76 Builds: index literally what latest-finished queries 2020-02-11 07:06:21 -05:00
f0f41eaaff LatestSucceededForJob{,set}: Filter with jobset_id 2020-02-11 07:06:20 -05:00
66fbbd9692 Jobs.builds: Fetch via Jobs.jobset_id 2020-02-11 07:06:20 -05:00
7c71f9df28 Jobsets.builds: Fetch via Jobsets.id 2020-02-11 07:06:20 -05:00
3c392b8cd8 Jobsets.jobs: Fetch via Jobsets.id 2020-02-11 07:06:20 -05:00
8ef08f1385 Builds.jobset_id: make not-null 2020-02-11 07:06:20 -05:00
2cdcc7f188 Jobs.jobset_id: make not-null 2020-02-11 07:06:17 -05:00
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
c4cc72f944 hydra-init: Warn about the schema version migration 2020-02-10 11:43:03 -05:00
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
f3a561aecd Builds: populate Builds.jobset_id in hydra-eval-jobset 2020-02-10 11:43:02 -05:00
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
624f1d8d2d Jobs: populate Jobs.jobset_id field when writing from hydra-eval-jobset 2020-02-10 11:43:02 -05:00
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
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
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
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
2b4f14963b Merge pull request #709 from grahamc/generate-from-postgresql
sql: Generate models from postgresql
2020-02-06 20:18:31 +01:00
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
9da60e3c66 Merge pull request #708 from basvandijk/remove-logdiff-button
Remove the "log diff" buttons
2020-01-27 14:36:56 +01:00
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
5c0c7d52a0 Merge pull request #700 from hamishmack/master
Fixes for macOS
2020-01-07 11:38:34 +01:00
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
d0f1bda0b8 job prometheus endpoint: drop nixname, too variable 2019-12-29 16:37:13 -05:00
64cdc3413c job prometheus endpoint: d'oh 2019-12-28 20:57:27 -05:00
f8875f2d68 Merge pull request #699 from grahamc/job-prom
job: create a prometheus endpoint
2019-12-28 20:22:24 -05:00
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
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