nix fmt + rustfmt sweep
This commit is contained in:
parent
0cf120e9e9
commit
411cf86632
16 changed files with 171 additions and 133 deletions
|
|
@ -228,8 +228,7 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
|
|||
message: "update: hyperhive_flake has no canonical path".into(),
|
||||
};
|
||||
};
|
||||
let _guard =
|
||||
coord.transient_guard(name, crate::coordinator::TransientKind::Rebuilding);
|
||||
let _guard = coord.transient_guard(name, crate::coordinator::TransientKind::Rebuilding);
|
||||
let result = crate::auto_update::rebuild_agent(coord, name, ¤t_rev).await;
|
||||
drop(_guard);
|
||||
match result {
|
||||
|
|
@ -362,24 +361,20 @@ async fn submit_apply_commit(
|
|||
)
|
||||
.map_err(|e| anyhow::anyhow!("queue approval row: {e:#}"))?;
|
||||
let tag = format!("proposal/{id}");
|
||||
let sha = match crate::lifecycle::git_fetch_to_tag(
|
||||
&applied_dir,
|
||||
&proposed_dir,
|
||||
commit_ref,
|
||||
&tag,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
// Surface the failure on the approval row so the
|
||||
// dashboard reflects it instead of leaving a phantom
|
||||
// pending entry. The note doubles as the operator-visible
|
||||
// explanation of why the approval can't be approved.
|
||||
let _ = coord.approvals.mark_failed(id, &format!("{e:#}"));
|
||||
return Err(anyhow::anyhow!("git_fetch_to_tag: {e:#}"));
|
||||
}
|
||||
};
|
||||
let sha =
|
||||
match crate::lifecycle::git_fetch_to_tag(&applied_dir, &proposed_dir, commit_ref, &tag)
|
||||
.await
|
||||
{
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
// Surface the failure on the approval row so the
|
||||
// dashboard reflects it instead of leaving a phantom
|
||||
// pending entry. The note doubles as the operator-visible
|
||||
// explanation of why the approval can't be approved.
|
||||
let _ = coord.approvals.mark_failed(id, &format!("{e:#}"));
|
||||
return Err(anyhow::anyhow!("git_fetch_to_tag: {e:#}"));
|
||||
}
|
||||
};
|
||||
coord
|
||||
.approvals
|
||||
.set_fetched_sha(id, &sha)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue