-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default start_date and schedule_interval to None #24842
Comments
The "default" schedule_interval is currently daily. I'm all for this so long as we can do it without breaking back-compat. |
Yea that won't be possible. The default daily schedule interval has been there since the very first commit, and always felt like undocumented magic to me, and goes against Python's "explicit is better than implicit". |
Then it's unlikely we can do it before 3.0 |
I think we might be able to do this by changing the function default to (Changing the code-level default is possible so long as the behaviour to the user remains the same) |
Yep. This looks like a good way to do it. Technically this is I think
|
See also discussion here https://lists.apache.org/thread/hyctljm0o1odn1bntp4fcgok0d0433ov. |
As of Airflow 2.8 I think this solves this issue to the best we can do without causing breaking changes. |
With #41321 we should be set to do this. |
Description
I suggest changing the bare-minimum code required for instantiating a DAG:
This is currently not possible because
start_date
is a required argument:I regularly see people using externally triggered DAGs and you're currently forced to set a placeholder
start_date
because Airflow requires it:When people want to set a
schedule_interval
, they intentionally think of it, so defaulting toNone
feels like a better UX to me.Use case/motivation
To improve the Airflow user experience, I suggest removing the
start_date
requirement onDAG
:This DAG could be triggered externally.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: