Skip to content

Commit d060bb2

Browse files
themarwhalfacebook-github-bot
authored andcommitted
docs: Add generated docs for CommandExecutorConfig
Summary: Looks like function parameter docs are not supported in Rust: rust-lang/rust#57525 Move them up so that they are displayed as in our docs, would be nice to move it back once it is supported. Differential Revision: D44629092 fbshipit-source-id: 6124f70f2e31ddc9d268e5aedbc674a42f994add
1 parent f47e418 commit d060bb2

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

app/buck2_build_api/src/interpreter/rule_defs/command_executor_config.rs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,48 +60,49 @@ impl<'v> StarlarkValue<'v> for StarlarkCommandExecutorConfig {
6060

6161
#[starlark_module]
6262
pub fn register_command_executor_config(builder: &mut GlobalsBuilder) {
63+
/// Contains configurations for how actions should be executed
64+
///
65+
/// * `local_enabled` : Whether to use local execution for this execution platform.
66+
/// If both remote_enabled and local_enabled are `True`, we will use the hybrid executor
67+
/// * `remote_enabled`: Whether to use remote execution for this execution platform
68+
/// * `remote_cache_enabled`: Whether to query RE caches
69+
/// * `remote_execution_properties`: Properties for remote execution for this platform
70+
/// * `remote_execution_action_key`: A component to inject into the action key
71+
/// This should typically used to inject variability into the action key so that
72+
/// it's different across e.g. build modes (RE uses the action key for things like expected memory utilization)
73+
/// * `remote_execution_max_input_files_mebibytes`: The maximum input file size (in bytes) that remote execution can support
74+
/// * `remote_execution_queue_time_threshold_s`: The maximum time in seconds we are willing to wait
75+
/// in the RE queue for remote execution to start running our action
76+
/// * `remote_execution_use_case`: The use case to use when communicating with RE
77+
/// * `use_limited_hybrid`: Whether to use the limited hybrid executor
78+
/// * `allow_limited_hybrid_fallbacks`: Whether to allow fallbacks
79+
/// * `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)
80+
/// * `use_windows_path_separators`: Whether to use Windows path separators in command line arguments
81+
/// * `allow_cache_uploads`: Whether to upload local actions to the RE cache
82+
/// * `max_cache_upload_mebibytes`: Maximum size to upload in cache uploads
83+
/// * `experimental_low_pass_filter`: Whether to use the experimental low pass filter
84+
/// * `remote_output_paths`: How to express output paths to RE
6385
#[starlark(type = "command_executor_config")]
6486
fn CommandExecutorConfig<'v>(
65-
// Whether to use local execution for this execution platform. If both
66-
// remote_enabled and local_enabled are `True`, we will use the hybrid executor.
6787
local_enabled: bool,
68-
// Whether to use remote execution for this execution platform
6988
remote_enabled: bool,
70-
// Whether to query RE caches.
7189
#[starlark(default = NoneOr::None, require = named)] remote_cache_enabled: NoneOr<bool>,
72-
// properties for remote execution for this platform
7390
#[starlark(default = NoneType, require = named)] remote_execution_properties: Value<'v>,
74-
// A component to inject into the action key. This should typically used to inject variability
75-
// into the action key so that it's different across e.g. build modes (RE uses the action key
76-
// for things like expected memory utilization).
7791
#[starlark(default = NoneType, require = named)] remote_execution_action_key: Value<'v>,
78-
// The maximum input file size (in bytes) that remote execution can support.
7992
#[starlark(default = NoneOr::None, require = named)]
8093
remote_execution_max_input_files_mebibytes: NoneOr<i32>,
81-
// The maximum time in seconds we are willing to wait in the
82-
// RE queue for remote execution to start running our action.
8394
#[starlark(default = NoneOr::None, require = named)]
8495
remote_execution_queue_time_threshold_s: NoneOr<i32>,
85-
// The use case to use when communicating with RE.
8696
#[starlark(default = NoneType, require = named)] remote_execution_use_case: Value<'v>,
87-
// Whether to use the limited hybrid executor
8897
#[starlark(default = false, require = named)] use_limited_hybrid: bool,
89-
// Whether to allow fallbacks
9098
#[starlark(default = false, require = named)] allow_limited_hybrid_fallbacks: bool,
91-
// Whether to allow fallbacks when the result is failure (i.e. the command failed on the
92-
// primary, but the infra worked).
9399
#[starlark(default = false, require = named)] allow_hybrid_fallbacks_on_failure: bool,
94-
// Whether to use Windows path separators in command line arguments.
95100
#[starlark(default = false, require = named)] use_windows_path_separators: bool,
96-
// Whether to upload local actions to the RE cache
97101
#[starlark(default = false, require = named)] allow_cache_uploads: bool,
98-
// Maximum size to upload in cache uploads
99102
#[starlark(default = NoneOr::None, require = named)] max_cache_upload_mebibytes: NoneOr<
100103
i32,
101104
>,
102-
// Whether to use the experimental low pass filter.
103105
#[starlark(default = false, require = named)] experimental_low_pass_filter: bool,
104-
// How to express output paths to RE.
105106
#[starlark(default = NoneOr::None, require = named)] remote_output_paths: NoneOr<&str>,
106107
heap: &'v Heap,
107108
) -> anyhow::Result<Value<'v>> {

0 commit comments

Comments
 (0)