kaxil 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_r382751294
##########
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:
How about changing the test itself so order doesn't matter?
----------------------------------------------------------------
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