stijndehaes commented on issue #35272: URL: https://github.com/apache/airflow/issues/35272#issuecomment-1790381710
I have created a drawing of what the current state is. The schedule for this DAG is a bit complex: `0,15,30,45 6-22 * * *`  So basically there is one dag run created (the middle one), that is questionable if it should ever be created. The left and right one have either a questionable start of the interval or questionable end. Also after creating these the scheduler stops, in the logs I can see the next dag run is calculated as `2023-10-28T22:50:00+00:00` which in CET is equal to `2023-10-28T23:50:00+01:00`, this dag run already exists so it then calculated the next dag run from that one to: `2023-10-29T03:50:00+00:00` in CET: `2023-10-29T04:50:00+01:00` which also already exists, and it continues like this. This test reproduces the calculation: ``` def test_new_calculate_next_time(): timezone = "Europe/Brussels" tz = pendulum.tz.timezone(timezone) start = pendulum.DateTime(2023, 10, 29, hour=4, minute=50, tzinfo=tz) end = pendulum.DateTime(2023, 10, 29, hour=5, minute=50, tzinfo=tz) interval = DataInterval(start=start, end=end) table = CronDataIntervalTimetable("50 5-11,13-23 * * *", timezone) next_info = table.next_dagrun_info(last_automated_data_interval=interval, restriction=TimeRestriction(earliest=None, latest=None, catchup=True)) expected_start = end expected_end = pendulum.DateTime(2023, 10, 29, hour=6, minute=50, tzinfo=tz) assert next_info == DagRunInfo.interval(start=expected_start, end=expected_end) ``` And fails to succeed. I would love some advice from someone at Airflow what would be the best behavior. @potiuk can you help me find someone I can discuss solutions with? As for a workardound I have two for people: - Set the `start_date` to after the issue - Update the `next_dagrun`, `next_dagrun_data_interval_start`, `next_dagrun_data_interval_end` manually to the correct next dag run -- 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]
