diff options
Diffstat (limited to 'src/buildtool/execution_api')
7 files changed, 26 insertions, 7 deletions
diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 7cee8b7e..02c78bcc 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -78,10 +78,12 @@ class IExecutionApi { /// pretty-printed before writing to fd. If `raw_tree` is set, pretty /// printing will be omitted and the raw tree object will be written /// instead. + /// NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] virtual auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, - bool raw_tree) const noexcept -> bool = 0; + bool raw_tree, + IExecutionApi const* alternative = nullptr) const noexcept -> bool = 0; /// \brief Synchronization of artifacts between two CASes. Retrieves /// artifacts from one CAS and writes to another CAS. Tree artifacts are diff --git a/src/buildtool/execution_api/git/git_api.hpp b/src/buildtool/execution_api/git/git_api.hpp index a02f577e..64e3bd16 100644 --- a/src/buildtool/execution_api/git/git_api.hpp +++ b/src/buildtool/execution_api/git/git_api.hpp @@ -117,10 +117,13 @@ class GitApi final : public IExecutionApi { return true; } + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, - bool raw_tree) const noexcept -> bool override { + bool raw_tree, + IExecutionApi const* /*alternative*/ = nullptr) const noexcept + -> bool override { if (artifacts_info.size() != fds.size()) { Logger::Log(LogLevel::Error, "different number of digests and file descriptors."); diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index 8df51d27..e87c0d23 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -144,10 +144,13 @@ class LocalApi final : public IExecutionApi { return true; } + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, - bool raw_tree) const noexcept -> bool final { + bool raw_tree, + IExecutionApi const* /*alternative*/ = nullptr) const noexcept + -> bool final { auto dumper = StreamDumper<LocalCasReader>{&local_context_.storage->CAS()}; return CommonRetrieveToFds( diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index 6032ab44..0b05dd19 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -307,10 +307,12 @@ auto BazelApi::CreateAction( return true; } +// NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto BazelApi::RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, - bool raw_tree) const noexcept -> bool { + bool raw_tree, + IExecutionApi const* /*alternative*/) const noexcept -> bool { auto dumper = StreamDumper<BazelNetworkReader>{network_->CreateReader()}; return CommonRetrieveToFds( artifacts_info, diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp index 3b0a1cb3..e45e0cdf 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp @@ -73,10 +73,13 @@ class BazelApi final : public IExecutionApi { IExecutionApi const* alternative = nullptr) const noexcept -> bool final; + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, - bool raw_tree) const noexcept -> bool final; + bool raw_tree, + IExecutionApi const* alternative = nullptr) const noexcept + -> bool final; [[nodiscard]] auto ParallelRetrieveToCas( std::vector<Artifact::ObjectInfo> const& artifacts_info, diff --git a/src/buildtool/execution_api/serve/mr_git_api.hpp b/src/buildtool/execution_api/serve/mr_git_api.hpp index 3a4fd184..8b0d8d9d 100644 --- a/src/buildtool/execution_api/serve/mr_git_api.hpp +++ b/src/buildtool/execution_api/serve/mr_git_api.hpp @@ -70,10 +70,13 @@ class MRGitApi final : public IExecutionApi { } /// \brief Not supported. + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& /*artifacts_info*/, std::vector<int> const& /*fds*/, - bool /*raw_tree*/) const noexcept -> bool final { + bool /*raw_tree*/, + IExecutionApi const* /*alternative*/ = nullptr) const noexcept + -> bool final { // Retrieval to file descriptors not supported. return false; } diff --git a/src/buildtool/execution_api/serve/mr_local_api.hpp b/src/buildtool/execution_api/serve/mr_local_api.hpp index 813d164b..f930bc46 100644 --- a/src/buildtool/execution_api/serve/mr_local_api.hpp +++ b/src/buildtool/execution_api/serve/mr_local_api.hpp @@ -69,10 +69,13 @@ class MRLocalApi final : public IExecutionApi { IExecutionApi const* /*alternative*/ = nullptr) const noexcept -> bool final; + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& /*artifacts_info*/, std::vector<int> const& /*fds*/, - bool /*raw_tree*/) const noexcept -> bool final { + bool /*raw_tree*/, + IExecutionApi const* /*alternative*/ = nullptr) const noexcept + -> bool final { // Retrieval to file descriptors not supported return false; } |