GitHub user martenbloch created a discussion: TaskInstance State Change Events 
- on_task_instance_success not triggered when marking a task instance as 
success from the Airflow UI

Hi,

I created airflow listener(Airflow 3.1.3) that implements 
on_task_instance_success. I see that this event is not triggered when I mark a 
task instance as success from the Airflow UI(see attachment). According to the 
documentation: 
https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/listeners.html
 it should be possible.

For sure listener is implemented correctly, that is if I run a task that finish 
with success I see that on_task_instance_success is executed(added simple print 
- visible in task log). Problem shows up when task fails and then from UI I 
want to mark it as success - I do not see my log. I also checked scheduler and 
worker logs to be sure that my log did not go some other path.

For tests I used airflow docker compose.


Thanks in advance for any response.

<img width="231" height="123" alt="mark_task_as_success" 
src="https://github.com/user-attachments/assets/9626cc5a-c7c0-4cda-bb26-803a79d670d5";
 />





GitHub link: https://github.com/apache/airflow/discussions/59706

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to