ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

add debug_assertions for execute span metadata

+8 -1
+8 -1
wire/lib/src/hive/node.rs
··· 5 5 use enum_dispatch::enum_dispatch; 6 6 use gethostname::gethostname; 7 7 use serde::{Deserialize, Serialize}; 8 + use std::assert_matches::debug_assert_matches; 8 9 use std::collections::HashMap; 9 10 use std::env; 10 11 use std::fmt::Display; ··· 12 13 use std::path::PathBuf; 13 14 use std::sync::Arc; 14 15 use tokio::sync::oneshot; 15 - use tracing::{Instrument, Level, debug, error, event, instrument, trace, warn}; 16 + use tracing::{Instrument, Level, Span, debug, error, event, instrument, trace, warn}; 16 17 17 18 use crate::commands::common::evaluate_hive_attribute; 18 19 use crate::commands::{CommandArguments, WireCommandChip, run_command_with_env}; ··· 392 393 pub async fn execute(mut self) -> Result<(), HiveLibError> { 393 394 let (tx, rx) = oneshot::channel(); 394 395 self.context.state.evaluation_rx = Some(rx); 396 + 397 + // The name of this span should never be changed without updating 398 + // `wire/cli/tracing_setup.rs` 399 + debug_assert_matches!(Span::current().metadata().unwrap().name(), "execute"); 400 + // This span should always have a `node` field by the same file 401 + debug_assert!(Span::current().metadata().unwrap().fields().field("node").is_some()); 395 402 396 403 if !matches!(self.context.goal, Goal::Keys) { 397 404 tokio::spawn(