From be35134690b95efc492407e416a069d9c0389622 Mon Sep 17 00:00:00 2001 From: Alexey Kozhevnikov Date: Thu, 15 Aug 2024 15:38:50 -0700 Subject: [PATCH] never allow fallback on resource exhausted Reviewed By: JakobDegen Differential Revision: D61268688 fbshipit-source-id: 8bb9cfe0fdfa1e6400dab4e402725417be9783ac --- .../src/executors/hybrid.rs | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/app/buck2_execute_impl/src/executors/hybrid.rs b/app/buck2_execute_impl/src/executors/hybrid.rs index c65b9c5035dae..a010b2a027106 100644 --- a/app/buck2_execute_impl/src/executors/hybrid.rs +++ b/app/buck2_execute_impl/src/executors/hybrid.rs @@ -243,12 +243,7 @@ where CommandExecutionStatus::Error { typ: CommandExecutionErrorType::StorageResourceExhausted, .. - } => { - ignore_fallback_tracker - || self - .fallback_tracker - .can_fallback_when_storage_resource_exhausted() - } + } => ignore_fallback_tracker, // Errors are infra errors and are always retried because that is the point of // falling back. CommandExecutionStatus::Error { .. } => { @@ -549,23 +544,6 @@ impl FallbackTracker { } } - pub fn can_fallback_when_storage_resource_exhausted(&self) -> bool { - #[cfg(all(fbcode_build, target_os = "linux"))] - if hostcaps::is_prod() { - justknobs::eval( - "buck2/buck2:allow_storage_resource_exhausted_fallback", - None, - None, - ) - .unwrap_or(false) - } else { - false - } - - #[cfg(not(all(fbcode_build, target_os = "linux")))] - false - } - pub fn can_fallback(&self) -> bool { let retried = self.count_fallbacks.fetch_add(1, Ordering::Relaxed);