Follow-up of https://github.com/apache/airflow/pull/44241 to handle Task retries i.e. checking max retries, setting correct state etc