EricGao888 commented on issue #19286:
URL: https://github.com/apache/airflow/issues/19286#issuecomment-976229933


   > All `DagRun` instances are populated from `DagRunInfo`. Actually, 
`DagRunInfo` is already used to populate some fields on `DagModel` that are 
used to schedule the next DAG run:
   > 
   > 
https://github.com/apache/airflow/blob/1b89e682a1a04adf2cf5ebb37a453e245a6e7191/airflow/models/dag.py#L2920-L2928
   > 
   > So what we need to do is to pass that information on when the scheduler 
decides to actually create the next DAG run.
   > 
   > A DAG run is created with `DAG.create_dagrun()`, so you need to add an 
argument on that function, and change all `create_dagrun()` calls to use that 
argument. This will allow `DagRun.run_after` to be populated by 
`DagRunInfo.run_after` and thus in sync.
   
   Thanks for the detailed suggestions! 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to