Skip to content

Commit

Permalink
Mark incompatible execution strategy as input error
Browse files Browse the repository at this point in the history
Summary: Incompatible execution strategy are currently not tagged and categorized as `null` in `buck2_errors` and `INFRA` in `buck2_builds` (Not sure why they are different). It seems like this is should be an input error, so categorizing it as such

Reviewed By: JakobDegen

Differential Revision: D62055209

fbshipit-source-id: 70945fefec5caf1603991c694d5db3bf008868e5
  • Loading branch information
Will-MingLun-Li authored and facebook-github-bot committed Sep 3, 2024
1 parent d93e4a5 commit fa2541e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/buck2_server/src/daemon/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use buck2_core::execution_types::executor_config::RemoteExecutorOptions;
use buck2_core::execution_types::executor_config::RemoteExecutorUseCase;
use buck2_core::fs::artifact_path_resolver::ArtifactFs;
use buck2_core::fs::project::ProjectRoot;
use buck2_error::BuckErrorContext;
use buck2_execute::execute::blocking::BlockingExecutor;
use buck2_execute::execute::cache_uploader::force_cache_upload;
use buck2_execute::execute::cache_uploader::NoOpCacheUploader;
Expand Down Expand Up @@ -174,7 +175,7 @@ impl HasCommandExecutor for CommandExecutorFactory {
return Err(anyhow::anyhow!(
"The desired execution strategy (`{:?}`) is incompatible with the local executor",
self.strategy,
));
)).input();
}

return Ok(CommandExecutorResponse {
Expand Down Expand Up @@ -397,9 +398,7 @@ impl HasCommandExecutor for CommandExecutorFactory {
};

let response = response
.with_context(|| format!(
"The desired execution strategy (`{:?}`) is incompatible with the executor config that was selected: {:?}",
self.strategy, executor_config))?;
.with_context(|| format!("The desired execution strategy (`{:?}`) is incompatible with the executor config that was selected: {:?}", self.strategy, executor_config)).input()?;

Ok(response)
}
Expand Down

0 comments on commit fa2541e

Please sign in to comment.