diff options
author | Florian Klink <flokli@flokli.de> | 2024-10-15T13·16+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-10-19T09·37+0000 |
commit | d52d889f2bf6ff0aa329c3058120140da2debaf7 (patch) | |
tree | 5ca5005e19098f1a192be907407c65326059c26d /tvix/store/src/nar | |
parent | 3fda90602d3de7a720149f090422c4da9d12d31d (diff) |
refactor(tvix): make indicatif.pb_show=1 more explicit r/8837
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 <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/src/nar')
-rw-r--r-- | tvix/store/src/nar/renderer.rs | 9 |
1 files changed, 2 insertions, 7 deletions
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<BS, DS> { @@ -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<BS, DS>( 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. |