-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
2.5.2
What happened
When using a custom timetable, triggering a DAG manually via the Airflow UI using the "Trigger DAG w/ config" option and specifying a logical date in the past causes Airflow to schedule all subsequent DAG runs up to the current time (which have not yet been run) in addition to the manual run.
For context, I'm writing a timetable to support uneven intervals, so the behaviour should be similar to the behaviour when providing a cron schedule. All behaviour is as expected, other than when triggering a DAG run with a logical date in the past. I'd assumed this was an issue with my implementation, but I can see that the AfterWorkdayTimetable example in the docs also exhibits the same behaviour. I know that cron strings are scheduled using the CronDataIntervalTimetable, but it's not clear to me from the source code why this behaves differently to my own timetable or the example timetable in this respect, and I can't see anything in the docs which mentions this behaviour.
What you think should happen instead
Airflow should create a manual DAG run for the specified logical date, but should not schedule any subsequent DAG runs as a result of this manual DAG run. The behaviour should be equivalent to the behaviour observed when running a DAG whose schedule is given using a cron string.
How to reproduce
- Create a DAG using the
AfterWorkdayTimetableexample in the docs and setcatchuptoFalse. - From the Airflow UI, use the "Trigger DAG w/ config" feature and specify a logical date in the past which falls on a weekday - Airflow will create a manual run for the specified weekday, but will then schedule all DAG runs subsequent to this up to today.
Operating System
macOS Ventural Version 13.2.1
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
Standard Airflow Docker deployment exactly as outlined in the docs.
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct