1fanwang commented on code in PR #66405:
URL: https://github.com/apache/airflow/pull/66405#discussion_r3678858914


##########
shared/listeners/src/airflow_shared/listeners/spec/taskinstance.py:
##########
@@ -52,8 +53,31 @@ def on_task_instance_failed(
     previous_state: TaskInstanceState | None,
     task_instance: RuntimeTaskInstance | TaskInstance,
     error: None | str | BaseException,
+    failure_kind: TaskFailureKind | None,
+    reason: str | None,
 ):
-    """Execute when task state changes to FAIL. previous_state can be None."""
+    """
+    Execute when task state changes to FAIL. previous_state can be None.
+
+    :param previous_state: Previous state of the task instance (can be None)
+    :param task_instance: The task instance object
+    :param error: The exception that caused the failure (or human-readable
+        message string for API-driven manual transitions)
+    :param failure_kind: What caused the failure: a :class:`TaskFailureKind`
+        (``INFRA`` / ``APPLICATION`` / ``TIMEOUT`` / ``MANUAL``), or ``None`` 
when
+        the cause was not classified.

Review Comment:
   should `the cause was not classified.` be a typed `UNCLASSIFIED` or 
`UNKNOWN` instead of None?



-- 
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