From 1adf3ea9c28b1b72eb7e56ef4027d2aee200042e Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 5 Jul 2022 16:56:32 +0200 Subject: Make remote endpoint specification part of analysis The remote execution endpoint shards the target-level cache; still, for analysis, we want to specify a particular target-level cache, e.g., to analyse the inputs of a particular action that failed remotely. Note that the action identifier depends on the target-level cache in question, due to the extensional projection implicit in target-level caching. --- src/buildtool/common/cli.hpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/buildtool/common/cli.hpp') diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index e677924c..4e1d86da 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -56,16 +56,16 @@ struct DiagnosticArguments { std::optional dump_nodes{std::nullopt}; }; -/// \brief Arguments required for specifying cache/build endpoint. +/// \brief Arguments required for specifying build endpoint. struct EndpointArguments { std::optional local_root{}; std::optional remote_execution_address; + std::vector platform_properties; }; /// \brief Arguments required for building. struct BuildArguments { std::optional> local_launcher{std::nullopt}; - std::vector platform_properties; std::chrono::milliseconds timeout{kDefaultTimeout}; std::size_t build_jobs{}; std::optional dump_artifacts{std::nullopt}; @@ -254,6 +254,14 @@ static inline auto SetupEndpointArguments( clargs->remote_execution_address, "Address of the remote execution service.") ->type_name("NAME:PORT"); + app->add_option( + "--remote-execution-property", + clargs->platform_properties, + "Property for remote execution as key-value pair. Specifying this " + "option multiple times will accumulate pairs (latest wins).") + ->type_name("KEY:VAL") + ->allow_extra_args(false) + ->expected(1, 1); } static inline auto SetupBuildArguments( @@ -271,15 +279,6 @@ static inline auto SetupBuildArguments( ->type_name("JSON") ->default_val(nlohmann::json{"env", "--"}.dump()); - app->add_option( - "--remote-execution-property", - clargs->platform_properties, - "Property for remote execution as key-value pair. Specifying this " - "option multiple times will accumulate pairs (latest wins).") - ->type_name("KEY:VAL") - ->allow_extra_args(false) - ->expected(1, 1); - app->add_option_function( "--action-timeout", [clargs](auto const& seconds) { -- cgit v1.2.3