vandonr opened a new pull request, #38155:
URL: https://github.com/apache/airflow/pull/38155

   I was going to ask this as a question, but decided to do it as a PR instead 
given how simple the change is.
   
   I was writing a listener, and it seems extremely hard to get some 
information on the error in the `on_task_instance_failed` callback, because the 
error is not passed as a parameter to the callback itself :disappointed:
   
   It's [written to the 
context](https://github.com/apache/airflow/blob/9e97433dc3368138431305c5161a007e4fc5f227/airflow/models/taskinstance.py#L2809-L2810)
 a bit further down, but we don't have that yet when the callback is called.
   
   We cannot add an extra parameter now because it'd be a breaking change, but 
what do you think about storing the error in the TaskInstance object before 
calling `on_task_instance_failed` ? It'd be a pretty cheap way to solve that 
issue (if it's one!). We don't need to persist that in DB or anything, it just 
needs to carry the value to the method call that just follows, seems simple 
enough ?


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