From f821e6b70c59037384ac6afb3a44517fe46953e6 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 12 Sep 2023 17:59:20 +0200 Subject: just serve: add remote execution endpoint and --fetch-absent option The serve service will communicate with this endpoint when needed, as well as ensure artifacts it provides are synced with the remote execution CAS, if requested by the client. If just-mr is given the --fetch-absent option, it Always produce present roots irrespective of the 'absent' pragma. For Git repositories marked with the 'absent' pragma, first try to fetch any commit trees provided by the serve endpoint from the execution endpoint CAS, before reverting to a network fetch. Co-authored-by: Klaus Aehlig Co-authored-by: Alberto Sartori --- src/other_tools/root_maps/commit_git_map.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/other_tools/root_maps/commit_git_map.hpp') diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp index 00a607cb..4f59a56f 100644 --- a/src/other_tools/root_maps/commit_git_map.hpp +++ b/src/other_tools/root_maps/commit_git_map.hpp @@ -19,9 +19,11 @@ #include #include "nlohmann/json.hpp" +#include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" #include "src/other_tools/just_mr/utils.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" +#include "src/other_tools/ops_maps/import_to_git_map.hpp" #include "src/utils/cpp/hash_combine.hpp" struct GitRepoInfo { @@ -66,10 +68,14 @@ using CommitGitMap = [[nodiscard]] auto CreateCommitGitMap( gsl::not_null const& critical_git_op_map, + gsl::not_null const& import_to_git_map, JustMR::PathsPtr const& just_mr_paths, std::string const& git_bin, std::vector const& launcher, ServeApi* serve_api, + IExecutionApi* local_api, + IExecutionApi* remote_api, + bool fetch_absent, std::size_t jobs) -> CommitGitMap; #endif // INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_COMMIT_GIT_MAP_HPP -- cgit v1.2.3