From 03f948f4b10e916052a2234448b6658b80ee9143 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 1 Aug 2024 10:26:13 +0200 Subject: Execution API: support cwd ... following the remote-execution standard that all output paths (but none of the input paths) are relative to the working directory. Therefore, the executor has to do the path translation. For our implementation of the API interface - the local API now handles cwd correctly, - the remote API forwards cwd correctly, and - the git API continues to report actions as not implemented. --- src/buildtool/execution_api/remote/bazel/bazel_action.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_action.cpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp index 4190ea19..dcbddb8d 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp @@ -26,6 +26,7 @@ BazelAction::BazelAction( std::shared_ptr network, bazel_re::Digest root_digest, std::vector command, + std::string cwd, std::vector output_files, std::vector output_dirs, std::map const& env_vars, @@ -33,6 +34,7 @@ BazelAction::BazelAction( : network_{std::move(network)}, root_digest_{std::move(root_digest)}, cmdline_{std::move(command)}, + cwd_{std::move(cwd)}, output_files_{std::move(output_files)}, output_dirs_{std::move(output_dirs)}, env_vars_{BazelMsgFactory::CreateMessageVectorFromMap< @@ -122,6 +124,7 @@ auto BazelAction::CreateBundlesForAction(BazelBlobContainer* blobs, } BazelMsgFactory::ActionDigestRequest request{ .command_line = &cmdline_, + .cwd = &cwd_, .output_files = &output_files_, .output_dirs = &output_dirs_, .env_vars = &env_vars_, -- cgit v1.2.3