nix fmt + rustfmt sweep
This commit is contained in:
parent
0cf120e9e9
commit
411cf86632
16 changed files with 171 additions and 133 deletions
|
|
@ -68,23 +68,24 @@ pub async fn run(coord: &Arc<Coordinator>) -> Result<()> {
|
|||
if let Err(e) = migrate_applied_repo(name).await {
|
||||
tracing::warn!(%name, error = ?e, "migration: applied repo rewrite failed");
|
||||
}
|
||||
if let Err(e) = lifecycle::setup_proposed(&Coordinator::agent_proposed_dir(name), name)
|
||||
.await
|
||||
if let Err(e) =
|
||||
lifecycle::setup_proposed(&Coordinator::agent_proposed_dir(name), name).await
|
||||
{
|
||||
tracing::warn!(%name, error = ?e, "migration: setup_proposed failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Phase 3: meta repo.
|
||||
let agents = lifecycle::agents_for_meta_listing().await.unwrap_or_default();
|
||||
if let Err(e) =
|
||||
meta::sync_agents(
|
||||
&coord.hyperhive_flake,
|
||||
coord.dashboard_port,
|
||||
&coord.operator_pronouns,
|
||||
&agents,
|
||||
)
|
||||
let agents = lifecycle::agents_for_meta_listing()
|
||||
.await
|
||||
.unwrap_or_default();
|
||||
if let Err(e) = meta::sync_agents(
|
||||
&coord.hyperhive_flake,
|
||||
coord.dashboard_port,
|
||||
&coord.operator_pronouns,
|
||||
&agents,
|
||||
)
|
||||
.await
|
||||
{
|
||||
tracing::warn!(error = ?e, "migration: meta sync_agents failed");
|
||||
}
|
||||
|
|
@ -109,7 +110,8 @@ pub async fn run(coord: &Arc<Coordinator>) -> Result<()> {
|
|||
all_ok = false;
|
||||
}
|
||||
}
|
||||
if all_ok && !names.is_empty()
|
||||
if all_ok
|
||||
&& !names.is_empty()
|
||||
&& let Err(e) = std::fs::write(repoint_marker(), b"done\n")
|
||||
{
|
||||
tracing::warn!(error = ?e, "migration: write repoint marker failed");
|
||||
|
|
@ -142,8 +144,7 @@ async fn migrate_applied_repo(name: &str) -> Result<()> {
|
|||
return Ok(());
|
||||
}
|
||||
let want = lifecycle::initial_flake_nix();
|
||||
std::fs::write(&flake_path, want)
|
||||
.with_context(|| format!("write {}", flake_path.display()))?;
|
||||
std::fs::write(&flake_path, want).with_context(|| format!("write {}", flake_path.display()))?;
|
||||
raw_git(
|
||||
&dir,
|
||||
&[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue