amoghrajesh commented on code in PR #44241:
URL: https://github.com/apache/airflow/pull/44241#discussion_r1857898121
##########
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:
Phew ok I was able to handle it from the server side.
1. Removed the classpath logic from the client (task sdk) to handle in
server
https://github.com/apache/airflow/pull/44241/files#diff-477f681a6f58844bfd604e61bd80ebe2dee0158d15c6e01699d20725738d9bbfR166
2. Since we can import exceptions in server and client, decided there's no
real need to handle this in client and send it further, so handled in server
directly by creating a dummy TaskDeferred exception, serialised it, and
extracted the classpath out of it:
https://github.com/apache/airflow/pull/44241/files#diff-d44a72566870079ee943e24bac2af74fb84c426c54d210561a251549a7078ed7R137-R149
--
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]