From d7277b8798d289765bb324b08d24d5e44fc005ab Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Tue, 18 Nov 2025 13:28:23 -0500 Subject: [PATCH 1/2] Remove check to decrease breaks --- crates/common/src/worker.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/common/src/worker.rs b/crates/common/src/worker.rs index df81f6a2a..955598fc1 100644 --- a/crates/common/src/worker.rs +++ b/crates/common/src/worker.rs @@ -311,17 +311,6 @@ impl WorkerConfigBuilder { return Err("`max_outstanding_nexus_tasks` must be > 0".to_owned()); } - // Validate workflow cache is consistent with task_types - if !task_types.enable_workflows - && let Some(cache) = self.max_cached_workflows.as_ref() - && *cache > 0 - { - return Err( - "Cannot have `max_cached_workflows` > 0 when workflows are not enabled in `task_types`" - .to_owned(), - ); - } - if let Some(cache) = self.max_cached_workflows.as_ref() && *cache > 0 { From c882a37e877d2751585085620244807c644c28cd Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Tue, 18 Nov 2025 13:39:06 -0500 Subject: [PATCH 2/2] remove test for this check --- crates/common/tests/worker_task_types_test.rs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/crates/common/tests/worker_task_types_test.rs b/crates/common/tests/worker_task_types_test.rs index 8495a52f0..fdfddd26d 100644 --- a/crates/common/tests/worker_task_types_test.rs +++ b/crates/common/tests/worker_task_types_test.rs @@ -49,27 +49,6 @@ fn test_empty_task_types_fails_validation() { ); } -#[test] -fn test_workflow_cache_without_workflows_fails() { - let result = WorkerConfigBuilder::default() - .namespace("default") - .task_queue("test-queue") - .versioning_strategy(default_versioning_strategy()) - .task_types(WorkerTaskTypes::activity_only()) - .max_cached_workflows(10usize) - .build(); - - assert!( - result.is_err(), - "Workflow cache > 0 without workflows should fail" - ); - let err = result.err().unwrap().to_string(); - assert!( - err.contains("max_cached_workflows"), - "Error should mention max_cached_workflows: {err}", - ); -} - #[test] fn test_all_combinations() { let combinations = [