dlamblin commented on issue #51402:
URL: https://github.com/apache/airflow/issues/51402#issuecomment-4489993843

   Hi, I know it's closed, as are its similar issues, but is there some work 
around to get the `on_failure_handler` to be able to use the `log_url` of the 
task instance or the `email_on_failure=True` to work with the default email 
body that includes the `mark_success_url`?
   
   TLDR: Where can I get a list of what is or is not on task_instance at that 
time?
   
   Right now AWS MWAA only provides 3.0.6 of the 3 familiy. And I see signs in 
this search that this affects 3.0 and 3.1, I would love to see a link to the 
fixes in 3.x that address it. 
https://github.com/apache/airflow/issues?q=sort%3Aupdated-desc%20is%3Aissue%20mark_success_url
   
   I also tried to work my way through what's going on here. The 
[TaskRunner](https://github.com/apache/airflow/blob/3.0.6/task-sdk/src/airflow/sdk/execution_time/task_runner.py#L48)
 in task.sdk is using a model of TaskInstance that is not the one [from Airflow 
core](https://github.com/apache/airflow/blob/3.1.0/airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py#L241)
 but rather imported from 
[_generated](https://github.com/apache/airflow/blob/3.0.6/task-sdk/src/airflow/sdk/api/datamodels/_generated.py#L391)
 And I can't quite see where `log_url` and `mark_success_url` are dropped from 
those, but they are. Then the default email handler body gets an exception when 
rendering with `mark_success_url` which at least is logged, while my 
`on_failure_handler` that uses the `log_url` is failing silently without 
leaving a trace in the logs. I think I can fix the logging to occur, and remove 
the references, but… Where can I get a list of what is or is not on task_ins
 tance at that time?


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