From cacf57fd8d26f79bab2ce2ac3d3324e64f1281ab Mon Sep 17 00:00:00 2001 From: DABH Date: Thu, 10 Sep 2026 01:33:37 -0500 Subject: [PATCH 1/2] Raise the dev server's default workflow task timeout in tests Most recent macOS CI failures share one trigger: the worker process stalls for 10-30s, the first workflow task exceeds the server's 10s default timeout, and the retry breaks tests in test-specific ways (attempt-dependent assertions, and the server's fail-fast for updates and queries once the attempt counter reaches 3). Give the local dev server a 60s default so test workflows tolerate a stall unless they opt into a short task timeout. --- tests/conftest.py | 3 +++ tests/worker/test_workflow.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3c02d8d18..4b97ef72a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -145,6 +145,9 @@ async def env(env_type: str) -> AsyncGenerator[WorkflowEnvironment, None]: dev_server_extra_args=[ "--dynamic-config-value", "system.forceSearchAttributesCacheRefreshOnRead=true", + # Keep a stalled first workflow task from timing out and retrying on slow CI + "--dynamic-config-value", + 'history.defaultWorkflowTaskTimeout="60s"', "--dynamic-config-value", f"limit.historyCount.suggestContinueAsNew={CONTINUE_AS_NEW_SUGGEST_HISTORY_COUNT}", "--dynamic-config-value", diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 42ba0b69c..5d3b37099 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -258,7 +258,7 @@ async def test_workflow_info(client: Client, env: WorkflowEnvironment): assert uuid.UUID(info["run_id"]).version == 7 assert info["run_timeout"] is None assert info["task_queue"] == worker.task_queue - assert info["task_timeout"] == "0:00:10" + assert info["task_timeout"] == "0:01:00" assert info["workflow_id"] == workflow_id assert info["workflow_type"] == "InfoWorkflow" From 25a9d03b1a42d65bb1cc052744e869899acf90a3 Mon Sep 17 00:00:00 2001 From: DABH Date: Thu, 10 Sep 2026 02:09:38 -0500 Subject: [PATCH 2/2] Expect the 60s task timeout default only on the local dev server --- tests/worker/test_workflow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 5d3b37099..fb47f2f12 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -227,7 +227,7 @@ async def run(self) -> dict: return json.loads(json.dumps(ret, default=str)) -async def test_workflow_info(client: Client, env: WorkflowEnvironment): +async def test_workflow_info(client: Client, env: WorkflowEnvironment, env_type: str): # TODO(cretz): Fix if env.supports_time_skipping: pytest.skip( @@ -258,7 +258,8 @@ async def test_workflow_info(client: Client, env: WorkflowEnvironment): assert uuid.UUID(info["run_id"]).version == 7 assert info["run_timeout"] is None assert info["task_queue"] == worker.task_queue - assert info["task_timeout"] == "0:01:00" + # Only the local dev server gets the 60s default from tests/conftest.py + assert info["task_timeout"] == ("0:01:00" if env_type == "local" else "0:00:10") assert info["workflow_id"] == workflow_id assert info["workflow_type"] == "InfoWorkflow"