feat(#2392): group boot sweep + reconciles under one boot dag
This commit is contained in:
parent
6e0f6893cf
commit
16f69ca890
6 changed files with 111 additions and 23 deletions
|
|
@ -281,6 +281,30 @@ pub fn meta_update(
|
|||
/// Boot-time sweep parent: bump meta's hyperhive input (non-fatal),
|
||||
/// then fan out `Rebuild` children for the precomputed stale agent
|
||||
/// list (topology-sorted by the caller).
|
||||
/// Boot-time root anchor DAG: a single [`NodeKind::Noop`] node that groups
|
||||
/// this boot's `StartupSweep` + per-agent `Reconcile` child DAGs (linked via
|
||||
/// `parent_id`) into one tree so the dashboard renders the boot as one entry.
|
||||
/// Holds no lease and does no work — the children it anchors still run
|
||||
/// concurrently. `auto_update::run` submits it first (when there's any boot
|
||||
/// work), then parents the sweep + reconciles onto its id.
|
||||
pub fn boot_root(reason: String) -> DagSpec {
|
||||
DagSpec {
|
||||
template: Template::Boot,
|
||||
agent: "hyperhive".to_owned(),
|
||||
source: Source::AutoUpdate,
|
||||
reason,
|
||||
parent_id: None,
|
||||
approval_id: None,
|
||||
inputs: Vec::new(),
|
||||
perm_payload: None,
|
||||
transient: None,
|
||||
nodes: vec![NodeSpec {
|
||||
kind: NodeKind::Noop,
|
||||
deps: Vec::new(),
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn startup_sweep(reason: String, stale_agents: Vec<String>) -> DagSpec {
|
||||
DagSpec {
|
||||
template: Template::StartupSweep,
|
||||
|
|
|
|||
Loading…
Reference in a new issue