pub struct ExecResult {
pub result_id: String,
pub request_id: String,
pub exec_id: Option<String>,
pub pc_id: String,
pub exit_code: i32,
pub stdout: String,
pub stderr: String,
pub started_at: DateTime<Utc>,
pub finished_at: DateTime<Utc>,
pub manifest_id: Option<String>,
}Fields§
§result_id: Stringv0.29 / Issue #19: agent-minted UUID, unique per (Command, PC)
run. Replaces request_id as the projector’s primary key so
broadcast Commands (commands.all / commands.group.X) — where N
PCs share one request_id — finally persist all N results
instead of silently dropping all but the first. Pre-v0.29
agents omit this field; it deserialises as the empty string,
and Self::stable_result_id derives a deterministic UUIDv5
from (request_id, pc_id) so legacy payloads (a) get distinct
ids across broadcast PCs (PC #2’s row stops being dropped) and
(b) get the SAME id on JetStream redelivery (the new ON CONFLICT(result_id) DO NOTHING path correctly dedupes, so
executions.success_count doesn’t double-count across retries).
request_id: StringThe NATS reply token. Still surfaced for joining back to the
kanade run request/reply path. No longer unique across rows
(broadcast Commands share it).
exec_id: Option<String>v0.29 / Issue #19: back-link to executions.exec_id. Copied
from Command.exec_id by the agent. None for ad-hoc
kanade run (no deployment) and for results emitted by
pre-v0.29 agents (decoded via serde(default)).
pc_id: String§exit_code: i32§stdout: String§stderr: String§started_at: DateTime<Utc>§finished_at: DateTime<Utc>§manifest_id: Option<String>v0.13: the manifest id that produced this result. Sourced
from Command.id (which is the YAML manifest.id, e.g.
"inventory-hw"). Distinct from the per-deploy UUID stored
in Command.exec_id. The results projector uses this to
look up the manifest’s inventory: hint and upsert
inventory_facts rows for inventory-tagged jobs.
Implementations§
Source§impl ExecResult
impl ExecResult
Sourcepub fn stable_result_id(&self) -> String
pub fn stable_result_id(&self) -> String
Return the result_id if the agent supplied one (v0.29+
payloads always do), otherwise derive a stable UUIDv5 from
(request_id, pc_id). The projector calls this before INSERT
so legacy payloads still get a non-empty PK, AND so that
JetStream redeliveries of the same legacy payload hash to the
same id and dedupe via ON CONFLICT. Per-PC fan-out stays
distinct (different pc_id → different hash).
Trait Implementations§
Source§impl Clone for ExecResult
impl Clone for ExecResult
Source§fn clone(&self) -> ExecResult
fn clone(&self) -> ExecResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more