From 9adfc6daa1a982b6c2bc7b84b6fbc10795dc5609 Mon Sep 17 00:00:00 2001 From: ntaylorkhan <133708619+ntaylorkhan@users.noreply.github.com> Date: Wed, 15 Oct 2025 10:40:13 -0700 Subject: [PATCH 1/2] Modify code comment for Worker build_id field #1160 Solves #1160 by including language informing users that large codebase may result in long worker startup time when no build_id is given. --- temporalio/worker/_worker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/temporalio/worker/_worker.py b/temporalio/worker/_worker.py index 9850d32a7..f4de473cc 100644 --- a/temporalio/worker/_worker.py +++ b/temporalio/worker/_worker.py @@ -203,9 +203,11 @@ def __init__( interceptors already on the client that also implement :py:class:`Interceptor` are prepended to this list and should not be explicitly given here. - build_id: Unique identifier for the current runtime. This is best - set as a hash of all code and should change only when code does. - If unset, a best-effort identifier is generated. + build_id: A unique identifier for the current runtime, ideally provided as a + representation of the complete source code. If not explicitly set, the system + automatically generates a best-effort identifier by traversing and computing + hashes of all modules in the codebase. In very large codebases this automatic + process may significantly increase initialization time. Exclusive with `deployment_config`. WARNING: Deprecated. Use `deployment_config` instead. identity: Identity for this worker client. If unset, the client From bc51678618b26b42875f6eb6539ae6994f55acb5 Mon Sep 17 00:00:00 2001 From: Nelson Taylor Khan Date: Tue, 21 Oct 2025 16:40:14 -0700 Subject: [PATCH 2/2] Indent properly --- temporalio/worker/_worker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/temporalio/worker/_worker.py b/temporalio/worker/_worker.py index f4de473cc..fc2c2241d 100644 --- a/temporalio/worker/_worker.py +++ b/temporalio/worker/_worker.py @@ -203,11 +203,11 @@ def __init__( interceptors already on the client that also implement :py:class:`Interceptor` are prepended to this list and should not be explicitly given here. - build_id: A unique identifier for the current runtime, ideally provided as a - representation of the complete source code. If not explicitly set, the system - automatically generates a best-effort identifier by traversing and computing - hashes of all modules in the codebase. In very large codebases this automatic - process may significantly increase initialization time. + build_id: A unique identifier for the current runtime, ideally provided as a + representation of the complete source code. If not explicitly set, the system + automatically generates a best-effort identifier by traversing and computing + hashes of all modules in the codebase. In very large codebases this automatic + process may significantly increase initialization time. Exclusive with `deployment_config`. WARNING: Deprecated. Use `deployment_config` instead. identity: Identity for this worker client. If unset, the client