From 72bc4e0270891d72213989096ff1180adc07a578 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 21 Oct 2024 15:24:06 +0200 Subject: [PATCH] fix(tvix): use tracing::field::Empty for all indicatif.pb_show This prevents the field from getting printed to stderr, apparently. Change-Id: Ia9860e4ff37224003154db88ee5f83103060e626 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12756 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich --- tvix/cli/src/lib.rs | 2 +- tvix/glue/src/fetchers/mod.rs | 2 +- tvix/glue/src/tvix_store_io.rs | 2 +- tvix/store/src/pathinfoservice/grpc.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tvix/cli/src/lib.rs b/tvix/cli/src/lib.rs index 09ab62280..3a0040ea1 100644 --- a/tvix/cli/src/lib.rs +++ b/tvix/cli/src/lib.rs @@ -229,7 +229,7 @@ impl InterpretResult { /// Interprets the given code snippet, printing out warnings, errors /// and the result itself. The return value indicates whether /// evaluation succeeded. -#[instrument(skip_all, fields(indicatif.pb_show=1))] +#[instrument(skip_all, fields(indicatif.pb_show=tracing::field::Empty))] #[allow(clippy::too_many_arguments)] pub fn interpret( tvix_store_io: Rc, diff --git a/tvix/glue/src/fetchers/mod.rs b/tvix/glue/src/fetchers/mod.rs index c12598e96..aeb1bd3d0 100644 --- a/tvix/glue/src/fetchers/mod.rs +++ b/tvix/glue/src/fetchers/mod.rs @@ -196,7 +196,7 @@ impl Fetcher { /// Constructs a HTTP request to the passed URL, and returns a AsyncReadBuf to it. /// In case the URI uses the file:// scheme, use tokio::fs to open it. - #[instrument(skip_all, fields(url, indicatif.pb_show=1), err)] + #[instrument(skip_all, fields(url, indicatif.pb_show=tracing::field::Empty), err)] async fn download( &self, url: Url, diff --git a/tvix/glue/src/tvix_store_io.rs b/tvix/glue/src/tvix_store_io.rs index 67a88e13c..7e160a100 100644 --- a/tvix/glue/src/tvix_store_io.rs +++ b/tvix/glue/src/tvix_store_io.rs @@ -99,7 +99,7 @@ impl TvixStoreIO { /// /// In case there is no PathInfo yet, this means we need to build it /// (which currently is stubbed out still). - #[instrument(skip(self, store_path), fields(store_path=%store_path, indicatif.pb_show=1), ret(level = Level::TRACE), err(level = Level::TRACE))] + #[instrument(skip(self, store_path), fields(store_path=%store_path, indicatif.pb_show=tracing::field::Empty), ret(level = Level::TRACE), err(level = Level::TRACE))] async fn store_path_to_node( &self, store_path: &StorePath, diff --git a/tvix/store/src/pathinfoservice/grpc.rs b/tvix/store/src/pathinfoservice/grpc.rs index 2e18f5102..6ec88aec8 100644 --- a/tvix/store/src/pathinfoservice/grpc.rs +++ b/tvix/store/src/pathinfoservice/grpc.rs @@ -119,7 +119,7 @@ where ::Error: Into + Send, T::Future: Send, { - #[instrument(level = "trace", skip_all, fields(root_node = ?root_node, indicatif.pb_show=1))] + #[instrument(level = "trace", skip_all, fields(root_node = ?root_node, indicatif.pb_show=tracing::field::Empty))] async fn calculate_nar(&self, root_node: &Node) -> Result<(u64, [u8; 32]), Error> { let span = Span::current(); span.pb_set_message("Waiting for NAR calculation");