From ce29134d67e1af2c339936af73e4d6a82c8b337e Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Wed, 13 Dec 2023 10:04:16 +0100 Subject: just serve target: Add clarifying comment in shard computation --- src/buildtool/serve_api/serve_service/target.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp index 8e46b77b..ab4b24d2 100644 --- a/src/buildtool/serve_api/serve_service/target.cpp +++ b/src/buildtool/serve_api/serve_service/target.cpp @@ -132,7 +132,11 @@ auto TargetService::ServeTarget( description["endpoint dispatch list"] = std::move(dispatch_list); } - // add backend description to CAS + // add backend description to CAS; + // we match the sharding strategy from regular just builds, i.e., allowing + // fields with invalid UTF-8 characters to be considered for the serialized + // JSON description, but using the UTF-8 replacement character to solve any + // decoding errors. auto const description_str = description.dump( 2, ' ', false, nlohmann::json::error_handler_t::replace); auto execution_backend_dgst = -- cgit v1.2.3