amoghrajesh commented on code in PR #44241:
URL: https://github.com/apache/airflow/pull/44241#discussion_r1856680316


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -159,8 +160,23 @@ def run(ti: RuntimeTaskInstance, log: Logger):
         # TODO next_method to support resuming from deferred
         # TODO: Get a real context object
         ti.task.execute({"task_instance": ti})  # type: ignore[attr-defined]
-    except TaskDeferred:
-        ...
+    except TaskDeferred as defer:
+        trigger = Trigger.from_object(defer.trigger)

Review Comment:
   It is needed because the `trigger` object provides the classpath, timeout 
and the kwargs from the exception. Done similarly in 
https://github.com/apache/airflow/blob/acf106b5a174aa8a0b27542c34e355a3ac0ef39e/airflow/models/taskinstance.py#L1631-L1634



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to