Skip to main content

CommandExecutorConfig

def CommandExecutorConfig(
*,
local_enabled: bool,
remote_enabled: bool,
remote_cache_enabled: None | bool = None,
remote_dep_file_cache_enabled: bool = False,
remote_execution_properties = None,
remote_execution_action_key = None,
remote_execution_max_input_files_mebibytes: None | int = None,
remote_execution_queue_time_threshold_s: None | int = None,
remote_execution_use_case = None,
use_limited_hybrid: bool = False,
allow_limited_hybrid_fallbacks: bool = False,
allow_hybrid_fallbacks_on_failure: bool = False,
use_windows_path_separators: bool = False,
use_persistent_workers: bool = False,
use_bazel_protocol_remote_persistent_workers: bool = False,
allow_cache_uploads: bool = False,
max_cache_upload_mebibytes: None | int = None,
experimental_low_pass_filter: bool = False,
remote_output_paths: None | str = None,
remote_execution_resource_units: None | int = None,
remote_execution_dependencies: list[dict[str, str]] = [],
remote_execution_gang_workers: list[dict[str, str]] = [],
remote_execution_dynamic_image = None,
meta_internal_extra_params: None | dict = None,
priority: None | int = None,
) -> CommandExecutorConfig

Contains configurations for how actions should be executed

  • local_enabled : Whether to use local execution for this execution platform. If both remote_enabled and local_enabled are True, we will use the hybrid executor
  • remote_enabled: Whether to use remote execution for this execution platform
  • remote_cache_enabled: Whether to query RE caches
  • remote_execution_properties: Properties for remote execution for this platform
  • remote_execution_action_key: A component to inject into the action key This should typically used to inject variability into the action key so that it's different across e.g. build modes (RE uses the action key for things like expected memory utilization)
  • remote_execution_max_input_files_mebibytes: The maximum input file size (in bytes) that remote execution can support
  • remote_execution_queue_time_threshold_s: The maximum time in seconds we are willing to wait in the RE queue for remote execution to start running our action
  • remote_execution_use_case: The use case to use when communicating with RE
  • use_limited_hybrid: Whether to use the limited hybrid executor
  • allow_limited_hybrid_fallbacks: Whether to allow fallbacks
  • allow_hybrid_fallbacks_on_failure: Whether to allow fallbacks when the result is failure (i.e. the command failed on the primary, but the infra worked)
  • use_windows_path_separators: Whether to use Windows path separators in command line arguments
  • use_persistent workers: Whether to use persistent workers for local execution if they are available
  • use_bazel_protocol_remote_persistent_workers: Whether to use persistent workers for remote execution via the Bazel remote persistent worker protocol if they are available
  • allow_cache_uploads: Whether to upload local actions to the RE cache
  • max_cache_upload_mebibytes: Maximum size to upload in cache uploads
  • experimental_low_pass_filter: Whether to use the experimental low pass filter
  • remote_output_paths: How to express output paths to RE
  • remote_execution_resource_units: The resources (eg. GPUs) to use for remote execution
  • remote_execution_dependencies: Dependencies for remote execution for this platform
  • remote_execution_gang_workers: Gang workers for gang scheduling in remote execution (enumerated gang spec)
  • remote_execution_custom_image: Custom Tupperware image for remote execution for this platform
  • meta_internal_extra_params: Json dict of extra params to pass to RE related to Meta internal infra. Supports the following keys:
    • remote_execution_policy: Policy settings for remote execution
    • remote_execution_caf_fbpkgs: CAF fbpkgs configuration
    • remote_execution_gang: Constrained gang for gang scheduling in remote execution. A dict with keys:
      • capabilities: A dict of capability key-value pairs (required)
      • num_of_workers: Number of workers in the gang (required, integer)
      • locality: Optional locality constraint ("region", "datacenter", or "network_domain") Note: mutually exclusive with remote_execution_gang_workers
  • priority: The priority for remote execution requests. The exact interpretation is up to the RE server. See the Bazel Remote Execution API for recommended interpretation: https://github.com/bazelbuild/remote-apis/blob/main/build/bazel/remote/execution/v2/remote_execution.proto#L1499