diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-21 15:18:58 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-03-24 09:25:05 +0100 |
commit | f192705cb4834252507d228e7d6e0a38095976e3 (patch) | |
tree | 83040a418bc8c700cd5234d8d60f0497e2b7631f /src/buildtool/execution_engine/executor/executor.hpp | |
parent | fc0c842eb2e938c7de405e365ff320eb28e04bc7 (diff) | |
download | justbuild-f192705cb4834252507d228e7d6e0a38095976e3.tar.gz |
ExecutionApi: Return TmpDir
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index e030d2d6..12721b01 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -72,6 +72,7 @@ #include "src/utils/cpp/hex_string.hpp" #include "src/utils/cpp/path_rebase.hpp" #include "src/utils/cpp/prefix.hpp" +#include "src/utils/cpp/tmp_dir.hpp" /// \brief Implementations for executing actions and uploading artifacts. class ExecutorImpl { @@ -133,8 +134,10 @@ class ExecutorImpl { } // get the alternative endpoint - auto alternative_api = GetAlternativeEndpoint( - merged_properties, remote_context, api.GetHashType()); + auto alternative_api = GetAlternativeEndpoint(merged_properties, + remote_context, + api.GetHashType(), + api.GetTempSpace()); if (alternative_api) { if (not api.ParallelRetrieveToCas( std::vector<Artifact::ObjectInfo>{Artifact::ObjectInfo{ @@ -758,7 +761,8 @@ class ExecutorImpl { [[nodiscard]] static auto GetAlternativeEndpoint( const ExecutionProperties& properties, const gsl::not_null<RemoteContext const*>& remote_context, - HashFunction::Type hash_type) -> std::unique_ptr<BazelApi> { + HashFunction::Type hash_type, + TmpDir::Ptr temp_space) -> std::unique_ptr<BazelApi> { for (auto const& [pred, endpoint] : remote_context->exec_config->dispatch) { bool match = true; @@ -781,7 +785,8 @@ class ExecutorImpl { remote_context->auth, remote_context->retry_config, config, - HashFunction{hash_type}); + HashFunction{hash_type}, + std::move(temp_space)); } } return nullptr; |