From e51a6938e536d8bb7904d7c54eb729925fc08417 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Mon, 29 Aug 2022 11:58:04 +0200 Subject: Introduced RetrieveToCas function in IExecutionApi to synchronize artifacts between different CASes --- src/buildtool/execution_api/common/execution_api.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/buildtool/execution_api/common/execution_api.hpp') diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 661ecbf3..68d4b4cb 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -61,6 +61,13 @@ class IExecutionApi { std::vector const& fds, bool raw_tree) noexcept -> bool = 0; + /// \brief Synchronization of artifacts between two CASes. Retrieves + /// artifacts from one CAS and writes to another CAS. Tree artifacts are + /// resolved and its containing file artifacts are recursively retrieved. + [[nodiscard]] virtual auto RetrieveToCas( + std::vector const& artifacts_info, + gsl::not_null const& api) noexcept -> bool = 0; + /// \brief Upload blobs to CAS. Uploads only the blobs that are not yet /// available in CAS, unless `skip_find_missing` is specified. /// \param blobs Container of blobs to upload. -- cgit v1.2.3