From b8d7531c6f268629c33d41a826e75b0902d39257 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Fri, 20 Feb 2026 10:23:37 -0700 Subject: [PATCH 1/2] Fix unbound variable in entity V1 processing --- durabletask/worker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/durabletask/worker.py b/durabletask/worker.py index 35174fe..442165d 100644 --- a/durabletask/worker.py +++ b/durabletask/worker.py @@ -740,21 +740,22 @@ def _execute_entity_batch( stub: Union[stubs.TaskHubSidecarServiceStub, ProtoTaskHubSidecarServiceStub], completionToken, ): + operation_infos: list[pb.OperationInfo] = [] if isinstance(req, pb.EntityRequest): req, operation_infos = helpers.convert_to_entity_batch_request(req) entity_state = StateShim(shared.from_json(req.entityState.value) if req.entityState.value else None) instance_id = req.instanceId + try: + entity_instance_id = EntityInstanceId.parse(instance_id) + except ValueError: + raise RuntimeError(f"Invalid entity instance ID '{instance_id}' in entity operation request.") results: list[pb.OperationResult] = [] for operation in req.operations: start_time = datetime.now(timezone.utc) executor = _EntityExecutor(self._registry, self._logger) - try: - entity_instance_id = EntityInstanceId.parse(instance_id) - except ValueError: - raise RuntimeError(f"Invalid entity instance ID '{instance_id}' in entity operation request.") operation_result = None From 3df190fac47eb7786c63db9a9e8c9d4e27df6e3f Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Fri, 20 Feb 2026 11:29:03 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5f1f8d..d4f27fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +FIXED: + +- Fix unbound variable in entity V1 processing + ## v1.3.0 ADDED