tosheer commented on code in PR #39603:
URL: https://github.com/apache/airflow/pull/39603#discussion_r1634608184
##########
tests/jobs/test_scheduler_job.py:
##########
@@ -3869,13 +3870,112 @@ def dict_from_obj(obj):
assert created_run.data_interval_start == DEFAULT_DATE +
timedelta(days=5)
assert created_run.data_interval_end == DEFAULT_DATE +
timedelta(days=11)
# dag2 DDRQ record should still be there since the dag run was *not*
triggered
- assert
session.query(DatasetDagRunQueue).filter_by(target_dag_id=dag2.dag_id).one() is
not None
+ assert
session.query(DatasetDagRunQueue).filter_by(target_dag_id=dag3.dag_id).one() is
not None
# dag2 should not be triggered since it depends on both dataset 1 and
2
- assert session.query(DagRun).filter(DagRun.dag_id ==
dag2.dag_id).one_or_none() is None
+ assert session.query(DagRun).filter(DagRun.dag_id ==
dag3.dag_id).one_or_none() is None
# dag3 DDRQ record should be deleted since the dag run was triggered
- assert
session.query(DatasetDagRunQueue).filter_by(target_dag_id=dag3.dag_id).one_or_none()
is None
+ assert
session.query(DatasetDagRunQueue).filter_by(target_dag_id=dag2.dag_id).one_or_none()
is None
+
+ assert dag2.get_last_dagrun().creating_job_id == scheduler_job.id
Review Comment:
yes, as now any dag which was created before the event can arrive will see
only the event and i want to keep the dag created first named dag2 and dag
created later named dag3
--
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]