diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-05-14 14:44:29 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-05-15 17:05:01 +0200 |
commit | ab0a06871391a84c9b904bc9f2cd74ee1e8903ea (patch) | |
tree | ce2096d7ef578ebc76f8b6e2c6aeee668b797507 /src/buildtool/serve_api/remote/target_client.hpp | |
parent | 0fd32f8b9d707d807c236156de12118b0a695d69 (diff) | |
download | justbuild-ab0a06871391a84c9b904bc9f2cd74ee1e8903ea.tar.gz |
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.
Diffstat (limited to 'src/buildtool/serve_api/remote/target_client.hpp')
-rw-r--r-- | src/buildtool/serve_api/remote/target_client.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
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,12 +34,17 @@ /// \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<std::string, std::string, + std::string, std::pair<TargetCacheEntry, Artifact::ObjectInfo>>; /// Implements client side for Target service defined in: |