-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factoring out parts of the serve protocol for Hydra to share #6134
Conversation
d84a1ce
to
28371ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a very good reason that I’m missing, but wouldn’t it be simpler to directly use the legacy ssh store in hydra? That would also make it possible to incrementally make hydra store-agnostic by extending the store API to fit its needs
See what I wrote in NixOS/hydra#1165 (comment) I absolutely do want to use the Store abstraction long term, but I am very concerned with accidental breakage and so want to proceed quite slowly and incrementally to avoid it. For example, without this approach, I probably would not have noticed how hydra is using a temp GC root locking version of Once all the serialization logic is in Nix alone, making sure the relevant Stores expose enough stuff to obviate hydra using these "raw" serialization bits directly should a safer refactor, because all the shuffling happens in one repo, and none of the serialization logic itself need be touched. |
28371ef
to
9977c4b
Compare
CI is not working because recent changes broke the macOS / clang builds. |
9977c4b
to
e06061e
Compare
I’ve been looking into this a bit, and I wonder whether we couldn’t do things the other way around:
(all that while expanding the implementation of the store to cover the hydra-specific edge-cases, and adding the new methods needed for the stuff like non-blocking builds). I think that it’s essentially similar to your plan, except that hydra would directly have a full-blown store available, which would make the incremental migration easier. Do I miss anything? |
@thufschmitt I am thinking start with #6223 and your Hydra PR, and then return to this. Sound good? |
e06061e
to
a457a8e
Compare
a457a8e
to
bbeffc9
Compare
92fb541
to
c114859
Compare
Flake lock file updates: • Updated input 'nix': 'github:NixOS/nix/c3827ff6348a4d5199eaddf8dbc2ca2e2ef46ec5' (2023-12-07) → 'github:obsidiansystems/nix/c114859acb7180d1ef06571a1adca6130c30313e' (2023-12-07)
I fixed up the Hydra part, and tests are passing just great! (At one point was wrong and tests were failing, so we know the coverage is counting for something) I thus consider this ready --- only keeping it draft because of the first Nix PR it depends on. |
🎉 All dependencies have been resolved ! |
team meeting notes:
|
b7efc52
to
a587a6c
Compare
OK now this is rebased on top of the #9586 so we have the option of making these things part of |
Flake lock file updates: • Updated input 'nix': 'github:NixOS/nix/c3827ff6348a4d5199eaddf8dbc2ca2e2ef46ec5' (2023-12-07) → 'github:obsidiansystems/nix/...'
a587a6c
to
1eff1a4
Compare
(in/after the meeting @thufschmitt said he didn't care about reviewing this one in particular.) |
1eff1a4
to
e6d7ee3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does look equivalent. Will approve when this is tested.
c7f3798
to
b3da462
Compare
OK added some tests! |
1980514
to
8916e53
Compare
Factor out `ServeProto::BasicClientConnection` for Hydra to share - `queryValidPaths`: Hydra uses the lock argument differently than Nix, so we un-hard-code it. - `buildDerivationRequest`: Just the request half, as Hydra does some things between requesting and responding. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Broader error handling logic is more robust.
We'll need this for unit testing. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
b1f2d81
to
1fb2582
Compare
Hydra uses the lock argument differently than Nix, so we un-hard-code it.
See NixOS/hydra#1165, which takes advantage of this (and #9560)
Depends on #9560