Skip to content

Vault-engine scheduler client

State: open/building · Kind: adapter · Audience: system

  • A typed Rust client for the vault-engine scheduler: status, run, log and supervision, never a second scheduler.
  • When the engine is silent it builds a degraded status snapshot from task notes and state.json.

The crate talks to the vault-engine over HTTP and returns scheduler status with a source of live, fallback or down. When the engine does not answer, it builds a status snapshot from task-note files and state.json and tails logs from disk. Fields only a live engine can know, running and next_due, stay empty in that snapshot. The engine stays the only scheduler. A run request fails when the engine is down and never starts locally. The client also supervises the engine process: it decides whether to attach or start (the host does the spawn), stops with SIGTERM only, and checks pid liveness so no second engine starts.

  • EngineClient: status, reachable, task_running, run_task and log calls with a 2 s timeout, and the EngineProbe implementation
  • SchedulerStatus and EngineTask DTOs mapped by hand from the engine JSON, shared with the mail, backup and todo experiences
  • File-built fallback snapshot and the live/fallback/down source tri-state
  • Task-note scan with contract validation and after-graph checks, plus schedule labels that describe and never evaluate
  • Log tailing (last 256 KiB) with a line-count clamp
  • Engine supervision: attach-or-start decision, SIGTERM-only stop, pidfile liveness
  • EngineClientPort: the SchedulerPort assembled from the parts above
  • solutions/determined/crates/determined-engine-client/ is the crate; src/port.rs assembles the client, fallback, scan, logs and supervise modules into SchedulerPort
  • The engine-port feature quarantines scheduler-crossing capabilities behind a compile error (src/engine_port.rs)
  • solutions/determined/crates/determined-engine-client/
  • solutions/determined/crates/determined-engine-client/src/client.rs#EngineClient
  • solutions/determined/crates/determined-engine-client/src/fallback.rs#snapshot
  • solutions/determined/crates/determined-engine-client/src/supervise.rs#decide_start
  • solutions/determined/crates/determined-engine-client/src/port.rs#EngineClientPort

← Back to Capabilities