diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-09-12 17:59:20 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-09-15 14:42:47 +0200 |
commit | f821e6b70c59037384ac6afb3a44517fe46953e6 (patch) | |
tree | 58334f832d4265afe8552c4cf542dcd41a7e75f6 /src/buildtool/serve_api/remote/serve_api.cpp | |
parent | 7f5e729b76865bbf01d1405b08f3292cee4e0e20 (diff) | |
download | justbuild-f821e6b70c59037384ac6afb3a44517fe46953e6.tar.gz |
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 <klaus.aehlig@huawei.com>
Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
Diffstat (limited to 'src/buildtool/serve_api/remote/serve_api.cpp')
-rw-r--r-- | src/buildtool/serve_api/remote/serve_api.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/serve_api/remote/serve_api.cpp b/src/buildtool/serve_api/remote/serve_api.cpp index 67b5a8d4..7b57d7d0 100644 --- a/src/buildtool/serve_api/remote/serve_api.cpp +++ b/src/buildtool/serve_api/remote/serve_api.cpp @@ -24,7 +24,8 @@ ServeApi::ServeApi(ServeApi&& other) noexcept = default; ServeApi::~ServeApi() = default; auto ServeApi::RetrieveTreeFromCommit(std::string const& commit, - std::string const& subdir) + std::string const& subdir, + bool sync_tree) -> std::optional<std::string> { - return tlc_->ServeCommitTree(commit, subdir); + return tlc_->ServeCommitTree(commit, subdir, sync_tree); } |