Copilot commented on code in PR #64568:
URL: https://github.com/apache/airflow/pull/64568#discussion_r3025333917
##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -1680,6 +1680,7 @@ def start( # type: ignore[override]
log = structlog.get_logger(logger_name="task")
state, msg, error = run(ti, context, log)
+ context["exception"] = error
finalize(ti, state, context, log, error)
Review Comment:
This change introduces/repairs behavior that ensures callbacks/handlers
receive `context["exception"]` during in-process execution, but there is no
regression test covering this path (i.e., `InProcessTestSupervisor.start()` /
`dag.test()` execution). Please add a test that runs a failing task via
`InProcessTestSupervisor` and asserts the failure callback receives the
expected `context["exception"]` value (and that it is absent/fails without the
fix).
--
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]