refactor(#2416): drop the now-always-none Spawned.sha field + deny tag leftover
This commit is contained in:
parent
c2bd7db998
commit
12ce346d02
4 changed files with 8 additions and 17 deletions
|
|
@ -618,7 +618,6 @@ fn finish_approval(
|
|||
agent: approval.agent.clone(),
|
||||
ok,
|
||||
note,
|
||||
sha: approval.fetched_sha.clone(),
|
||||
},
|
||||
),
|
||||
// MergeConfigPr ends in a container rebuild — surface a Rebuilt
|
||||
|
|
@ -863,8 +862,6 @@ pub fn deny(coord: &Coordinator, id: i64, note: Option<&str>) -> Result<()> {
|
|||
let approval = coord.approvals.get(id)?;
|
||||
coord.approvals.mark_denied(id, note)?;
|
||||
tracing::info!(%id, note, "approval denied");
|
||||
// MergeConfigPr denials carry no git tag — the PR stays open on the forge.
|
||||
let tag: Option<String> = None;
|
||||
if let Some(a) = approval {
|
||||
let sha = a.fetched_sha.clone();
|
||||
let approval_kind = a.kind.as_str();
|
||||
|
|
@ -880,7 +877,8 @@ pub fn deny(coord: &Coordinator, id: i64, note: Option<&str>) -> Result<()> {
|
|||
status: ApprovalStatus::Denied,
|
||||
note: note.map(String::from),
|
||||
sha,
|
||||
tag,
|
||||
// A denied config PR carries no git tag — it stays open on the forge.
|
||||
tag: None,
|
||||
},
|
||||
);
|
||||
coord.emit_approval_resolved(crate::coordinator::ApprovalResolved {
|
||||
|
|
|
|||
|
|
@ -247,7 +247,6 @@ async fn handle_spawn(coord: &Arc<Coordinator>, name: &str) -> Result<HostRespon
|
|||
agent: name.to_owned(),
|
||||
ok: true,
|
||||
note: None,
|
||||
sha: None,
|
||||
});
|
||||
// Update tmpfiles.d so the new agent's dirs survive a reboot.
|
||||
tokio::spawn(lifecycle::sync_tmpfiles());
|
||||
|
|
@ -259,7 +258,6 @@ async fn handle_spawn(coord: &Arc<Coordinator>, name: &str) -> Result<HostRespon
|
|||
agent: name.to_owned(),
|
||||
ok: false,
|
||||
note: Some(format!("{e:#}")),
|
||||
sha: None,
|
||||
});
|
||||
return Err(e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue