yuqian90 commented on a change in pull request #7470: [AIRFLOW-6834] Fix flaky 
test_scheduler_job by sorting TaskInstance
URL: https://github.com/apache/airflow/pull/7470#discussion_r382962334
 
 

 ##########
 File path: airflow/models/dagrun.py
 ##########
 @@ -201,7 +201,7 @@ def get_task_instances(self, state=None, session=None):
 
         if self.dag and self.dag.partial:
             tis = tis.filter(TaskInstance.task_id.in_(self.dag.task_ids))
-        return tis.all()
+        return tis.order_by(TaskInstance.execution_date, TaskInstance.dag_id, 
TaskInstance.task_id).all()
 
 Review comment:
   Good point. That's done. I changed the test instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to