This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 63487122e8cf490ae78a5382c20be937be33f94f
Author: Stanley Law <[email protected]>
AuthorDate: Wed Aug 13 21:06:33 2025 +0800

    Add ordering to AssetEvent query in SchedulerJobRunner (#52231)
    
    closes: #52230
    
    This change is adding ordering for selecting asset events to maintain the 
ordering.
    
    (cherry picked from commit c8336ec63b664879e23d4eec6bbda10b43b9fd5b)
---
 airflow-core/src/airflow/jobs/scheduler_job_runner.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/airflow-core/src/airflow/jobs/scheduler_job_runner.py 
b/airflow-core/src/airflow/jobs/scheduler_job_runner.py
index 2ad76af29c8..cd517af6b97 100644
--- a/airflow-core/src/airflow/jobs/scheduler_job_runner.py
+++ b/airflow-core/src/airflow/jobs/scheduler_job_runner.py
@@ -1649,6 +1649,7 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
                     AssetEvent.timestamp <= triggered_date,
                     AssetEvent.timestamp > 
func.coalesce(cte.c.previous_dag_run_run_after, date.min),
                 )
+                .order_by(AssetEvent.timestamp.asc(), AssetEvent.id.asc())
             ).all()
 
             dag_run = dag.create_dagrun(

Reply via email to