0bprashanthc opened a new issue, #27862: URL: https://github.com/apache/airflow/issues/27862
### Apache Airflow version Other Airflow 2 version (please specify below) ### What happened airflow version == `2.4.0` ``` task_instance: taskinstance.TaskInstance = context["ti"] task_status = task_instance.current_state() ``` task_status from the above code is returned as "running" when task is failed. It's strange as I see task itself has been marked as failed and also callback gets triggered after failure, but when trying to read the task instance's state it's not as expected. ### What you think should happen instead task instance should be correctly set to success/failure when trying to read from the callback. ### How to reproduce make an airflow task raise an exception and have the task instance marked as `failed` and try to read the task instance state within the callback. ### Operating System rhel 7.6 ### Versions of Apache Airflow Providers apache-airflow==2.4.0 apache-airflow-providers-celery==3.0.0 apache-airflow-providers-common-sql==1.2.0 apache-airflow-providers-ftp==3.1.0 apache-airflow-providers-http==4.0.0 apache-airflow-providers-imap==3.0.0 apache-airflow-providers-postgres==5.2.1 apache-airflow-providers-sqlite==3.2.1 ### Deployment Other ### Deployment details standard airflow running with postgres backend ### Anything else _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
