Lee-W commented on code in PR #66573:
URL: https://github.com/apache/airflow/pull/66573#discussion_r3257385678
##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -475,6 +475,40 @@ def send_side_effect(msg=None, **kwargs):
assert error is None
+def test_run_exits_nonzero_when_failure_terminal_send_fails(create_runtime_ti,
mock_supervisor_comms):
+ """
+ When the task FAILS and the terminal-state send to the supervisor fails too
+ (e.g. broken Unix socket / supervisor crashed / IPC channel dead), `run()`
+ must not silently swallow it: the supervisor's `final_state` property
+ defaults exit_code-0-with-no-terminal-state to SUCCESS, which would turn
+ a transient IPC blip into a silent data-quality bug downstream. Exit
+ non-zero so the supervisor classifies this as FAILED / UP_FOR_RETRY.
+ """
+ from airflow.sdk.execution_time.task_runner import run
Review Comment:
It's already imported.
--
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]