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
|
|
@ -119,9 +119,10 @@ pub enum NodeKind {
|
|||
Drain { agent: String },
|
||||
/// `set_nspawn_flags` + `set_resource_limits` + daemon-reload.
|
||||
WriteDropin { agent: String },
|
||||
/// Commit `tool-groups.json` / `capabilities.json` per the DAG's
|
||||
/// `perm_payload` (commit fused under `META_LOCK`).
|
||||
WritePermFile { agent: String },
|
||||
/// Commit `tool-groups.json` / `capabilities.json` per its `payload`
|
||||
/// (commit fused under `META_LOCK`). The payload rides this node — the only
|
||||
/// consumer — rather than the generic DAG container.
|
||||
WritePermFile { agent: String, payload: PermPayload },
|
||||
/// Opaque approval deploy pipeline (`MergeConfigPr`): the two-phase
|
||||
/// prepare/finalize/abort meta deploy stays inside `actions.rs` in v1 —
|
||||
/// deliberately not
|
||||
|
|
@ -156,7 +157,6 @@ pub enum NodeKind {
|
|||
transient: Option<TransientKind>,
|
||||
approval_id: Option<i64>,
|
||||
inputs: Vec<String>,
|
||||
perm_payload: Option<PermPayload>,
|
||||
created_at: i64,
|
||||
},
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ impl NodeKind {
|
|||
| NodeKind::Signal { agent }
|
||||
| NodeKind::Drain { agent }
|
||||
| NodeKind::WriteDropin { agent }
|
||||
| NodeKind::WritePermFile { agent }
|
||||
| NodeKind::WritePermFile { agent, .. }
|
||||
| NodeKind::ApprovalDeploy { agent }
|
||||
| NodeKind::SetWanted { agent, .. } => agent,
|
||||
NodeKind::MetaLock { .. } | NodeKind::Dag { .. } => "",
|
||||
|
|
@ -269,7 +269,9 @@ pub struct NodeSpec {
|
|||
/// Submit-time spec for a whole DAG. Built by `templates.rs`; validated
|
||||
/// (cycle rejection) by `JobQueue::submit`. No DAG-level `agent` — every
|
||||
/// node carries its own (a DAG can span agents), and the queue derives
|
||||
/// per-agent leasing from [`NodeSpec::agent`].
|
||||
/// per-agent leasing from [`NodeKind::agent`]. Type-specific payloads
|
||||
/// (`PermChange`'s file payload) ride the node that consumes them
|
||||
/// ([`NodeKind::WritePermFile`]), not this generic spec.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DagSpec {
|
||||
pub template: Template,
|
||||
|
|
@ -281,8 +283,6 @@ pub struct DagSpec {
|
|||
/// `MetaUpdate`-only: the inputs to bump (also part of the dedup
|
||||
/// key for that template). Display copy lives on the DAG.
|
||||
pub inputs: Vec<String>,
|
||||
/// `PermChange`-only payload.
|
||||
pub perm_payload: Option<PermPayload>,
|
||||
/// Dashboard transient pill (and crash-watch suppression) held for
|
||||
/// the lease window — from lease acquisition to DAG terminal.
|
||||
pub transient: Option<crate::coordinator::TransientKind>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue