From 481c89631440a7593e1fb353d6902e756ac1ce00 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 18 Apr 2024 13:19:10 +0200 Subject: Export progress: report short configuration As we always analyse export targets in their canonical configuration (and do count in the progress the mapping from obtained configuraiton to canonical one), the shortend name (i.e., the representation with null values dropped form the configuration) is still a unique representation of the target. Use this in progress reporting to simplify reading the progress sample. --- src/buildtool/build_engine/target_map/export.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/buildtool/build_engine/target_map/export.cpp') diff --git a/src/buildtool/build_engine/target_map/export.cpp b/src/buildtool/build_engine/target_map/export.cpp index 7142bfa8..e0bc36c3 100644 --- a/src/buildtool/build_engine/target_map/export.cpp +++ b/src/buildtool/build_engine/target_map/export.cpp @@ -17,12 +17,14 @@ #include #include // std::move +#include "nlohmann/json.hpp" #include "src/buildtool/build_engine/base_maps/field_reader.hpp" #include "src/buildtool/build_engine/expression/configuration.hpp" #include "src/buildtool/common/statistics.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/storage/storage.hpp" +#include "src/utils/cpp/json.hpp" #ifndef BOOTSTRAP_BUILD_TOOL #include "src/buildtool/serve_api/remote/config.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" @@ -144,8 +146,10 @@ void ExportRule( Logger::Log(LogLevel::Debug, "Querying serve endpoint for export target {}", key.target.ToString()); - auto task = fmt::format( - "[{},{}]", key.target.ToString(), effective_config.ToString()); + auto task = + fmt::format("[{},{}]", + key.target.ToString(), + PruneJson(effective_config.ToJson()).dump()); exports_progress->TaskTracker().Start(task); auto res = ServeApi::ServeTarget(*target_cache_key, *repo_key); // process response from serve endpoint -- cgit v1.2.3