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 --- test/buildtool/serve_api/target_level_cache_client.test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/buildtool/serve_api/target_level_cache_client.test.cpp') diff --git a/test/buildtool/serve_api/target_level_cache_client.test.cpp b/test/buildtool/serve_api/target_level_cache_client.test.cpp index 00c3e493..972d57eb 100644 --- a/test/buildtool/serve_api/target_level_cache_client.test.cpp +++ b/test/buildtool/serve_api/target_level_cache_client.test.cpp @@ -35,34 +35,34 @@ TEST_CASE("Serve service client: tree-of-commit request", "[serve_api]") { ServeTargetLevelCacheClient tlc_client(info->host, info->port); SECTION("Commit in bare checkout") { - auto root_id = tlc_client.ServeCommitTree(kRootCommit, "."); + auto root_id = tlc_client.ServeCommitTree(kRootCommit, ".", false); REQUIRE(root_id); CHECK(root_id.value() == kRootId); - auto baz_id = tlc_client.ServeCommitTree(kRootCommit, "baz"); + auto baz_id = tlc_client.ServeCommitTree(kRootCommit, "baz", false); REQUIRE(baz_id); CHECK(baz_id.value() == kBazId); } SECTION("Commit in non-bare checkout") { - auto root_id = tlc_client.ServeCommitTree(kRootSymCommit, "."); + auto root_id = tlc_client.ServeCommitTree(kRootSymCommit, ".", false); REQUIRE(root_id); CHECK(root_id.value() == kRootSymId); - auto baz_id = tlc_client.ServeCommitTree(kRootSymCommit, "baz"); + auto baz_id = tlc_client.ServeCommitTree(kRootSymCommit, "baz", false); REQUIRE(baz_id); CHECK(baz_id.value() == kBazSymId); } SECTION("Subdir not found") { auto root_id = - tlc_client.ServeCommitTree(kRootCommit, "does_not_exist"); + tlc_client.ServeCommitTree(kRootCommit, "does_not_exist", false); CHECK_FALSE(root_id); } SECTION("Commit not known") { auto root_id = tlc_client.ServeCommitTree( - "0123456789abcdef0123456789abcdef01234567", "."); + "0123456789abcdef0123456789abcdef01234567", ".", false); CHECK_FALSE(root_id); } } -- cgit v1.2.3