refactor(#2897): carry the meta-update inputs on the MetaLock node
Second of the `Dag` field removals, and the same shape as the first:
`DagSpec`/`NodeKind::Dag` carried an `inputs: Vec<String>` that exactly
one node ever read. Both reads live inside `run_meta_lock` — the
`meta::lock_update` call and the `meta_update_cascade_agents` fan-out —
so the list now rides `NodeKind::MetaLock` itself.
The executor stops touching `Claim` for this node entirely: its dispatch
arm already destructured `MetaLock { sweep, fanout }`, so `inputs` joins
them and the `claim` parameter, which had no other use, is gone.
Falls out of that:
- `Claim::inputs` and `DagMeta::inputs` delete.
- `dag_view`'s DAG-level projection onto the `MetaLock` node reads the
payload instead. The wire `NodeView::inputs` is unchanged: still
populated on the `meta_lock` node alone.
- the boot sweep names no inputs (it bumps `hyperhive` alone via
`lock_update_hyperhive`), which the construction site now says out loud
rather than leaving implicit in an empty DAG-level field.
Checked with clippy (`--all-targets -D warnings`), `cargo test -p
hive-c0re` (320 passed) and `nix fmt`. No option surface is touched, so
no nix-eval gate.
This commit is contained in:
parent
84aed5fb51
commit
af2b1ce0e2
7 changed files with 22 additions and 31 deletions
|
|
@ -367,7 +367,6 @@ pub fn rebuild(agent: &str, source: Source, reason: String, relock: bool) -> Dag
|
|||
DagSpec {
|
||||
source,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes,
|
||||
}
|
||||
|
|
@ -403,7 +402,6 @@ pub fn approval_deploy(agent: &str, approval_id: i64, reason: String) -> DagSpec
|
|||
DagSpec {
|
||||
source: Source::Approval,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes: vec![
|
||||
node(
|
||||
|
|
@ -462,7 +460,6 @@ pub fn reconcile_only(
|
|||
DagSpec {
|
||||
source,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient,
|
||||
nodes: vec![node(
|
||||
NodeKind::Reconcile {
|
||||
|
|
@ -488,7 +485,6 @@ pub fn spawn(agent: &str, approval_id: i64, reason: String) -> DagSpec {
|
|||
DagSpec {
|
||||
source: Source::Approval,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient: Some(TransientKind::Spawning),
|
||||
nodes: {
|
||||
let a = || agent.to_owned();
|
||||
|
|
@ -533,7 +529,6 @@ pub fn perm_change(agent: &str, source: Source, reason: String, payload: PermPay
|
|||
DagSpec {
|
||||
source,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes,
|
||||
}
|
||||
|
|
@ -559,6 +554,7 @@ pub fn meta_update(
|
|||
NodeKind::MetaLock {
|
||||
sweep: false,
|
||||
fanout: None,
|
||||
inputs,
|
||||
},
|
||||
Vec::new(),
|
||||
)];
|
||||
|
|
@ -572,7 +568,6 @@ pub fn meta_update(
|
|||
DagSpec {
|
||||
source,
|
||||
reason,
|
||||
inputs,
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes,
|
||||
}
|
||||
|
|
@ -595,7 +590,6 @@ pub fn reparent(
|
|||
DagSpec {
|
||||
source,
|
||||
reason,
|
||||
inputs: Vec::new(),
|
||||
transient: None,
|
||||
nodes: vec![node(NodeKind::Reparent { moves }, Vec::new())],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue