refactor(#2591): move the perm-change payload onto the WritePermFile node
This commit is contained in:
parent
be2dfa8cd3
commit
600bc051e1
9 changed files with 17 additions and 36 deletions
|
|
@ -125,7 +125,6 @@ pub fn rebuild(agent: &str, source: Source, reason: String, relock: bool) -> Dag
|
|||
reason,
|
||||
approval_id: None,
|
||||
inputs: Vec::new(),
|
||||
perm_payload: None,
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes: rebuild_nodes(agent, relock, 0),
|
||||
}
|
||||
|
|
@ -141,7 +140,6 @@ pub fn approval_deploy(agent: &str, approval_id: i64, reason: String) -> DagSpec
|
|||
reason,
|
||||
approval_id: Some(approval_id),
|
||||
inputs: Vec::new(),
|
||||
perm_payload: None,
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes: vec![node(
|
||||
NodeKind::ApprovalDeploy {
|
||||
|
|
@ -171,7 +169,6 @@ pub fn reconcile_only(
|
|||
reason,
|
||||
approval_id: None,
|
||||
inputs: Vec::new(),
|
||||
perm_payload: None,
|
||||
transient,
|
||||
nodes: vec![node(
|
||||
NodeKind::Reconcile {
|
||||
|
|
@ -198,7 +195,6 @@ pub fn spawn(agent: &str, approval_id: i64, reason: String) -> DagSpec {
|
|||
reason,
|
||||
approval_id: Some(approval_id),
|
||||
inputs: Vec::new(),
|
||||
perm_payload: None,
|
||||
transient: Some(TransientKind::Spawning),
|
||||
nodes: {
|
||||
let a = || agent.to_owned();
|
||||
|
|
@ -219,6 +215,7 @@ pub fn perm_change(agent: &str, source: Source, reason: String, payload: PermPay
|
|||
let mut nodes = vec![node(
|
||||
NodeKind::WritePermFile {
|
||||
agent: agent.to_owned(),
|
||||
payload,
|
||||
},
|
||||
Vec::new(),
|
||||
)];
|
||||
|
|
@ -229,7 +226,6 @@ pub fn perm_change(agent: &str, source: Source, reason: String, payload: PermPay
|
|||
reason,
|
||||
approval_id: None,
|
||||
inputs: Vec::new(),
|
||||
perm_payload: Some(payload),
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes,
|
||||
}
|
||||
|
|
@ -257,7 +253,6 @@ pub fn meta_update(
|
|||
reason,
|
||||
approval_id,
|
||||
inputs,
|
||||
perm_payload: None,
|
||||
transient: Some(TransientKind::Rebuilding),
|
||||
nodes: vec![node(
|
||||
NodeKind::MetaLock {
|
||||
|
|
|
|||
Loading…
Reference in a new issue