eladkal commented on code in PR #35356: URL: https://github.com/apache/airflow/pull/35356#discussion_r1381803502
########## tests/models/test_dag.py: ########## @@ -827,6 +827,15 @@ def test_following_schedule_datetime_timezone(self): when = dag.following_schedule(start) assert when.isoformat() == "2018-03-25T03:00:00+00:00" + def test_create_dagrun_when_schedule_is_none_and_empty_start_date(self): + # Check that we don't get an AttributeError 'start_date' for self.start_date when schedule is empty + dag = DAG("dag_without_start_date") + dag.add_task(BaseOperator(task_id="task_without_start_date")) + dagrun = dag.create_dagrun( + state=State.RUNNING, run_type=DagRunType.SCHEDULED, execution_date=DEFAULT_DATE Review Comment: I dont think so because the first run depends on the start_date. If you set it in the past and interval passed when dag is activated it will create a run. If you set it for a future date then interval is not completed thus no run will be created when dag is set to active. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org