Flaky test here: 

TestPostClearTaskInstances.test_should_response_200_with_reset_dag_run

https://github.com/apache/airflow/pull/11809/checks?check_run_id=1301036003#step:6:1336

Looks like an easy to fix by allowing rows returned in reverse order as well

```
____ TestPostClearTaskInstances.test_should_response_200_with_reset_dag_run ____

self = <tests.api_connexion.endpoints.test_task_instance_endpoint.TestPostClearTaskInstances testMethod=test_should_response_200_with_reset_dag_run>
session = <sqlalchemy.orm.session.Session object at 0x7fdfc5b00790>

    @provide_session
    def test_should_response_200_with_reset_dag_run(self, session):
        dag_id = "example_python_operator"
        payload = {
            "dry_run": False,
            "reset_dag_runs": True,
            "only_failed": False,
            "only_running": True,
            "include_subdags": True,
        }
        task_instances = [
            {"execution_date": DEFAULT_DATETIME_1, "state": State.RUNNING},
            {
                "execution_date": DEFAULT_DATETIME_1 + dt.timedelta(days=1),
                "state": State.RUNNING,
            },
            {
                "execution_date": DEFAULT_DATETIME_1 + dt.timedelta(days=2),
                "state": State.RUNNING,
            },
            {
                "execution_date": DEFAULT_DATETIME_1 + dt.timedelta(days=3),
                "state": State.RUNNING,
            },
            {
                "execution_date": DEFAULT_DATETIME_1 + dt.timedelta(days=4),
                "state": State.RUNNING,
            },
        ]
    
        self.create_task_instances(
            session,
            dag_id=dag_id,
            single_dag_run=False,
            task_instances=task_instances,
            update_extras=False,
            dag_run_state=State.FAILED,
        )
        response = self.client.post(
            f"/api/v1/dags/{dag_id}/clearTaskInstances",
            environ_overrides={"REMOTE_USER": "test"},
            json=payload,
        )
    
        failed_dag_runs = (
            session.query(DagRun).filter(DagRun.state == "failed").count()  # pylint: disable=W0143
        )
        self.assertEqual(200, response.status_code)
        expected_response = [
            {
                'dag_id': 'example_python_operator',
                'dag_run_id': 'TEST_DAG_RUN_ID_0',
                'execution_date': '2020-01-01T00:00:00+00:00',
                'task_id': 'print_the_context',
            },
            {
                'dag_id': 'example_python_operator',
                'dag_run_id': 'TEST_DAG_RUN_ID_1',
                'execution_date': '2020-01-02T00:00:00+00:00',
                'task_id': 'sleep_for_0',
            },
            {
                'dag_id': 'example_python_operator',
                'dag_run_id': 'TEST_DAG_RUN_ID_2',
                'execution_date': '2020-01-03T00:00:00+00:00',
                'task_id': 'sleep_for_1',
            },
            {
                'dag_id': 'example_python_operator',
                'dag_run_id': 'TEST_DAG_RUN_ID_3',
                'execution_date': '2020-01-04T00:00:00+00:00',
                'task_id': 'sleep_for_2',
            },
            {
                'dag_id': 'example_python_operator',
                'dag_run_id': 'TEST_DAG_RUN_ID_4',
                'execution_date': '2020-01-05T00:00:00+00:00',
                'task_id': 'sleep_for_3',
            },
        ]
>       self.assertEqual(expected_response, response.json["task_instances"])
E       AssertionError: Lists differ: [{'da[60 chars]N_ID_0', 'execution_date': '2020-01-01T00:00:0[625 chars]_3'}] != [{'da[60 chars]N_ID_4', 'execution_date': '2020-01-05T00:00:0[625 chars]xt'}]
E       
E       First differing element 0:
E       {'dag[59 chars]N_ID_0', 'execution_date': '2020-01-01T00:00:0[36 chars]ext'}
E       {'dag[59 chars]N_ID_4', 'execution_date': '2020-01-05T00:00:0[30 chars]r_3'}
E       
E       Diff is 1680 characters long. Set self.maxDiff to None to see it.

tests/api_connexion/endpoints/test_task_instance_endpoint.py:839: AssertionError
```

tests/api_connexion/endpoints/test_task_instance_endpoint.py
#
#
import unittest
import datetime as dt
import getpass
from unittest import mock
from parameterized import parameterized
from airflow.models import DagBag, DagRun, TaskInstance, SlaMiss
from airflow.security import permissions
from airflow.utils.types import DagRunType
from airflow.utils.session import provide_session
from airflow.utils.state import State
from airflow.utils.timezone import datetime
from airflow.www import app
from tests.test_utils.config import conf_vars
from tests.test_utils.api_connexion_utils import create_user, delete_user, assert_401
from tests.test_utils.db import clear_db_runs, clear_db_sla_miss
DEFAULT_DATETIME_1 = datetime(2020, 1, 1)
DEFAULT_DATETIME_STR_1 = "2020-01-01T00:00:00+00:00"
DEFAULT_DATETIME_STR_2 = "2020-01-02T00:00:00+00:00"
class TestTaskInstanceEndpoint(unittest.TestCase):