diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-21 12:57:34 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-21 16:08:51 +0100 |
commit | d0e7a5237a882df008be390cf4eae8e0fda8eeea (patch) | |
tree | ad7928f593c486c597dd6ba0fc49a46f2ff1f216 /src/buildtool/serve_api/serve_service/target.hpp | |
parent | ee3fed474db766d085546028875afd6b6c656cc7 (diff) | |
download | justbuild-d0e7a5237a882df008be390cf4eae8e0fda8eeea.tar.gz |
serve target server: lazy report at trace level the analysis/build failure
Diffstat (limited to 'src/buildtool/serve_api/serve_service/target.hpp')
-rw-r--r-- | src/buildtool/serve_api/serve_service/target.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/buildtool/serve_api/serve_service/target.hpp b/src/buildtool/serve_api/serve_service/target.hpp index 09b8657b..45efdbb8 100644 --- a/src/buildtool/serve_api/serve_service/target.hpp +++ b/src/buildtool/serve_api/serve_service/target.hpp @@ -131,8 +131,20 @@ class TargetService final : public justbuild::just_serve::Target::Service { /// also ensures the content has the expected format. /// \returns An error + data union, with a pair of grpc status at index 0 /// and the dispatch list stored as a JSON object at index 1. - auto GetDispatchList(ArtifactDigest const& dispatch_digest) noexcept + [[nodiscard]] auto GetDispatchList( + ArtifactDigest const& dispatch_digest) noexcept -> std::variant<::grpc::Status, dispatch_t>; + + /// \brief Handles the processing of the log after a failed analysis or + /// build. Will populate the response as needed and set the status to be + /// returned to the client. + /// \param failure_scope String stating where the failure occurred, to be + /// included in the local error messaging. + [[nodiscard]] auto HandleFailureLog( + std::filesystem::path const& logfile, + std::string const& failure_scope, + ::justbuild::just_serve::ServeTargetResponse* response) noexcept + -> ::grpc::Status; }; #endif // INCLUDED_SRC_BUILD_SERVE_API_SERVE_SERVICE_TARGET_HPP |