From 82cae74799e5a64c819556f6152ba3734f1e2035 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 27 May 2025 14:51:06 +0200 Subject: {Local,Bazel}Response: Fix logic for marking succesful population While in practice a failure to populate the fields of a response happens once per invocation, as it will trigger a failure of the execution, from an algorithmic standpoint the flag to mark a successful population of the response fields should only be set on actual success. Fix this. --- src/buildtool/execution_api/remote/bazel/bazel_response.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_response.cpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp index cedc1ff4..81392813 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp @@ -97,7 +97,6 @@ auto BazelResponse::Populate() noexcept -> std::optional { if (populated_) { return std::nullopt; } - populated_ = true; ArtifactInfos artifacts{}; auto const& action_result = output_.action_result; @@ -215,6 +214,7 @@ auto BazelResponse::Populate() noexcept -> std::optional { } artifacts_ = std::move(artifacts); dir_symlinks_ = std::move(dir_symlinks); + populated_ = true; return std::nullopt; } @@ -272,6 +272,7 @@ auto BazelResponse::Populate() noexcept -> std::optional { } artifacts_ = std::move(artifacts); dir_symlinks_ = std::move(dir_symlinks); + populated_ = true; return std::nullopt; } -- cgit v1.2.3