Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 32 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions subprojects/hydra-ad-hoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ serde = { workspace = true, features = [ "derive" ] }
sqlx = { workspace = true, features = [ "runtime-tokio", "postgres" ] }
thiserror.workspace = true
tokio = { workspace = true, features = [ "full" ] }
tokio-stream.workspace = true
toml.workspace = true
tonic.workspace = true
tonic-prost.workspace = true
tracing.workspace = true

db.workspace = true
Expand All @@ -32,6 +35,8 @@ harmonia-store-derivation.workspace = true
harmonia-store-path.workspace = true
harmonia-store-remote.workspace = true
harmonia-utils-io.workspace = true
hydra-proto = { workspace = true, features = [ "client" ] }


[features]
otel = [ "hydra-tracing/otel" ]
Expand Down
11 changes: 11 additions & 0 deletions subprojects/hydra-ad-hoc/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ fn default_data_dir() -> PathBuf {
"/var/lib/hydra".into()
}

fn default_queue_runner_grpc_addr() -> String {
"http://[::1]:50051".into()
}

/// Main configuration of the application
#[derive(Debug, serde::Deserialize)]
#[serde(deny_unknown_fields)]
Expand All @@ -119,6 +123,11 @@ pub(crate) struct AppConfig {
/// Hydra data directory; step logs are read from its `build-logs`.
#[serde(default = "default_data_dir")]
hydra_data_dir: PathBuf,

/// `hydra-queue-runner`'s gRPC endpoint, used for the trusted-client
/// fast path (`SubmitDerivation`) that `build_derivation` takes.
#[serde(default = "default_queue_runner_grpc_addr")]
queue_runner_grpc_addr: String,
}

impl From<AppConfig> for App {
Expand All @@ -131,6 +140,7 @@ impl From<AppConfig> for App {
upstream_socket: val.upstream_socket,
store_dir: val.store_dir,
log_prefix: val.hydra_data_dir.join("build-logs"),
queue_runner_grpc_addr: val.queue_runner_grpc_addr,
}
}
}
Expand All @@ -142,6 +152,7 @@ pub(crate) struct App {
pub upstream_socket: PathBuf,
pub store_dir: StoreDir,
pub log_prefix: PathBuf,
pub queue_runner_grpc_addr: String,
}

#[derive(Debug, thiserror::Error)]
Expand Down
Loading
Loading