hivectl: migrate dag_progress to hive-jobq-wire's generic GraphNode
This commit is contained in:
parent
d3f2d246e3
commit
10b0f640af
8 changed files with 272 additions and 175 deletions
|
|
@ -308,6 +308,15 @@ impl hive_jobq_wire::WireNode for NodeKind {
|
|||
{
|
||||
data.insert("inputs".to_owned(), inputs.clone().into());
|
||||
}
|
||||
// The DAG container's own metadata — nowhere else on the wire, since
|
||||
// `GraphNode` carries no DAG-level fields (a group root is an
|
||||
// ordinary node). `hivectl` needs `source` for its progress line;
|
||||
// `reason` rides along for free rather than adding a second variant
|
||||
// later for the one field the first pass missed.
|
||||
if let NodeKind::Dag { source, reason, .. } = self {
|
||||
data.insert("source".to_owned(), source.as_str().into());
|
||||
data.insert("reason".to_owned(), reason.clone().into());
|
||||
}
|
||||
// Not in the payload at all — the build log is keyed on node identity
|
||||
// in a side table, which is why `data` is handed the id.
|
||||
if let Some(log) = crate::build_logs::global().and_then(|h| h.id_for_node(id)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue