-
-
Couldn't load subscription status.
- Fork 323
Description
Currently Hydra duplicates lots of functionality that is in Nix. This is bad because it leads to either the Nix or Hydra versions of a feature being undertested and broken (e.g. remote builds are very finicky), or missing features on one side (Hydra doesn't support ssh-ng://).
The solution is to dedup, fixing both problems, and lowing our maintenance burden across the board.
I will try to break this down into steps, updating this list accordingly
Easier
-
Generic SSH logic
- Nix:
src/libstore/ssh.ccin Nix - Hydra: top of
src/hydra-queue-runner/build-remote.cc
Notable differences: Hydra passes a number of extra flags to ssh, evidently based on sysadmin war stories.
- Nix:
-
Legacy SSH protocol
- Nix:
src/libstore/legacy-ssh-store.ccin Nix - Hydra: Much of
src/hydra-queue-runner/build-remote.cc
Notable differences: Hydra doesn't issue builds blocking and synchronously, so it can cancel them and handle logs as they occur. Probably other things, TBD.
-
Split up logic so subsequent refactors are easier to both write and review Split the
buildRemotefunction #1180 -
ServeProto::Command::QueryValidPath -
ServeProto::Command::ImportPaths -
ServeProto::Command::BuildDerivation- Hydra part-way: Use factored-out
BuildResultserializer #1318
- Hydra part-way: Use factored-out
-
ServeProto::Command::QueryPathInfos -
ServeProto::Command::DumpStorePath
- Nix:
-
Use
Storeabstraction after previous two are complete. Support arbitrary stores for building #1200 -
Use the same notion of a
Machineconfig for remote builders. NixOS/nix@ebc9f36 was a Nix-side refactor to prepare for this, but then the Hydra side was not done.- Use Nix's
Machinetype in a minimal way #1341 Use Nix'sMachinetype - Dedup with nix: use
nix::Machine::parseConfig#1386 Use Nix's Machine parser
See also Why is machine loading rounded? #484
See also Triage and break up the global settings nix#5638, where we would like more of the machine stuff to go in the
Storeconfig. That ties this to the previous checkbox. - Use Nix's
Farther off
- Duplicate Scheduling logic, Nix's
build/*.ccvs Hydra