git.delta.rocks / fleet / refs/commits / 32d9799cb7a1

difftreelog

fix remote copy

oqlpxzwuYaroslav Bolyukin2026-06-15parent: #12bc0d4.patch.diff

2 files changed

modifiedcmds/fleet/src/cmds/build_systems.rsdiffbeforeafterboth
--- a/cmds/fleet/src/cmds/build_systems.rs
+++ b/cmds/fleet/src/cmds/build_systems.rs
@@ -1,4 +1,4 @@
-use std::{env::current_dir, os::unix::fs::symlink, path::PathBuf};
+use std::{env::current_dir, os::unix::fs::symlink};
 
 use anyhow::Result;
 use camino::Utf8PathBuf;
@@ -101,7 +101,7 @@
 impl Deploy {
 	pub async fn run(self, config: &Config, opts: &FleetOpts) -> Result<()> {
 		let hosts = opts.filter_skipped(config.list_hosts()?)?;
-		let mut tasks = FuturesUnordered::new();
+		let tasks = FuturesUnordered::new();
 		for host in hosts.into_iter() {
 			let config = config.clone();
 			let span = info_span!("deploy", host = field::display(&host.name));
modifiedcrates/fleet-base/src/host.rsdiffbeforeafterboth
24use tempfile::NamedTempFile;24use tempfile::NamedTempFile;
25use time::UtcDateTime;25use time::UtcDateTime;
26use tokio::task::spawn_blocking;26use tokio::task::spawn_blocking;
27use tracing::{info, warn};27use tracing::warn;
2828
29use crate::fleetdata::{29use crate::fleetdata::{
30 FleetData, FleetSecretData, FleetSecretDistribution, FleetSecretPart, SecretOwner,30 FleetData, FleetSecretData, FleetSecretDistribution, FleetSecretPart, SecretOwner,
282282
283 /// Client for this host's unprivileged agent.283 /// Client for this host's unprivileged agent.
284 pub async fn remowt(&self) -> Result<Remowt> {284 pub async fn remowt(&self) -> Result<Remowt> {
285 Ok(self.connection().await?)285 self.connection().await
286 }286 }
287287
288 pub fn ensure_nix_plugin(&self) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + '_>> {288 pub fn ensure_nix_plugin(&self) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + '_>> {
310 .rpc()310 .rpc()
311 .wait_for_connection_to(Address::Plugin(NIX_PLUGIN_ID))311 .wait_for_connection_to(Address::Plugin(NIX_PLUGIN_ID))
312 .await312 .await
313 .map_err(|e| anyhow!("failed to wait for plugin"))?;313 .map_err(|_| anyhow!("failed to wait for plugin"))?;
314 anyhow::Ok(())314 anyhow::Ok(())
315 })315 })
316 .await?;316 .await?;
427 let store = self.nix_store().await?;427 let store = self.nix_store().await?;
428 {428 {
429 let path = path.clone();429 let path = path.clone();
430 let store = eval_store();430 let eval_store = eval_store();
431 spawn_blocking(move || store.copy_to(&store, path.as_ref()))431 spawn_blocking(move || eval_store.copy_to(&store, path.as_ref()))
432 .await432 .await
433 .expect("copy_to panicked")433 .expect("copy_to panicked")
434 .context("copying closure to remote store")?;434 .context("copying closure to remote store")?;