Skip to content

Commit

Permalink
refactor orchestrator; move executor_config higher in the stack
Browse files Browse the repository at this point in the history
Summary: as per title

Reviewed By: IanChilds

Differential Revision: D65820852

fbshipit-source-id: 46baf560e6542962a3e46f62e6c2c47e762e150e
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Nov 16, 2024
1 parent 198dbe8 commit 3e999bc
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions app/buck2_test/src/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,16 +1125,9 @@ impl<'b> BuckTestOrchestrator<'b> {
async fn get_command_executor(
dice: &mut DiceComputations<'_>,
fs: &ArtifactFs,
test_target_node: &ConfiguredTargetNode,
executor_override: Option<&CommandExecutorConfig>,
executor_config: &CommandExecutorConfig,
stage: &TestStage,
) -> anyhow::Result<CommandExecutor> {
let executor_config = &Self::executor_config_with_remote_cache_override(
test_target_node,
executor_override,
&stage,
)?;

let CommandExecutorResponse {
executor,
platform,
Expand Down Expand Up @@ -1238,15 +1231,15 @@ impl<'b> BuckTestOrchestrator<'b> {
None => test_info.default_executor().map(|o| &o.0),
};

Self::get_command_executor(
dice,
fs,
let executor_config = Self::executor_config_with_remote_cache_override(
&node,
resolved_executor_override.as_ref().map(|a| &***a),
stage,
)
.await
.context("Error constructing CommandExecutor")
&stage,
)?;

Self::get_command_executor(dice, fs, &executor_config, stage)
.await
.context("Error constructing CommandExecutor")
}

async fn expand_test_executable<'a>(
Expand Down

0 comments on commit 3e999bc

Please sign in to comment.