From ab0a06871391a84c9b904bc9f2cd74ee1e8903ea Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 14 May 2024 14:44:29 +0200 Subject: serve target: Improve logic for local build failure triggers If the serve endpoint reports an internal error, local builds should not continue and the error message should be provided. Similarly, if the serve endpoint promises the target cache value to be in remote CAS, but the client cannot find or process it as needed, then a local build again should not continue and the reason be provided as an error message. --- src/buildtool/serve_api/remote/target_client.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/buildtool/serve_api/remote/target_client.hpp') diff --git a/src/buildtool/serve_api/remote/target_client.hpp b/src/buildtool/serve_api/remote/target_client.hpp index 948e9337..0d34ea2d 100644 --- a/src/buildtool/serve_api/remote/target_client.hpp +++ b/src/buildtool/serve_api/remote/target_client.hpp @@ -34,11 +34,16 @@ /// \brief Result union for the ServeTarget request. /// Index 0 will contain the hash of the blob containing the logged -/// analysis/build failure received from the endpoint, as a string. -/// Index 1 will contain any other failure message, as a string. -/// Index 2 will contain the target cache value information on success. +/// analysis/build failure received from the endpoint, as a string; this should +/// also trigger a local build fail. +/// Index 1 will contain the message of any INTERNAL error on the endpoint, as +/// a string; this should trigger a local build fail. +/// Index 2 will contain any other failure message, as a string; local builds +/// might be able to continue, but with a warning. +/// Index 3 will contain the target cache value information on success. using serve_target_result_t = std::variant>; -- cgit v1.2.3