Skip to content

nixos-modules: Give the evaluator its own module - #1983

Open
Ericson2314 wants to merge 1 commit into
masterfrom
hydra-evaluator-module
Open

Ericson2314 wants to merge 1 commit into
masterfrom
hydra-evaluator-module

Conversation

@Ericson2314

@Ericson2314 Ericson2314 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Did this because @Conni2461 asked about it in #1940 (comment)


The evaluator's service and settings lived in the web app's module, so the evaluator could only be configured along with the web app. Every other Rust service already has a module of its own: the queue runner, the builder, the websocket server and hydra-ad-hoc. The evaluator now does too, evaluator-module.nix, under services.hydra-evaluator-dev.

This doesn't yet make it possible to run the evaluator elsewhere. Until more work is done it must be on the same machine as the web app: it runs Hydra's Perl, which reads the web app's hydra.conf and data directory, and it evaluates into the local Nix store. The module asserts this, and its enable defaults to the web app's, so existing deployments keep their evaluator.

  • The environment the web app's services share moves to web-app-env.nix, so that the evaluator module can use it too.

  • services.hydra-dev.evaluatorSettings and minimumDiskFreeEvaluator are renamed to services.hydra-evaluator-dev.settings and minimumDiskFree.

  • services.hydra-dev.evaluatorExecutable is replaced by services.hydra-evaluator-dev.package, matching the other modules.

One behavior changes: changing hydra.conf no longer restarts the evaluator, killing any evaluation in progress. The restart dates from the C++ evaluator, which read hydra.conf once at startup. The Rust evaluator doesn't read it at all; only the Perl it runs does, and that starts afresh for each evaluation, so the next evaluation picks up the change.

Assisted-by: Claude Code (Opus 5.5)

The evaluator's service and settings lived in the web app's module, so
the evaluator could only be configured along with the web app. Every
other Rust service already has a module of its own: the queue runner,
the builder, the websocket server and `hydra-ad-hoc`. The evaluator now
does too, `evaluator-module.nix`, under `services.hydra-evaluator-dev`.

This doesn't yet make it possible to run the evaluator elsewhere. Until
more work is done it must be on the same machine as the web app: it runs
Hydra's Perl, which reads the web app's `hydra.conf` and data directory,
and it evaluates into the local Nix store. The module asserts this, and
its `enable` defaults to the web app's, so existing deployments keep
their evaluator.

- The environment the web app's services share moves to
  `web-app-env.nix`, so that the evaluator module can use it too.

- `services.hydra-dev.evaluatorSettings` and `minimumDiskFreeEvaluator`
  are renamed to `services.hydra-evaluator-dev.settings` and
  `minimumDiskFree`.

- `services.hydra-dev.evaluatorExecutable` is replaced by
  `services.hydra-evaluator-dev.package`, matching the other modules.

One behavior changes: changing `hydra.conf` no longer restarts the
evaluator, killing any evaluation in progress. The restart dates from
the C++ evaluator, which read `hydra.conf` once at startup. The Rust
evaluator doesn't read it at all; only the Perl it runs does, and that
starts afresh for each evaluation, so the next evaluation picks up the
change.

Assisted-by: Claude Code (Opus 5.5)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love needing this file, but if we get rid of plugins or redo them in Rust or whatever, then this goes away

@Conni2461 Conni2461 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing the refactor. that aligns the setup more with the new queue runner :) changes look good to me. feel free to merge whenever

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants