Jun 12, 2023
This is a known issue with Airflow, reported in 2.4
https://github.com/apache/airflow/issues/26760
And this happens since airflow code used set to get the distinct failed task instances. Since set is unordered, it does not result in a consistently ordered values. This set is then converted to list and takes the last element (-1 index).