Open
Conversation
bfdc713 to
56503bd
Compare
56503bd to
2b586c6
Compare
Port hydra-evaluator from C++ to Rust, removing the last C++ executable from the project. The new implementation uses `sqlx` and `tokio`, matching the async patterns already established by hydra-queue-runner and hydra-builder. Build/packaging changes: - Remove all C++ dependencies from `subprojects/hydra/meson.build` - Add `subprojects/hydra-evaluator/package.nix` following the same per-binary pattern as `hydra-queue-runner` and `hydra-builder`: each Rust binary is its own derivation that builds against a fileset containing only its own crate, and `postPatch` strips the other Rust binary crates from the workspace `members` list so cargo doesn't try to load their (absent) manifests. Properly sharing the dep crates between these builds is left for later. - Add `evaluatorExecutable` option to the NixOS web-app module, matching how the queue runner and builder are discovered via their own modules - Clean up stale references in `hydra-tests/meson.build` and `dev-shell.nix` `JobsetRow` uses `i32` for `lastCheckedTime` and `triggerTime` to match the `INT4` Postgres schema (`sqlx` refuses to decode `INT4` into `i64`). Post-eval DB updates are wrapped in a transaction, as in the C++ original. The DBI parser supports `sslmode`/`sslrootcert`/`sslcert`/ `sslkey` that `libpq` understood natively in the C++ version; unknown parameters are warned about rather than fatal. Satisfy the crate's own `#![deny(clippy::pedantic)]` gate: - use `fs_err` per workspace `disallowed_methods` policy - replace `as`-casts with `try_from` (schema is `INT4`, saturate at `i32::MAX`) - collapse nested `if let` chains Co-authored-by: Jörg Thalheim <joerg@thalheim.io> Co-authored-by: Claude <noreply@anthropic.com>
2b586c6 to
a117db6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port hydra-evaluator from C++ to Rust, removing the last C++ executable from the project. The new implementation uses sqlx and tokio, matching the async patterns already established by hydra-queue-runner and hydra-builder.
Build/packaging changes:
subprojects/hydra/meson.buildhydra-queue-runner/package.nixtosubprojects/rust-package.nixwith named outputs (queue_runner,builder,evaluator)evaluatorExecutableoption to the NixOS web-app module, matching how the queue runner and builder are discovered via their own moduleshydra-tests/meson.buildanddev-shell.nix