wip(#3001): delete NodeKind::Dag, the container this issue is about
The variant, its label, its agent-accessor arm and its no-op executor arm are gone, along with the module prose describing a job as "a single container node whose subtree is the work". A job is now just its nodes: a template declares them and names the roots it wants back. `dag_of` becomes `root_of`. It always wrapped the graph's `root_of` and still returns the same thing, but the old name asserted a concept that no longer exists — with no container, the parent chain ends at whichever root the template declared, so the honest question is "which root owns this node", not "which DAG is this in". One comment kept its old wording on purpose: `visible_roots` explains that the projection it replaced keyed on the container kind rather than selecting structurally. That is a statement about the past and stays true; it now says "the since-removed container kind" rather than naming a type that is not there to look up.
This commit is contained in:
parent
0523b4f7de
commit
aef7ead0bc
4 changed files with 37 additions and 54 deletions
|
|
@ -53,7 +53,7 @@ pub(super) async fn run_node(
|
|||
kind: &NodeKind,
|
||||
) -> (super::JobBuilder, Result<()>) {
|
||||
// The agent this node targets rides the payload — empty for the agentless
|
||||
// container kinds (`MetaLock`, `Dag`), which never read it.
|
||||
// kinds (`MetaLock`, `Reparent`), which never read it.
|
||||
let agent = kind.agent();
|
||||
// Every arm is `Result<()>`; the three that grow work declare into `builder`
|
||||
// *synchronously*, after their own awaits have finished. Borrowing `&builder`
|
||||
|
|
@ -115,26 +115,21 @@ pub(super) async fn run_node(
|
|||
run_finalize_deploy(coord, *approval_id).await
|
||||
}
|
||||
NodeKind::DeployTail { approval_id, .. } => {
|
||||
run_deploy_tail(coord, coord.job_queue.dag_of(id), agent, *approval_id).await
|
||||
run_deploy_tail(coord, coord.job_queue.root_of(id), agent, *approval_id).await
|
||||
}
|
||||
NodeKind::ResolveApproval {
|
||||
approval_id,
|
||||
outcome,
|
||||
} => run_resolve_approval(coord, coord.job_queue.dag_of(id), *approval_id, *outcome).await,
|
||||
} => run_resolve_approval(coord, coord.job_queue.root_of(id), *approval_id, *outcome).await,
|
||||
NodeKind::EmitRebuilt { ok, .. } => {
|
||||
run_emit_rebuilt(coord, agent, coord.job_queue.dag_of(id), *ok).await;
|
||||
run_emit_rebuilt(coord, agent, coord.job_queue.root_of(id), *ok).await;
|
||||
Ok(())
|
||||
}
|
||||
NodeKind::SetWanted { up, .. } => run_set_wanted(coord, agent, *up),
|
||||
// The nodes that carry no work of their own; completing one lets it
|
||||
// reach `Finishing` so the nodes under it start.
|
||||
// - `Dag`: pure grouping container. The DAG's terminal side effect, if
|
||||
// any, is its own tail node in the graph.
|
||||
// - `DeployWindow` / `AgentWindow`: pure resource holders (braces) —
|
||||
// what they declare stays held until their subtree settles.
|
||||
NodeKind::Dag { .. } | NodeKind::DeployWindow { .. } | NodeKind::AgentWindow { .. } => {
|
||||
Ok(())
|
||||
}
|
||||
// Braces carry no work of their own; completing one lets it reach
|
||||
// `Finishing` so the nodes under it start. What they declare stays held
|
||||
// until their whole subtree settles.
|
||||
NodeKind::DeployWindow { .. } | NodeKind::AgentWindow { .. } => Ok(()),
|
||||
};
|
||||
(builder, result)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue