Commit graph

4095 commits

Author SHA1 Message Date
John Ericson d02e20a4c1
Merge pull request #1341 from NixOS/machine-dedup
Use Nix's `Machine` type in a minimal way
2024-01-23 15:38:19 -05:00
John Ericson 70e5469303 Use Nix's Machine type in a mimimal way
This is *just* using the fields from that type, and only where the types
coincide. (There are two fields with different types, `speedFactor` most
interestingly.) No code is reused, so we can be sure that no behavior is
changed.

Once the types are reconciled on the Nix side, then we can start
carefully actually reusing code.

Progress on #1164
2024-01-23 12:18:57 -05:00
John Ericson 2e6ee28f9b Machine -> ::Machine so we don't conflict with Nix's 2024-01-23 11:03:19 -05:00
John Ericson f5c0efb11e
Merge pull request #1340 from NixOS/start-using-nix-ssh
Replace `Child` with `SSHMaster::Connection`
2024-01-23 01:17:26 -05:00
John Ericson 4e8fbaa3d6 Replace Child with SSHMaster::Connection
Nix defines basically an identical struct for the same purpose, so let's
just use that.
2024-01-23 01:11:46 -05:00
John Ericson 02e453fc8c
Merge pull request #1329 from NixOS/small-std-optional-cleanup
Clean up `std::optional` dereferencing in the queue runner
2023-12-23 19:18:41 -05:00
John Ericson 75f26f1fc4 Clean up std::optional dereferencing in the queue runner
Instead of doing this partial operation a number of times, assert (with
a comment, get a reference to the thing inside, and use that just once.
(This refactor was done twice, "just once" for each time.)
2023-12-23 19:10:58 -05:00
John Ericson 3c89067f52
Merge pull request #1328 from JackKelly-Bellroy/doc-store-uri
Document the `store_uri` parameter by way of example
2023-12-23 03:57:10 -05:00
Jack Kelly abd858d3dc Document the store_uri parameter by way of example 2023-12-19 07:54:40 +10:00
John Ericson 163dbf7f54
Merge pull request #1327 from NixOS/latest-2.19
flake.lock: Update Nix
2023-12-14 00:57:19 -05:00
John Ericson 7517c134c5 flake.lock: Update Nix
Newer 2.19-maintenance has some `restricted-eval` fixes that benefit
Hydra.

Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/50f8f1c8bc019a4c0fd098b9ac674b94cfc6af0d' (2023-12-11)
  → 'github:NixOS/nix/b38e5a665e9d0aa7975beb0ed12e42d13a392e74' (2023-12-13)
2023-12-14 00:32:15 -05:00
John Ericson 411e4d0c24
Let tests themselves intentionally leak temp dir (#1320)
* Let tests themselves intentionally leak temp dir

By default Yath will clean up temporary files, so the result is the
same. But `--keep-dirs` can be passed to `yath test` telling Yath to
*not* clean them up instead. This is very useful for debugging.

* Update t/lib/HydraTestContext.pm

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2023-12-08 16:30:31 +00:00
John Ericson 831021808c
Merge pull request #1318 from obsidiansystems/use-build-result-serialiser
Use factored-out `BuildResult` serializer
2023-12-08 11:25:05 -05:00
John Ericson 91bbd5366f
Merge pull request #1319 from NixOS/nixpkgs-newer-23.05
flake.lock: Update Nixpkgs
2023-12-07 13:10:08 -05:00
John Ericson a45a27851b flake.lock: Update Nixpkgs
This will be required for upgrading Nix beyond 2.19.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ef0bc3976340dab9a4e087a0bcff661a8b2e87f3' (2023-06-21)
  → 'github:NixOS/nixpkgs/e9f06adb793d1cca5384907b3b8a4071d5d7cb19' (2023-12-03)
2023-12-07 12:21:18 -05:00
John Ericson 6a54ab24e2 Use factored-out BuildResult serializer
For the record, here is the Nix 2.19 version:
https://github.com/NixOS/nix/blob/2.19-maintenance/src/libstore/serve-protocol.cc,
which is what we would initially use.

It is a more complete version of what Hydra has today except for one
thing: it always unconditionally sets the start/stop times.

I think that is correct at the other end seems to unconditionally
measure them, but just to be extra careful, I reproduced the old
behavior of falling back on Hydra's own measurements if `startTime` is
0.

The only difference is that the fallback `stopTime` is now measured from
after the entire `BuildResult` is transferred over the wire, but I think
that should be negligible if it is measurable at all. (And remember,
this is fallback case I already suspect is dead code.)
2023-12-07 02:00:22 -05:00
John Ericson 58707438ba
Merge pull request #1317 from obsidiansystems/substitute-flag
`copyClosureTo`: Use `SubstituteFlag` instead of `bool`
2023-12-07 00:23:54 -05:00
John Ericson 86cd5e9076 copyClosureTo: Use SubstituteFlag instead of bool
This matches Nix (in the same serialization logic in
`src/libstore/legacy-ssh-store.cc`) and adds clarity.
2023-12-07 00:18:50 -05:00
John Ericson a5d44b60ea
Merge pull request #1313 from obsidiansystems/split-buildRemote
Split the `buildRemote` function, take 2
2023-12-04 11:37:36 -05:00
John Ericson 363604846a Again, use const in for loop
As requested by @teh. Was lost in merge with master, now added back.
2023-12-04 11:31:05 -05:00
John Ericson 162b538912 Remove unused thisArrow variable 2023-12-04 11:27:39 -05:00
John Ericson 104baef503 Document the connection initialization process 2023-12-04 09:42:04 -05:00
John Ericson 3c5636162a Merge remote-tracking branch 'upstream/master' into split-buildRemote 2023-12-04 09:38:43 -05:00
Janne Heß 874fcae1e8
Merge pull request #1301 from delroth/queue-runner-perf
queue-runner: only re-sort runnables by prio once per dispatch cycle
2023-12-04 15:27:14 +01:00
Eelco Dolstra 4dc8fe0b08
Merge pull request #1312 from obsidiansystems/clean-up-deps
Cleanup deps
2023-12-04 15:15:09 +01:00
John Ericson 67eeabd518 Merge remote-tracking branch 'upstream/master' into split-buildRemote 2023-12-04 09:12:58 -05:00
John Ericson 622c25e3c4 Sedding prior to merge 2023-12-04 08:56:06 -05:00
Eelco Dolstra f216bce0e6
Merge pull request #1314 from obsidiansystems/2.19
Upgrade to Nix 2.19
2023-12-01 17:07:51 +01:00
Eelco Dolstra 4d1c850512
Merge pull request #1308 from chayleaf/2.18
support nix 2.18
2023-12-01 15:10:29 +01:00
John Ericson c922e73c11 Update to Nix 2.19
Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/f5f4de6a550327b4b1a06123c2e450f1b92c73b6' (2023-10-02)
  → 'github:NixOS/nix/50f8f1c8bc019a4c0fd098b9ac674b94cfc6af0d' (2023-11-27)
2023-11-30 15:26:46 -05:00
John Ericson e172461e55 Use const in for loop
As requested by @teh
2023-11-30 12:19:20 -05:00
John Ericson 0917145622 Make new functions not in header static 2023-11-30 12:19:05 -05:00
John Ericson 2bda7ca642 Further use Machine::Connection to deduplicate 2023-11-30 11:31:58 -05:00
John Ericson 831a2d9bd5 Merge remote-tracking branch 'upstream/master' into split-buildRemote 2023-11-30 11:27:40 -05:00
John Ericson 5db374cb50 Cleanup deps
- `nativeBuildInputs` vs `buildInputs`

- narrow down `with`s for clarity

- use `autoreconfHook` not `bootstrap` script

These sorts of changes have also been done in the Nix repo.
2023-11-30 10:48:17 -05:00
chayleaf e9da80fff6
support nix 2.18 2023-11-21 18:41:52 +07:00
Janne Heß 8f48e4ddec
Merge pull request #1268 from knedlsepp/fix-mime
Fix MIME types when serving .js and .css to fix rendering of HTML reports
2023-11-17 22:16:27 +01:00
Janne Heß 33f8a36736
Merge pull request #1304 from stigtsp/crypt-passphrase-argon2-output-len
Set output length of C::P::Argon2 hashes to 16
2023-10-20 16:03:18 +02:00
Stig Palmquist 6a5fb9efae Set output length of C::P::Argon2 hashes to 16
Since the default lengths in Crypt::Passphrase::Argon2 changed from 16
to 32 in in 0.009, some tests that expected the passphrase to be
unchanged started failing.
2023-10-20 00:09:28 +02:00
Janne Heß c1a5ff3959
Merge pull request #1258 from nh2/patch-1
`renderInputDiff`: Increase git hash length 6 -> 8
2023-09-09 17:17:43 +02:00
Janne Heß 8520ab1391
Merge pull request #1300 from sternenseemann/doc-eval-builds
Document all_builds (/eval/{eval-id}/builds) endpoint
2023-09-09 17:11:52 +02:00
Janne Heß 8a413ce71a
Merge pull request #1293 from arianvp/patch-1
Fix docs for  /eval/{id}  endpoint
2023-09-09 17:10:56 +02:00
Pierre Bourdon b7c864c515
queue-runner: only re-sort runnables by prio once per dispatch cycle
The previous implementation was O(N²lg(N)) due to sorting the full
runnables priority list once per runnable being scheduled. While not
confirmed, this is suspected to cause performance issues and
bottlenecking with the queue runner when the runnable list gets large
enough.

This commit changes the dispatcher to instead only sort runnables per
priority once per dispatch cycle. This has the drawback of being less
reactive to runnable priority changes: the previous code would react
immediately, while this might end up using "old" priorities until the
next dispatch cycle. However, dispatch cycles are not supposed to take
very long (seconds, not minutes/hours), so this is not expected to have
much or any practical impact.

Ideally runnables would be maintained in a sorted data structure instead
of the current approach of copying + sorting in the scheduler. This
would however be a much more invasive change to implement, and might
have to wait until we can confirm where the queue runner bottlenecks
actually lie.
2023-09-08 23:38:30 +02:00
sternenseemann e2195c46d1 hydra-api.yaml: document all_builds (/eval/{eval-id}/builds) 2023-08-30 15:08:11 +02:00
sternenseemann 113836ebae hydra-api.yaml: name JobsetEval parameter eval-id
This is more accurate since the id space is not shared between build and
eval ids.
2023-08-30 15:06:48 +02:00
Eelco Dolstra 00d30874da
Merge pull request #1296 from DeterminateSystems/nix-2.17
Support Nix 2.17
2023-08-23 17:53:14 +02:00
Eelco Dolstra 35ccc9ebb2
Fix indentation
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-08-23 17:04:45 +02:00
Linus Heckemann 9f0427385f Apply LTO fix suggested by Ericson2314 2023-08-20 14:55:56 +02:00
Linus Heckemann b23431a657 Support Nix 2.17 2023-08-04 15:53:48 +02:00
Eelco Dolstra 60e2c377d3
Merge pull request #1295 from arianvp/patch-3
Fix documentation of defaultpath in api docs
2023-08-03 17:09:21 +02:00