From d52d889f2bf6ff0aa329c3058120140da2debaf7 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 15 Oct 2024 16:16:11 +0300 Subject: refactor(tvix): make indicatif.pb_show=1 more explicit This pushes generating spans with pb_show up to the caller. They usually have more context on how to present things, if at all. Change-Id: Icfcaa64a8a57dce50c0261f2d06e7c051e3946c2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12657 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: raitobezarius --- tvix/store/src/nar/renderer.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tvix/store/src/nar/renderer.rs') diff --git a/tvix/store/src/nar/renderer.rs b/tvix/store/src/nar/renderer.rs index afd85f267c6c..07cdc4b1e31f 100644 --- a/tvix/store/src/nar/renderer.rs +++ b/tvix/store/src/nar/renderer.rs @@ -6,8 +6,7 @@ use nix_compat::nar::writer::r#async as nar_writer; use sha2::{Digest, Sha256}; use tokio::io::{self, AsyncWrite, BufReader}; use tonic::async_trait; -use tracing::{instrument, Span}; -use tracing_indicatif::span_ext::IndicatifSpanExt; +use tracing::instrument; use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService, Node}; pub struct SimpleRenderer { @@ -46,7 +45,7 @@ where /// Invoke [write_nar], and return the size and sha256 digest of the produced /// NAR output. -#[instrument(skip_all, fields(indicatif.pb_show=1))] +#[instrument(skip_all)] pub async fn calculate_size_and_sha256( root_node: &Node, blob_service: BS, @@ -59,10 +58,6 @@ where let mut h = Sha256::new(); let mut cw = CountWrite::from(&mut h); - let span = Span::current(); - span.pb_set_message("Calculating NAR"); - span.pb_start(); - write_nar( // The hasher doesn't speak async. It doesn't // actually do any I/O, so it's fine to wrap. -- cgit 1.4.1